API Guide Home (Online version only) |

# Contacts.h File Reference

Include dependency graph for Contacts.h:

Go to the source code of this file.

## Defines

- #define CONTACTS_LIB_TRAP SYS_TRAP
- #define ContactsLibCreatorID 'P1CT'
- #define ContactsLibTypeID sysFileTLibrary
- #define ContactsLibName "ContactsLib-P1CT"
- #define ContactsLibErrorClass (appErrorClass | 0x7300)
- #define ContactsLibErrTooManyClients (ContactsLibErrorClass | 1)
- #define ContactsLibErrInvalidHandle (ContactsLibErrorClass | 2)
- #define ContactsLibErrInvalidParam (ContactsLibErrorClass | 3)
- #define ContactsLibErrUIdNotFound (ContactsLibErrorClass | 4)
- #define ContactsLibErrCategoryNotFound (ContactsLibErrorClass | 5)
- #define ContactsLibErrLibAlreadyInUse (ContactsLibErrorClass | 6)
- #define ContactsLibErrVerNotSupported (ContactsLibErrorClass | 7)
- #define ContactsLibErrOutOfMemory (ContactsLibErrorClass | 8)
- #define ContactsLibErrSizeParamOverFlow (ContactsLibErrorClass | 9)
- #define ContactsLibErrEmptyContact (ContactsLibErrorClass | 10)
- #define ContactsLibErrInvalidReference (ContactsLibErrorClass | 11)
- #define ContactsLibErrContactNotFound (ContactsLibErrorClass | 12)
- #define ContactsLibErrAttachAlreadyExist (ContactsLibErrorClass | 13)
- #define ContactsLibErrAttachNotExist (ContactsLibErrorClass | 14)
- #define ContactsLibErrAttachOverFlow (ContactsLibErrorClass | 15)
- #define ContactsLibErrRecordNotFound (ContactsLibErrorClass | 16)
- #define ContactsLibErrAttachOverflow (ContactsLibErrorClass | 17)
- #define ContactsLibErrInvalidField (ContactsLibErrorClass | 18)
- #define ContactsLibErrTooManySession (ContactsLibErrorClass | 19)
- #define ContactsLibErrAlreadyInWriteMode (ContactsLibErrorClass | 20)
- #define ContactsLibErrInvalidSessionHandle (ContactsLibErrorClass | 21)
- #define ContactsLibErrFieldNotFound (ContactsLibErrorClass | 23)
- #define ContactsLibErrStringNotFound (ContactsLibErrorClass | 24)
- #define ContactsLibErrInvalidAppInfoBlock (ContactsLibErrorClass | 25)
- #define ContactsLibErrAppInfoIsMising (ContactsLibErrorClass | 26)
- #define ContactsLibErrReadOnlySession (ContactsLibErrorClass | 27)
- #define ContactsLibErrUIdExist (ContactsLibErrorClass | 28)
- #define ContactsLibErrMaxLimitReached (ContactsLibErrorClass | 29)
- #define ContactsLibErrListNotExist (ContactsLibErrorClass | 30)
- #define ContactsLibErrContactNotLocked (ContactsLibErrorClass | 31)
- #define ContactsLibErrLibStillOpen (ContactsLibErrorClass | 32)
- #define PALM_OS
- #define ContactsNumCategories dmRecNumCategories
- #define ContactsAllCategories dmAllCategories
- #define ContactsUnfiledCategory dmUnfiledCategory
- #define ContactsSeekForward dmSeekForward
- #define ContactsSeekBackward dmSeekBackward
- #define ContactsLabelLength 16
- #define ContactsLibTrapGetVersion (sysLibTrapCustom)
- #define ContactsLibTrapOpenSession (sysLibTrapCustom + 23)
- #define ContactsLibTrapCloseSession (sysLibTrapCustom + 24)
- #define ContactsLibTrapCreateHandle (sysLibTrapCustom + 90)
- #define ContactsLibTrapReleaseHandle (sysLibTrapCustom + 4)
- #define ContactsLibTrapAddContact (sysLibTrapCustom + 8)
- #define ContactsLibTrapUpdateContact (sysLibTrapCustom + 7)
- #define ContactsLibTrapDeleteContact (sysLibTrapCustom + 9)
- #define ContactsLibTrapGetContact (sysLibTrapCustom + 12)
- #define ContactsLibTrapGetNumOfRecord (sysLibTrapCustom + 28)
- #define ContactsLibTrapSeekRecord (sysLibTrapCustom + 35)
- #define ContactsLibTrapGetFirstContact (sysLibTrapCustom + 10)
- #define ContactsLibTrapGetNextContact (sysLibTrapCustom + 11)
- #define ContactsLibTrapDoesFieldExist (sysLibTrapCustom + 36)
- #define ContactsLibTrapIsEmptyContact (sysLibTrapCustom + 30)
- #define ContactsLibTrapSetUInt8Field (sysLibTrapCustom + 51)
- #define ContactsLibTrapSetUInt16Field (sysLibTrapCustom + 53)
- #define ContactsLibTrapSetDateField (sysLibTrapCustom + 55)
- #define ContactsLibTrapSetStringField (sysLibTrapCustom + 57)
- #define ContactsLibTrapSetBinaryField (sysLibTrapCustom + 59)
- #define ContactsLibTrapGetUInt8Field (sysLibTrapCustom + 50)
- #define ContactsLibTrapGetUInt16Field (sysLibTrapCustom + 52)
- #define ContactsLibTrapGetUInt32Field (sysLibTrapCustom + 63)
- #define ContactsLibTrapGetDateField (sysLibTrapCustom + 54)
- #define ContactsLibTrapGetStringField (sysLibTrapCustom + 56)
- #define ContactsLibTrapGetBinaryField (sysLibTrapCustom + 58)
- #define ContactsLibTrapGetFieldLabel (sysLibTrapCustom + 31)
- #define ContactsLibTrapSetFieldLabel (sysLibTrapCustom + 32)
- #define ContactsLibTrapGetLabelText (sysLibTrapCustom + 82)
- #define ContactsLibTrapRenameCustomLabel (sysLibTrapCustom + 33)
- #define ContactsLibTrapGetCategoryList (sysLibTrapCustom + 2)
- #define ContactsLibTrapGetNextCategory (sysLibTrapCustom + 37)
- #define ContactsLibTrapGetCategoryName (sysLibTrapCustom + 27)
- #define ContactsLibTrapSetCategoryName (sysLibTrapCustom + 38)
- #define ContactsLibTrapCategoryFind (sysLibTrapCustom + 39)
- #define ContactsLibTrapPosInCategory (sysLibTrapCustom + 48)
- #define ContactsLibTrapGetRingtoneForCategory (sysLibTrapCustom + 91)
- #define ContactsLibTrapLookUpString (sysLibTrapCustom + 40)
- #define ContactsLibGetLastErr (sysLibTrapCustom + 64)

## Typedefs

- typedef MemHandle ContactsContHandle
- typedef MemHandle ContactsSession
- typedef DateType ContactsDateType
- typedef char ContactsLabel [ContactsLabelLength]
- typedef enum ContactsLabelTypes ContactsLabelType

## Enumerations

- enum ContactsLibFieldLabels {
  contactsNoType,
  contactsWorkPhone,
  contactsHomePhone,
  contactsFaxPhone,
  contactsOtherPhone,
  contactsEmailPhone,
  contactsMainPhone,
  contactsPagerPhone,
  contactsMobilePhone,
  contactsOtherChat,
  contactsAimChat,
  contactsMsnChat,
  contactsYahooChat,
  contactsIcqChat,
  contactsWorkAddress,
  contactsHomeAddress,
  contactsOtherAddress
  }
- enum ContactsLibAllFields {
  contactsLastName,
  contactsFirstName,
  contactsCompany,
  contactsTitle,
  contactsPhone1,
  contactsPhone2,
  contactsPhone3,
  contactsPhone4,
  contactsPhone5,
  contactsPhone6,
  contactsPhone7,
  contactsChat1,
  contactsChat2,
  contactsWebpage,
  contactsCustom1,
  contactsCustom2,
  contactsCustom3,
  contactsCustom4,
  contactsCustom5,
  contactsCustom6,
  contactsCustom7,
  contactsCustom8,
  contactsCustom9,
  contactsAddress1,
  contactsCity1,
  contactsState1,
  contactsZipCode1,
  contactsCountry1,
  contactsAddress2,
  contactsCity2,
  contactsState2,
  contactsZipCode2,
  contactsCountry2,
  contactsAddress3,
  contactsCity3,
  contactsState3,
  contactsZipCode3,
  contactsCountry3,
  contactsNote,
  contactsBirthdate,
  contactsBirthdayMask,
  contactsBirthdayPreset,
  contactsPicture,
  contactsUniqueID = contactsPicture + 2,
  contactsIndex,
  contactsCategoryID,
  contactsPrivate = contactsCategoryID + 2,
  contactsBusy,
  contactsDirty,
  contactsRingtoneInfo = contactsDirty + 4,
  contactsAnniversaryDate,
  contactsAnniversaryMask,
  contactsAnniversaryPreset,
  contactsNumFields
  }
- enum ContactsLibStrFields {
  contactsStrLastName,
  contactsStrFirstName,
  contactsStrCompany,
  contactsStrTitle,
  contactsStrPhone1,
  contactsStrPhone2,
  contactsStrPhone3,
  contactsStrPhone4,
  contactsStrPhone5,
  contactsStrPhone6,
  contactsStrPhone7,
  contactsStrChat1,
  contactsStrChat2,
  contactsStrWebpage,
  contactsStrCustom1,
  contactsStrCustom2,
  contactsStrCustom3,
  contactsStrCustom4,
  contactsStrCustom5,
  contactsStrCustom6,
  contactsStrCustom7,
  contactsStrCustom8,
  contactsStrCustom9,
  contactsStrAddress1,
  contactsStrCity1,
  contactsStrState1,
  contactsStrZipCode1,
  contactsStrCountry1,
  contactsStrAddress2,
  contactsStrCity2,
  contactsStrState2,
  contactsStrZipCode2,
  contactsStrCountry2,
  contactsStrAddress3,
  contactsStrCity3,
  contactsStrState3,
  contactsStrZipCode3,
  contactsStrCountry3,
  contactsStrNote
  }
- enum ContactsLibCustomFields {
  contactsCustomCustom1 = contactsCustom1,
  contactsCustomCustom2,
  contactsCustomCustom3,
  contactsCustomCustom4,
  contactsCustomCustom5,
  contactsCustomCustom6,
  contactsCustomCustom7,
  contactsCustomCustom8,
  contactsCustomCustom9
  }
- enum ContactsLibWithLabelFields {
  contactsWithLabelPhone1 = contactsPhone1,
  contactsWithLabelPhone2,
  contactsWithLabelPhone3,
  contactsWithLabelPhone4,
  contactsWithLabelPhone5,
  contactsWithLabelPhone6,
  contactsWithLabelPhone7,
  contactsWithLabelChat1,
  contactsWithLabelChat2,
  contactsWithLabelAddress1 = contactsAddress1,
  contactsWithLabelAddress2 = contactsAddress2,
  contactsWithLabelAddress3 = contactsAddress3
  }
- enum ContactsLabelTypes {
  ContactsChatLabel,
  ContactsAddressLabel,
  ContactsPhoneLabel
  }
- enum ContactsLibDateFields {
  contactsDateBirthdate = contactsBirthdate,
  contactsDateAnniversary = contactsAnniversaryDate
  }
- enum ContactsLibUInt16Fields {
  contactsUInt16Index = contactsIndex,
  contactsUInt16Category = contactsCategoryID
  }
- enum ContactsLibUInt32Fields { contactsUInt32UniqueID = contactsUniqueID }
- enum ContactsLibUInt8Fields {
  contactsUInt8Private = contactsPrivate,
  contactsUInt8Busy,
  contactsUInt8Dirty,
  contactsUInt8BirthdayMask = contactsBirthdayMask,
  contactsUInt8BirthdayPreset,
  contactsUInt8AnniversaryMask = contactsAnniversaryMask,
  contactsUInt8AnniversaryPreset
  }
- enum ContactsLibBinaryFields {
  contactsBinaryPictureData = contactsPicture,
  contactsBinaryRingtoneIdentifier = contactsRingtoneInfo
  }
- enum SessionMode {
  ContactsLibSessionModeReadOnly = 0x0001,
  ContactsLibSessionModeReadWrite = 0x0003
  }

## Functions

- __inline Err ContactsLib_OpenLibrary (UInt16 *refNumP)
- __inline Err ContactsLib_CloseLibrary (UInt16 *refNumP)
- UInt32 ContactsGetVersion (UInt16 libRefnum) CONTACTS_LIB_TRAP(ContactsLibTrapGetVersion)
- ContactsSession ContactsOpenSession (UInt16 libRefnum, SessionMode mode) CONTACTS_LIB_TRAP(ContactsLibTrapOpenSession)
- Err ContactsCloseSession (UInt16 libRefnum, ContactsSession hCurSession) CONTACTS_LIB_TRAP(ContactsLibTrapCloseSession)
- ContactsContHandle ContactsCreateHandle (UInt16 libRefnum, ContactsSession hSession) CONTACTS_LIB_TRAP(ContactsLibTrapCreateHandle)
- Err ContactsReleaseHandle (UInt16 libRefnum, ContactsContHandle hContact) CONTACTS_LIB_TRAP(ContactsLibTrapReleaseHandle)
- Err ContactsAddContact (UInt16 libRefnum, ContactsSession hSession, ContactsContHandle hContact) CONTACTS_LIB_TRAP(ContactsLibTrapAddContact)
- Err ContactsUpdateContact (UInt16 libRefnum, ContactsSession hSession, ContactsContHandle hContact) CONTACTS_LIB_TRAP(ContactsLibTrapUpdateContact)
- Err ContactsDeleteContact (UInt16 libRefnum, ContactsSession hSession, ContactsContHandle hContact, Boolean archive) CONTACTS_LIB_TRAP(ContactsLibTrapDeleteContact)
- ContactsContHandle ContactsGetContact (UInt16 libRefnum, ContactsSession hSession, UInt16 *indexP, UInt32 *uniqueIDP, Boolean ignored) CONTACTS_LIB_TRAP(ContactsLibTrapGetContact)
- UInt16 ContactsGetNumRecords (UInt16 libRefnum, ContactsSession hSession, UInt16 category) CONTACTS_LIB_TRAP(ContactsLibTrapGetNumOfRecord)
- UInt16 ContactsPosInCategory (UInt16 libRefnum, ContactsSession hSession, ContactsContHandle hContact, UInt16 *pIndex, UInt16 category) CONTACTS_LIB_TRAP(ContactsLibTrapPosInCategory)
- Boolean ContactsSeekRecord (UInt16 libRefnum, ContactsSession hSession, UInt16 *indexP, UInt16 offset, Int16 direction, UInt16 category) CONTACTS_LIB_TRAP(ContactsLibTrapSeekRecord)
- ContactsContHandle ContactsGetFirstContact (UInt16 libRefnum, ContactsSession hSession, UInt16 category) CONTACTS_LIB_TRAP(ContactsLibTrapGetFirstContact)
- ContactsContHandle ContactsGetNextContact (UInt16 libRefnum, ContactsSession hSession, ContactsContHandle hSourceContact, UInt16 Category) CONTACTS_LIB_TRAP(ContactsLibTrapGetNextContact)
- Boolean ContactsDoesFieldExist (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibAllFields NameOfField) CONTACTS_LIB_TRAP(ContactsLibTrapDoesFieldExist)
- Boolean ContactsIsEmptyContact (UInt16 libRefnum, ContactsSession hSession, ContactsContHandle hCont, UInt16 *Index, UInt32 *UniqueID) CONTACTS_LIB_TRAP(ContactsLibTrapIsEmptyContact)
- Err ContactsSetUInt8Field (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibUInt8Fields nameOfField, UInt8 fieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapSetUInt8Field)
- Err ContactsSetUInt16Field (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibUInt16Fields NameOfField, UInt16 FieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapSetUInt16Field)
- Err ContactsSetDateField (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibDateFields nameOfField, ContactsDateType fieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapSetDateField)
- Err ContactsSetStringField (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibStrFields nameOfField, char *FieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapSetStringField)
- Err ContactsSetBinaryField (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibBinaryFields NameOfField, void *pFieldData, UInt16 DataSize) CONTACTS_LIB_TRAP(ContactsLibTrapSetBinaryField)
- Err ContactsGetUInt8Field (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibUInt8Fields NameOfField, UInt8 *pFieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapGetUInt8Field)
- Err ContactsGetUInt16Field (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibUInt16Fields NameOfField, UInt16 *pFieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapGetUInt16Field)
- Err ContactsGetUInt32Field (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibUInt32Fields NameOfField, UInt32 *pFieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapGetUInt32Field)
- Err ContactsGetDateField (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibDateFields NameOfField, DateType *pFieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapGetDateField)
- Err ContactsGetStringField (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibStrFields NameOfField, char **pFieldValue) CONTACTS_LIB_TRAP(ContactsLibTrapGetStringField)
- void * ContactsGetBinaryField (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibBinaryFields NameOfField, UInt16 *pDataSize) CONTACTS_LIB_TRAP(ContactsLibTrapGetBinaryField)
- Err ContactsGetRingtoneForCategory (UInt16 libRefnum, UInt16 categoryID, void *tone) CONTACTS_LIB_TRAP(ContactsLibTrapGetRingtoneForCategory)
- Int16 ContactsGetFieldLabel (UInt16 libRefnum, ContactsContHandle hContact, ContactsLibWithLabelFields FieldNum) CONTACTS_LIB_TRAP(ContactsLibTrapGetFieldLabel)
- void ContactsSetFieldLabel (UInt16 libRefnum, ContactsContHandle hToCont, ContactsLibWithLabelFields FieldNum, Int16 LabelIndex) CONTACTS_LIB_TRAP(ContactsLibTrapSetFieldLabel)
- char * ContactsGetLabelText (UInt16 libRefnum, ContactsSession hSession, ContactsLabelType type, UInt16 labelNum, UInt16 *pSizeOfBuffer) CONTACTS_LIB_TRAP(ContactsLibTrapGetLabelText)
- Err ContactsRenameCustomLabel (UInt16 libRefnum, ContactsSession hSession, ContactsLibCustomFields fieldNum, Char *fieldLabel) CONTACTS_LIB_TRAP(ContactsLibTrapRenameCustomLabel)
- void ContactsGetCategoryList (UInt16 libRefnum, ContactsSession hSession, char *pCategoryList[ContactsNumCategories]) CONTACTS_LIB_TRAP(ContactsLibTrapGetCategoryList)
- UInt16 ContactsGetNextCategory (UInt16 libRefnum, ContactsSession hSession, UInt16 currentCategory) CONTACTS_LIB_TRAP(ContactsLibTrapGetNextCategory)
- Char * ContactsGetCategoryName (UInt16 libRefnum, ContactsSession hSession, UInt16 categoryIndex) CONTACTS_LIB_TRAP(ContactsLibTrapGetCategoryName)
- void ContactsSetCategoryName (UInt16 libRefnum, ContactsSession hSession, UInt16 categoryIndex, const Char *pCatName) CONTACTS_LIB_TRAP(ContactsLibTrapGetCategoryName)
- UInt16 ContactsCategoryFind (UInt16 libRefnum, ContactsSession hSession, const Char *pCatName) CONTACTS_LIB_TRAP(ContactsLibTrapCategoryFind)
- ContactsContHandle ContactsLookUpString (UInt16 libRefnum, ContactsSession hSession, Char *key, Boolean sortByCompany, UInt16 category, Boolean *completeMatch, UInt16 *pNumMatchingChars, Boolean masked) CONTACTS_LIB_TRAP(ContactsLibTrapLookUpString)
- Err ContactsGetLastError (UInt16 libRefnum) CONTACTS_LIB_TRAP(ContactsLibGetLastErr)

