You can get the types by querying this Structured Name Content URI.
http://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.StructuredName.html
It has all the attributes you need, just keep the selection empty and you will have structured name data for all the contacts.
Use this code to query the contacts Given name, middle name, family name and prefix
Uri nameUri = ContactsContract.Data.CONTENT_URI;
String selection = ContactsContract.Data.MIMETYPE + "='"
+ ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE + "'";
Cursor cursor = getContentResolver().query(nameUri, new String[]{
ContactsContract.CommonDataKinds.StructuredName._ID,
ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME,
ContactsContract.CommonDataKinds.StructuredName.PREFIX,
ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME,
}, selection, null, ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME);