views:

96

answers:

1

I am attempting to create an app that can be used to search an Exchange GAL, however, I am finding the new 4.0 documentation regarding this subject confusing. Does anyone know how I might go about searching the GAL for names containing a specific string (e.g. "Smi")? My source code at the moment is all but useless as I am simply trying to wrap my head around how to specify that I am wanting only to search the GAL and not the local contacts on the device. Also, how is kABSourceTypeSearchableMask used? I am missing something fundamental here. From the documentation...

Source Types

These constants identify the type of a source.

enum { kABSourceTypeLocal = 0x0, kABSourceTypeExchange = 0x1, kABSourceTypeExchangeGAL = kABSourceTypeExchange | kABSourceTypeSearchableMask, kABSourceTypeMobileMe = 0x2, kABSourceTypeLDAP = 0x3 | kABSourceTypeSearchableMask, kABSourceTypeCardDAV = 0x4, kABSourceTypeCardDAVSearch = kABSourceTypeCardDAV | kABSourceTypeSearchableMask, }; typedef int ABSourceType;

When I query for the default source type, I do get "1" which would appear to indicate that the default type is "kABSourceTypeExchange" which would be correct as this is what I have in my Settings. I do not know how to proceed beyond this point...

As the whole source concept is a new to the ABAddressBook framework in 4.0 I don't imagine that folks have much experience with this, but hoping someone might help me understand how to work with the above...thanks.