## Define Documentation

#define CONTACTS_LIB_TRAP SYS_TRAP

Definition at line 38 of file Contacts.h.

#define ContactsAllCategories dmAllCategories

Definition at line 94 of file Contacts.h.

#define ContactsLabelLength 16

Definition at line 102 of file Contacts.h.

#define ContactsLibCreatorID 'P1CT'

Definition at line 43 of file Contacts.h.

Referenced by ContactsLib_OpenLibrary().

#define ContactsLibErrAlreadyInWriteMode (ContactsLibErrorClass | 20)

Definition at line 74 of file Contacts.h.

#define ContactsLibErrAppInfoIsMising (ContactsLibErrorClass | 26)

Definition at line 79 of file Contacts.h.

#define ContactsLibErrAttachAlreadyExist (ContactsLibErrorClass | 13)

Definition at line 67 of file Contacts.h.

#define ContactsLibErrAttachNotExist (ContactsLibErrorClass | 14)

Definition at line 68 of file Contacts.h.

#define ContactsLibErrAttachOverflow (ContactsLibErrorClass | 17)

Definition at line 71 of file Contacts.h.

#define ContactsLibErrAttachOverFlow (ContactsLibErrorClass | 15)

Definition at line 69 of file Contacts.h.

#define ContactsLibErrCategoryNotFound (ContactsLibErrorClass | 5)

Definition at line 59 of file Contacts.h.

#define ContactsLibErrContactNotFound (ContactsLibErrorClass | 12)

Definition at line 66 of file Contacts.h.

#define ContactsLibErrContactNotLocked (ContactsLibErrorClass | 31)

Definition at line 84 of file Contacts.h.

#define ContactsLibErrEmptyContact (ContactsLibErrorClass | 10)

Definition at line 64 of file Contacts.h.

#define ContactsLibErrFieldNotFound (ContactsLibErrorClass | 23)

Definition at line 76 of file Contacts.h.

#define ContactsLibErrInvalidAppInfoBlock (ContactsLibErrorClass | 25)

Definition at line 78 of file Contacts.h.

#define ContactsLibErrInvalidField (ContactsLibErrorClass | 18)

Definition at line 72 of file Contacts.h.

#define ContactsLibErrInvalidHandle (ContactsLibErrorClass | 2)

Definition at line 56 of file Contacts.h.

#define ContactsLibErrInvalidParam (ContactsLibErrorClass | 3)

Definition at line 57 of file Contacts.h.

#define ContactsLibErrInvalidReference (ContactsLibErrorClass | 11)

Definition at line 65 of file Contacts.h.

#define ContactsLibErrInvalidSessionHandle (ContactsLibErrorClass | 21)

Definition at line 75 of file Contacts.h.

#define ContactsLibErrLibAlreadyInUse (ContactsLibErrorClass | 6)

Definition at line 60 of file Contacts.h.

#define ContactsLibErrLibStillOpen (ContactsLibErrorClass | 32)

Definition at line 85 of file Contacts.h.

Referenced by ContactsLib_CloseLibrary().

#define ContactsLibErrListNotExist (ContactsLibErrorClass | 30)

Definition at line 83 of file Contacts.h.

#define ContactsLibErrMaxLimitReached (ContactsLibErrorClass | 29)

Definition at line 82 of file Contacts.h.

#define ContactsLibErrorClass (appErrorClass | 0x7300)

Definition at line 54 of file Contacts.h.

#define ContactsLibErrOutOfMemory (ContactsLibErrorClass | 8)

Definition at line 62 of file Contacts.h.

#define ContactsLibErrReadOnlySession (ContactsLibErrorClass | 27)

Definition at line 80 of file Contacts.h.

#define ContactsLibErrRecordNotFound (ContactsLibErrorClass | 16)

Definition at line 70 of file Contacts.h.

#define ContactsLibErrSizeParamOverFlow (ContactsLibErrorClass | 9)

Definition at line 63 of file Contacts.h.

#define ContactsLibErrStringNotFound (ContactsLibErrorClass | 24)

Definition at line 77 of file Contacts.h.

#define ContactsLibErrTooManyClients (ContactsLibErrorClass | 1)

Definition at line 55 of file Contacts.h.

#define ContactsLibErrTooManySession (ContactsLibErrorClass | 19)

Definition at line 73 of file Contacts.h.

#define ContactsLibErrUIdExist (ContactsLibErrorClass | 28)

Definition at line 81 of file Contacts.h.

#define ContactsLibErrUIdNotFound (ContactsLibErrorClass | 4)

Definition at line 58 of file Contacts.h.

#define ContactsLibErrVerNotSupported (ContactsLibErrorClass | 7)

Definition at line 61 of file Contacts.h.

#define ContactsLibGetLastErr (sysLibTrapCustom + 64)

Definition at line 372 of file Contacts.h.

#define ContactsLibName "ContactsLib-P1CT"

Definition at line 49 of file Contacts.h.

Referenced by ContactsLib_OpenLibrary().

#define ContactsLibTrapAddContact (sysLibTrapCustom + 8)

Definition at line 327 of file Contacts.h.

#define ContactsLibTrapCategoryFind (sysLibTrapCustom + 39)

Definition at line 365 of file Contacts.h.

#define ContactsLibTrapCloseSession (sysLibTrapCustom + 24)

Definition at line 322 of file Contacts.h.

#define ContactsLibTrapCreateHandle (sysLibTrapCustom + 90)

Definition at line 324 of file Contacts.h.

#define ContactsLibTrapDeleteContact (sysLibTrapCustom + 9)

Definition at line 329 of file Contacts.h.

#define ContactsLibTrapDoesFieldExist (sysLibTrapCustom + 36)

Definition at line 338 of file Contacts.h.

#define ContactsLibTrapGetBinaryField (sysLibTrapCustom + 58)

