VMFileHandle ContactGetDBHandle( void );
This function returns the handle of the Contact database, the database that contains all of the "address book" data used by the
contdb
library. This handle is necessary for various operations with the library. When you're done with the handle, remember to call
ContactReleaseDBHandle()
.
Include: contdb.goh
See Also: ContactGetDBHandleNoBlock(),
ContactReleaseDBHandle().
VMFileHandle ContactGetDBHandleNoBlock( void );
This function behaves in the same manner as
ContactGetDBHandle()
, except that if it cannot get the handle, it returns zero instead of waiting until the handleis available.When you're done with the handle, remember to call
ContactReleaseDBHandle()
.
Include: contdb.goh
See Also: ContactGetDBHandle().
Boolean ContactGetName(
MemHandle record,
TCHAR *dest);
This function gets the name associated with the record, filling in the dest buffer. If there was no name in the record, this function returns non-zero; otherwise, it returns zero.
Include: contdb.goh
See Also: ContactGetDBHandle().
Boolean ContactGetTrunactedName(
MemHandle record,
TCHAR *dest,
word destSize); /* Size of dest buffer */
This function gets the name associated with the record, filling in the dest buffer. It will truncate the name, as necessary to make it fit inside the buffer. Remember to leave space for the null terminator when determining how big a buffer you'll need. If there was no name in the record, this function returns non-zero; otherwise, it returns zero.
Include: contdb.goh
See Also: ContactGetDBHandle().
RecordID ContactGetUserDataID( void );
This functionreturns the
RecordID
of the special Contacts database record containing the user's own contact data.
Include: contdb.goh
See Also: FoamDBGetRecordFromID().
void ContactImportDBFromTextFile(
hptr fileImport); /* file's handle */
This function imports contact database information from an ASCII text file. This file's format is described below. The function will compare imported records to those already in the Contacts database. Any identical records will be merged.
A short sample file is shown below.
[RECORD] [FIELD] Name [FIELD-NAME] [FIELD-DATA] Hudson W. [FIELD-END] [FIELD]
Company [FIELD-NAME] [FIELD-DATA] Space Marines [FIELD-END] [FIELD] Title [FIELD-NAME] [FIELD-DATA] Private [FIELD-END] [RECORD-END]
[RECORD] [FIELD] Name [FIELD-NAME] [FIELD-DATA]
Adams, John Quincy [FIELD-END] [FIELD] Tel [FIELD-NAME] [FIELD-DATA] 1 617 438 1776 [FIELD-END] [FIELD] [FIELD-NAME] Company [FIELD-DATA] [FIELD-END] USA Government [FIELD] Notes [FIELD-NAME] Note(Birthday) [FIELD-DATA] July 11, 1767 Gift ideas: flowers [FIELD-END] [RECORD-END]
The ASCII file follows these rules:
Include: contdb.goh
See Also: ContactExportDBToTextFile().
RecordID ContactMatchName(
TCHAR name,
ContdbFieldType type,
Boolean stopEarly,
FieldID *field,
word *numMatches );
This function takes aname, searches all fields of the specified type in all records of the Contact database, returning the
RecordID
and
FieldID
of the matching field, if any; if there was no match, it returns -1.
The comparison of names does not consider case.
This function takes the following arguments:
FieldID
buffer. The function will fill this buffer in with the
FieldID
of the matching field, if any.Include: contdb.goh
See Also: ContactEnsureEmptyField(),
FoamDBSetFieldData().
GEOS SDK TechDocs
|
|
ConstructOptr() ...
|
ContactMatchNumber() ...