Definition at line 353 of file Contacts.h.

#define ContactsLibTrapGetCategoryList (sysLibTrapCustom + 2)

Definition at line 361 of file Contacts.h.

#define ContactsLibTrapGetCategoryName (sysLibTrapCustom + 27)

Definition at line 363 of file Contacts.h.

#define ContactsLibTrapGetContact (sysLibTrapCustom + 12)

Definition at line 331 of file Contacts.h.

#define ContactsLibTrapGetDateField (sysLibTrapCustom + 54)

Definition at line 351 of file Contacts.h.

#define ContactsLibTrapGetFieldLabel (sysLibTrapCustom + 31)

Definition at line 355 of file Contacts.h.

#define ContactsLibTrapGetFirstContact (sysLibTrapCustom + 10)

Definition at line 334 of file Contacts.h.

#define ContactsLibTrapGetLabelText (sysLibTrapCustom + 82)

Definition at line 357 of file Contacts.h.

#define ContactsLibTrapGetNextCategory (sysLibTrapCustom + 37)

Definition at line 362 of file Contacts.h.

#define ContactsLibTrapGetNextContact (sysLibTrapCustom + 11)

Definition at line 335 of file Contacts.h.

#define ContactsLibTrapGetNumOfRecord (sysLibTrapCustom + 28)

Definition at line 332 of file Contacts.h.

#define ContactsLibTrapGetRingtoneForCategory (sysLibTrapCustom + 91)

Definition at line 368 of file Contacts.h.

#define ContactsLibTrapGetStringField (sysLibTrapCustom + 56)

Definition at line 352 of file Contacts.h.

#define ContactsLibTrapGetUInt16Field (sysLibTrapCustom + 52)

Definition at line 349 of file Contacts.h.

#define ContactsLibTrapGetUInt32Field (sysLibTrapCustom + 63)

Definition at line 350 of file Contacts.h.

#define ContactsLibTrapGetUInt8Field (sysLibTrapCustom + 50)

Definition at line 348 of file Contacts.h.

#define ContactsLibTrapGetVersion (sysLibTrapCustom)

Definition at line 319 of file Contacts.h.

#define ContactsLibTrapIsEmptyContact (sysLibTrapCustom + 30)

Definition at line 339 of file Contacts.h.

#define ContactsLibTrapLookUpString (sysLibTrapCustom + 40)

Definition at line 370 of file Contacts.h.

#define ContactsLibTrapOpenSession (sysLibTrapCustom + 23)

Definition at line 321 of file Contacts.h.

#define ContactsLibTrapPosInCategory (sysLibTrapCustom + 48)

Definition at line 366 of file Contacts.h.

#define ContactsLibTrapReleaseHandle (sysLibTrapCustom + 4)

Definition at line 325 of file Contacts.h.

#define ContactsLibTrapRenameCustomLabel (sysLibTrapCustom + 33)

Definition at line 359 of file Contacts.h.

#define ContactsLibTrapSeekRecord (sysLibTrapCustom + 35)

Definition at line 333 of file Contacts.h.

#define ContactsLibTrapSetBinaryField (sysLibTrapCustom + 59)

Definition at line 345 of file Contacts.h.

#define ContactsLibTrapSetCategoryName (sysLibTrapCustom + 38)

Definition at line 364 of file Contacts.h.

#define ContactsLibTrapSetDateField (sysLibTrapCustom + 55)

Definition at line 343 of file Contacts.h.

#define ContactsLibTrapSetFieldLabel (sysLibTrapCustom + 32)

Definition at line 356 of file Contacts.h.

#define ContactsLibTrapSetStringField (sysLibTrapCustom + 57)

Definition at line 344 of file Contacts.h.

#define ContactsLibTrapSetUInt16Field (sysLibTrapCustom + 53)

Definition at line 342 of file Contacts.h.

#define ContactsLibTrapSetUInt8Field (sysLibTrapCustom + 51)

Definition at line 341 of file Contacts.h.

#define ContactsLibTrapUpdateContact (sysLibTrapCustom + 7)

Definition at line 328 of file Contacts.h.

#define ContactsLibTypeID sysFileTLibrary

Definition at line 44 of file Contacts.h.

Referenced by ContactsLib_OpenLibrary().

#define ContactsNumCategories dmRecNumCategories

Definition at line 93 of file Contacts.h.

#define ContactsSeekBackward dmSeekBackward

Definition at line 97 of file Contacts.h.

#define ContactsSeekForward dmSeekForward

Definition at line 96 of file Contacts.h.

#define ContactsUnfiledCategory dmUnfiledCategory

Definition at line 95 of file Contacts.h.

#define PALM_OS

Definition at line 88 of file Contacts.h.

## Typedef Documentation

typedef MemHandle ContactsContHandle

Definition at line 90 of file Contacts.h.

typedef DateType ContactsDateType

Definition at line 99 of file Contacts.h.

typedef char ContactsLabel[ContactsLabelLength]

Definition at line 103 of file Contacts.h.

typedef enum ContactsLabelTypes ContactsLabelType

typedef MemHandle ContactsSession

Definition at line 91 of file Contacts.h.

## Enumeration Type Documentation

enum ContactsLabelTypes

Enumerator:

  ContactsChatLabel |
  ContactsAddressLabel |
  ContactsPhoneLabel |

Definition at line 271 of file Contacts.h.

    00272 {
    00273     ContactsChatLabel,
    00274     ContactsAddressLabel,
    00275     ContactsPhoneLabel
    00276 } ContactsLabelType;

enum ContactsLibAllFields

Enumerator:

  contactsLastName |
  contactsFirstName |
  contactsCompany |
  contactsTitle |
  contactsPhone1 |
  contactsPhone2 |
  contactsPhone3 |
  contactsPhone4 |
  contactsPhone5 |
  contactsPhone6 |
  contactsPhone7 |
  contactsChat1 |
  contactsChat2 |
  contactsWebpage |
  contactsCustom1 |
  contactsCustom2 |
  contactsCustom3 |
  contactsCustom4 |
  contactsCustom5 |
  contactsCustom6 |
  contactsCustom7 |
  contactsCustom8 |
  contactsCustom9 |
  contactsAddress1 |
  contactsCity1 |
  contactsState1 |
  contactsZipCode1 |
  contactsCountry1 |
  contactsAddress2 |
  contactsCity2 |
  contactsState2 |
  contactsZipCode2 |
  contactsCountry2 |
  contactsAddress3 |
  contactsCity3 |
  contactsState3 |
  contactsZipCode3 |
  contactsCountry3 |
  contactsNote |
  contactsBirthdate |
  contactsBirthdayMask |
  contactsBirthdayPreset |
  contactsPicture |
  contactsUniqueID |
  contactsIndex |
  contactsCategoryID |
  contactsPrivate |
  contactsBusy |
  contactsDirty |
  contactsRingtoneInfo |
  contactsAnniversaryDate |
  contactsAnniversaryMask |
  contactsAnniversaryPreset |
  contactsNumFields |

Definition at line 128 of file Contacts.h.

    00129 {
    00130     contactsLastName,
    00131     contactsFirstName,
    00132     contactsCompany,
    00133     contactsTitle,
    00134
    00135     contactsPhone1,
    00136     contactsPhone2,
    00137     contactsPhone3,
    00138     contactsPhone4,
    00139     contactsPhone5,
    00140     contactsPhone6,
    00141     contactsPhone7,
    00142
    00143     contactsChat1,
    00144     contactsChat2,
    00145
    00146     contactsWebpage,
    00147
    00148     contactsCustom1,
    00149     contactsCustom2,
    00150     contactsCustom3,
    00151     contactsCustom4,
    00152     contactsCustom5,
    00153     contactsCustom6,
    00154     contactsCustom7,
    00155     contactsCustom8,
    00156     contactsCustom9,
    00157
    00158     contactsAddress1,
    00159     contactsCity1,
    00160     contactsState1,
    00161     contactsZipCode1,
    00162     contactsCountry1,
    00163     contactsAddress2,
    00164     contactsCity2,
    00165     contactsState2,
    00166     contactsZipCode2,
    00167     contactsCountry2,
    00168     contactsAddress3,
    00169     contactsCity3,
    00170     contactsState3,
    00171     contactsZipCode3,
    00172     contactsCountry3,
    00173
    00174     contactsNote,
    00175
    00176     contactsBirthdate,
    00177     contactsBirthdayMask,
    00178     contactsBirthdayPreset,
    00179     contactsPicture,
    00180     contactsUniqueID        = contactsPicture + 2,
    00181     contactsIndex,
    00182     contactsCategoryID,
    00183     contactsPrivate         = contactsCategoryID + 2,
    00184     contactsBusy,
    00185     contactsDirty,
    00186     contactsRingtoneInfo    = contactsDirty + 4,
    00187     contactsAnniversaryDate,
    00188     contactsAnniversaryMask,
    00189     contactsAnniversaryPreset,
    00190     contactsNumFields
    00191 } ContactsLibAllFields;

enum ContactsLibBinaryFields

Enumerator:

  contactsBinaryPictureData |
  contactsBinaryRingtoneIdentifier |

Definition at line 306 of file Contacts.h.

    00307 {
    00308     contactsBinaryPictureData           = contactsPicture,
    00309     contactsBinaryRingtoneIdentifier    = contactsRingtoneInfo
    00310 } ContactsLibBinaryFields;

enum ContactsLibCustomFields

Enumerator:

  contactsCustomCustom1 |
  contactsCustomCustom2 |
  contactsCustomCustom3 |
  contactsCustomCustom4 |
  contactsCustomCustom5 |
  contactsCustomCustom6 |
  contactsCustomCustom7 |
  contactsCustomCustom8 |
  contactsCustomCustom9 |

Definition at line 242 of file Contacts.h.

    00243 {
    00244     contactsCustomCustom1   = contactsCustom1,
    00245     contactsCustomCustom2,
    00246     contactsCustomCustom3,
    00247     contactsCustomCustom4,
    00248     contactsCustomCustom5,
    00249     contactsCustomCustom6,
    00250     contactsCustomCustom7,
    00251     contactsCustomCustom8,
    00252     contactsCustomCustom9
    00253 } ContactsLibCustomFields;

enum ContactsLibDateFields

Enumerator:

  contactsDateBirthdate |
  contactsDateAnniversary |

Definition at line 278 of file Contacts.h.

    00279 {
    00280     contactsDateBirthdate               = contactsBirthdate,
    00281     contactsDateAnniversary             = contactsAnniversaryDate
    00282 } ContactsLibDateFields;

enum ContactsLibFieldLabels

Enumerator:

  contactsNoType |
  contactsWorkPhone |
  contactsHomePhone |
  contactsFaxPhone |
  contactsOtherPhone |
  contactsEmailPhone |
  contactsMainPhone |
  contactsPagerPhone |
  contactsMobilePhone |
  contactsOtherChat |
  contactsAimChat |
  contactsMsnChat |
  contactsYahooChat |
  contactsIcqChat |
  contactsWorkAddress |
  contactsHomeAddress |
  contactsOtherAddress |

Definition at line 106 of file Contacts.h.

    00107 {
    00108     contactsNoType,
    00109     contactsWorkPhone,      // applicable to Phone1-7 fields
    00110     contactsHomePhone,      // applicable to Phone1-7 fields
    00111     contactsFaxPhone,       // applicable to Phone1-7 fields
    00112     contactsOtherPhone,     // applicable to Phone1-7 fields
    00113     contactsEmailPhone,     // applicable to Phone1-7 fields
    00114     contactsMainPhone,      // applicable to Phone1-7 fields
    00115     contactsPagerPhone,     // applicable to Phone1-7 fields
    00116     contactsMobilePhone,    // applicable to Phone1-7 fields
    00117     contactsOtherChat,      // applicable to Chat1 & Chat2 fields
    00118     contactsAimChat,        // applicable to Chat1 & Chat2 fields
    00119     contactsMsnChat,        // applicable to Chat1 & Chat2 fields
    00120     contactsYahooChat,      // applicable to Chat1 & Chat2 fields
    00121     contactsIcqChat,        // applicable to Chat1 & Chat2 fields
    00122     contactsWorkAddress,    // applicable to Address1-3 fields
    00123     contactsHomeAddress,    // applicable to Address1-3 fields
    00124     contactsOtherAddress    // applicable to Address1-3 fields
    00125 }   ContactsLibFieldLabels;

enum ContactsLibStrFields

Enumerator:

  contactsStrLastName |
  contactsStrFirstName |
  contactsStrCompany |
  contactsStrTitle |
  contactsStrPhone1 |
  contactsStrPhone2 |
  contactsStrPhone3 |
  contactsStrPhone4 |
  contactsStrPhone5 |
  contactsStrPhone6 |
  contactsStrPhone7 |
  contactsStrChat1 |
  contactsStrChat2 |
  contactsStrWebpage |
  contactsStrCustom1 |
  contactsStrCustom2 |
  contactsStrCustom3 |
  contactsStrCustom4 |
  contactsStrCustom5 |
  contactsStrCustom6 |
  contactsStrCustom7 |
  contactsStrCustom8 |
  contactsStrCustom9 |
  contactsStrAddress1 |
  contactsStrCity1 |
  contactsStrState1 |
  contactsStrZipCode1 |
  contactsStrCountry1 |
  contactsStrAddress2 |
  contactsStrCity2 |
  contactsStrState2 |
  contactsStrZipCode2 |
  contactsStrCountry2 |
  contactsStrAddress3 |
  contactsStrCity3 |
  contactsStrState3 |
  contactsStrZipCode3 |
  contactsStrCountry3 |
  contactsStrNote |

Definition at line 193 of file Contacts.h.

    00194 {
    00195     contactsStrLastName,
    00196     contactsStrFirstName,
    00197     contactsStrCompany,
    00198     contactsStrTitle,
    00199
    00200     contactsStrPhone1,          // phone fields, all can accept a label
    00201     contactsStrPhone2,
    00202     contactsStrPhone3,
    00203     contactsStrPhone4,
    00204     contactsStrPhone5,
    00205     contactsStrPhone6,
    00206     contactsStrPhone7,
    00207
    00208     contactsStrChat1,           // instant message id and service, both can accept a label
    00209     contactsStrChat2,
    00210
    00211     contactsStrWebpage,
    00212
    00213     contactsStrCustom1,         // custom fields
    00214     contactsStrCustom2,
    00215     contactsStrCustom3,
    00216     contactsStrCustom4,
    00217     contactsStrCustom5,
    00218     contactsStrCustom6,
    00219     contactsStrCustom7,
    00220     contactsStrCustom8,
    00221     contactsStrCustom9,
    00222
    00223     contactsStrAddress1,        // first set of address fields, Address1 can accept a label
    00224     contactsStrCity1,
    00225     contactsStrState1,
    00226     contactsStrZipCode1,
    00227     contactsStrCountry1,
    00228     contactsStrAddress2,        // second set of address fields, Address2 can accept a label
    00229     contactsStrCity2,
    00230     contactsStrState2,
    00231     contactsStrZipCode2,
    00232     contactsStrCountry2,
    00233     contactsStrAddress3,        // third set of address fields, Address3 can accept a label
    00234     contactsStrCity3,
    00235     contactsStrState3,
    00236     contactsStrZipCode3,
    00237     contactsStrCountry3,
    00238
    00239     contactsStrNote             // This field is assumed to be < 32K
    00240 } ContactsLibStrFields;

enum ContactsLibUInt16Fields

Enumerator:

  contactsUInt16Index |
  contactsUInt16Category |

Definition at line 284 of file Contacts.h.

    00285 {
    00286     contactsUInt16Index                 = contactsIndex,
    00287     contactsUInt16Category              = contactsCategoryID
    00288 } ContactsLibUInt16Fields;

enum ContactsLibUInt32Fields

Enumerator:

  contactsUInt32UniqueID |

Definition at line 290 of file Contacts.h.

    00291 {
    00292     contactsUInt32UniqueID              = contactsUniqueID
    00293 } ContactsLibUInt32Fields;

enum ContactsLibUInt8Fields

Enumerator:

  contactsUInt8Private |
  contactsUInt8Busy |
  contactsUInt8Dirty |
  contactsUInt8BirthdayMask |
  contactsUInt8BirthdayPreset |
  contactsUInt8AnniversaryMask |
  contactsUInt8AnniversaryPreset |

Definition at line 295 of file Contacts.h.

    00296 {
    00297     contactsUInt8Private                = contactsPrivate,
    00298     contactsUInt8Busy,
    00299     contactsUInt8Dirty,
    00300     contactsUInt8BirthdayMask           = contactsBirthdayMask,
    00301     contactsUInt8BirthdayPreset,
    00302     contactsUInt8AnniversaryMask        = contactsAnniversaryMask,
    00303     contactsUInt8AnniversaryPreset
    00304 } ContactsLibUInt8Fields;

enum ContactsLibWithLabelFields

Enumerator:

  contactsWithLabelPhone1 |
  contactsWithLabelPhone2 |
  contactsWithLabelPhone3 |
  contactsWithLabelPhone4 |
  contactsWithLabelPhone5 |
  contactsWithLabelPhone6 |
  contactsWithLabelPhone7 |
  contactsWithLabelChat1 |
  contactsWithLabelChat2 |
  contactsWithLabelAddress1 |
  contactsWithLabelAddress2 |
  contactsWithLabelAddress3 |

Definition at line 255 of file Contacts.h.

    00256 {
    00257     contactsWithLabelPhone1         = contactsPhone1,
    00258     contactsWithLabelPhone2,
    00259     contactsWithLabelPhone3,
    00260     contactsWithLabelPhone4,
    00261     contactsWithLabelPhone5,
    00262     contactsWithLabelPhone6,
    00263     contactsWithLabelPhone7,
    00264     contactsWithLabelChat1,
    00265     contactsWithLabelChat2,
    00266     contactsWithLabelAddress1       = contactsAddress1,
    00267     contactsWithLabelAddress2       = contactsAddress2,
    00268     contactsWithLabelAddress3       = contactsAddress3
    00269 } ContactsLibWithLabelFields;

enum SessionMode

Enumerator:

  ContactsLibSessionModeReadOnly |
  ContactsLibSessionModeReadWrite |

Definition at line 312 of file Contacts.h.

    00313 {
    00314     ContactsLibSessionModeReadOnly  = 0x0001,
    00315     ContactsLibSessionModeReadWrite = 0x0003
    00316 } SessionMode;

## Function Documentation

Err ContactsAddContact | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsContHandle | hContact |
| ) |  |  |

UInt16 ContactsCategoryFind | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | const Char * | pCatName |
| ) |  |  |

Err ContactsCloseSession | ( | UInt16 | libRefnum,
|  | ContactsSession | hCurSession |
| ) |  |  |

ContactsContHandle ContactsCreateHandle | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession |
| ) |  |  |

Err ContactsDeleteContact | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsContHandle | hContact,
|  | Boolean | archive |
| ) |  |  |

Boolean ContactsDoesFieldExist | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibAllFields | NameOfField |
| ) |  |  |

void* ContactsGetBinaryField | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibBinaryFields | NameOfField,
|  | UInt16 * | pDataSize |
| ) |  |  |

void ContactsGetCategoryList | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | char * | pCategoryList[ContactsNumCategories] |
| ) |  |  |

Char* ContactsGetCategoryName | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | UInt16 | categoryIndex |
| ) |  |  |

ContactsContHandle ContactsGetContact | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | UInt16 * | indexP,
|  | UInt32 * | uniqueIDP,
|  | Boolean | ignored |
| ) |  |  |

Err ContactsGetDateField | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibDateFields | NameOfField,
|  | DateType * | pFieldValue |
| ) |  |  |

Int16 ContactsGetFieldLabel | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibWithLabelFields | FieldNum |
| ) |  |  |

ContactsContHandle ContactsGetFirstContact | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | UInt16 | category |
| ) |  |  |

char* ContactsGetLabelText | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsLabelType | type,
|  | UInt16 | labelNum,
|  | UInt16 * | pSizeOfBuffer |
| ) |  |  |

Err ContactsGetLastError | ( | UInt16 | libRefnum | ) |

UInt16 ContactsGetNextCategory | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | UInt16 | currentCategory |
| ) |  |  |

ContactsContHandle ContactsGetNextContact | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsContHandle | hSourceContact,
|  | UInt16 | Category |
| ) |  |  |

UInt16 ContactsGetNumRecords | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | UInt16 | category |
| ) |  |  |

Err ContactsGetRingtoneForCategory | ( | UInt16 | libRefnum,
|  | UInt16 | categoryID,
|  | void * | tone |
| ) |  |  |

Err ContactsGetStringField | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibStrFields | NameOfField,
|  | char ** | pFieldValue |
| ) |  |  |

Err ContactsGetUInt16Field | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibUInt16Fields | NameOfField,
|  | UInt16 * | pFieldValue |
| ) |  |  |

Err ContactsGetUInt32Field | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibUInt32Fields | NameOfField,
|  | UInt32 * | pFieldValue |
| ) |  |  |

Err ContactsGetUInt8Field | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibUInt8Fields | NameOfField,
|  | UInt8 * | pFieldValue |
| ) |  |  |

UInt32 ContactsGetVersion | ( | UInt16 | libRefnum | ) |

Boolean ContactsIsEmptyContact | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsContHandle | hCont,
|  | UInt16 * | Index,
|  | UInt32 * | UniqueID |
| ) |  |  |

__inline Err ContactsLib_CloseLibrary | ( | UInt16 * | refNumP | ) |

Definition at line 452 of file Contacts.h.

References ContactsLibErrLibStillOpen.

    00453 {
    00454     Err error;
    00455
    00456     if (*refNumP == sysInvalidRefNum)
    00457     {
    00458         return sysErrParamErr;
    00459     }
    00460
    00461     error = ContactsLibClose(*refNumP);
    00462
    00463     if (error == errNone)
    00464     {
    00465         /* no users left, so unload library */
    00466         SysLibRemove(*refNumP);
    00467
    00468         *refNumP = sysInvalidRefNum;    // invalidate so caller cannot use any longer.
    00469     }
    00470     else if (error == ContactsLibErrLibStillOpen)
    00471     {
    00472         /* don't unload library, but mask "still open" from caller  */
    00473         error = errNone;
    00474     }
    00475
    00476     return error;
    00477 }

__inline Err ContactsLib_OpenLibrary | ( | UInt16 * | refNumP | ) |

Definition at line 400 of file Contacts.h.

References ContactsLibCreatorID, ContactsLibName, and ContactsLibTypeID.

    00401 {
    00402     Err error;
    00403     Boolean loaded = false;
    00404
    00405     /* first try to find the library */
    00406     error = SysLibFind(ContactsLibName, refNumP);
    00407
    00408     /* If not found, load the library instead */
    00409     if (error == sysErrLibNotFound)
    00410     {
    00411         error = SysLibLoad(ContactsLibTypeID, ContactsLibCreatorID, refNumP);
    00412         loaded = true;
    00413     }
    00414
    00415     if (error == errNone)
    00416     {
    00417         error = ContactsLibOpen(*refNumP);
    00418         if (error != errNone)
    00419         {
    00420             if (loaded)
    00421             {
    00422                 SysLibRemove(*refNumP);
    00423             }
    00424
    00425             *refNumP = sysInvalidRefNum;
    00426         }
    00427     }
    00428
    00429     return error;
    00430 }

ContactsContHandle ContactsLookUpString | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | Char * | key,
|  | Boolean | sortByCompany,
|  | UInt16 | category,
|  | Boolean * | completeMatch,
|  | UInt16 * | pNumMatchingChars,
|  | Boolean | masked |
| ) |  |  |

ContactsSession ContactsOpenSession | ( | UInt16 | libRefnum,
|  | SessionMode | mode |
| ) |  |  |

UInt16 ContactsPosInCategory | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsContHandle | hContact,
|  | UInt16 * | pIndex,
|  | UInt16 | category |
| ) |  |  |

Err ContactsReleaseHandle | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact |
| ) |  |  |

Err ContactsRenameCustomLabel | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsLibCustomFields | fieldNum,
|  | Char * | fieldLabel |
| ) |  |  |

Boolean ContactsSeekRecord | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | UInt16 * | indexP,
|  | UInt16 | offset,
|  | Int16 | direction,
|  | UInt16 | category |
| ) |  |  |

Err ContactsSetBinaryField | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibBinaryFields | NameOfField,
|  | void * | pFieldData,
|  | UInt16 | DataSize |
| ) |  |  |

void ContactsSetCategoryName | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | UInt16 | categoryIndex,
|  | const Char * | pCatName |
| ) |  |  |

Err ContactsSetDateField | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibDateFields | nameOfField,
|  | ContactsDateType | fieldValue |
| ) |  |  |

void ContactsSetFieldLabel | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hToCont,
|  | ContactsLibWithLabelFields | FieldNum,
|  | Int16 | LabelIndex |
| ) |  |  |

Err ContactsSetStringField | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibStrFields | nameOfField,
|  | char * | FieldValue |
| ) |  |  |

Err ContactsSetUInt16Field | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibUInt16Fields | NameOfField,
|  | UInt16 | FieldValue |
| ) |  |  |

Err ContactsSetUInt8Field | ( | UInt16 | libRefnum,
|  | ContactsContHandle | hContact,
|  | ContactsLibUInt8Fields | nameOfField,
|  | UInt8 | fieldValue |
| ) |  |  |

Err ContactsUpdateContact | ( | UInt16 | libRefnum,
|  | ContactsSession | hSession,
|  | ContactsContHandle | hContact |
| ) |  |  |

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:56 2008 for Palm API Guide