Up: GEOS SDK TechDocs | Up | Prev: ClipboardSetQuickTransferFeedback() ... | Next: ContactGetDBHandle() ...

ConstructOptr()

optr	ConstructOptr(
        Handle 		han,
        ChunkHandle 		ch);

This macro constructs an optr type from the given handle (typically a MemHandle) and chunk handle.

See Also: HandleToOptr(), OptrToHandle(), OptrToChunk().

ContactCompareNumbers()

Boolean 	ContactCompareNumbers(
        TCHAR *number1, 
        TCHAR *number2);

This function compares two phone number strings for equivalence. It ignores extraneous characters such as spaces. It returns zero if they are the same number, otherwise it returns a non-zero value.

Include: contdb.goh

ContactCreateRecordFromTemplate()

MemHandle	 ContactCreateRecordFromTemplate( void );

This function creates a new Contact record in the Contacts database. It returns the handle of the new record. Make any desired changes to the record and then call ContactSaveRecord() to save the record or FoamDBDiscardRecord() to discard changes.

Include: contdb.goh

See Also: ContactSaveRecord(), ContactSetTemplateRecord().

ContactEnsureEmptyField()

FieldID	ContactEnsureEmptyField( 
        MemHandle 		record,
        optr 		fieldName,
        ContdbFieldType		fieldType);

This function creates a field in a record, and clears the dat from the existing field of that name if one already existed. This function takes the following arguemnts:

record
The handle of the record, as returned by FoamDBGetRecordFromID() or ContactCreateRecordFromTemplate() .
fieldName
optr of a chunk containing the null-terminated name string, or NullOptr to use the default name for the passed ContdbFieldType .
fieldType
The type of field to find. One of CFT_NAME, CFT_COMPANY CFT_TITLE, CFT_ADDRESS, CFT_PHONE, CFT_FAX, CFT_EMAIL, CFT_DTMF, CFT_NOTES.

Include: contdb.goh

See Also: ContactEnsureField(), FoamDBSetFieldData().

ContactEnsureField()

FieldID	ContactEnsureField( 
        MemHandle 		record,
        optr 		fieldName,
        ContdbFieldType		fieldType);

This functionreturns the FieldID of a field within a record, or creates the field if it doesn't find it. This function takes the following arguemnts:

record
The handle of the record, as returned by FoamDBGetRecordFromID() or ContactCreateRecordFromTemplate() .
fieldName
optr of a chunk containing the null-terminated name string, or NullOptr to use the default name for the passed ContdbFieldType .
fieldType
The type of field to find. One of CFT_NAME, CFT_COMPANY CFT_TITLE, CFT_ADDRESS, CFT_PHONE, CFT_FAX, CFT_EMAIL, CFT_DTMF, CFT_NOTES.

Include: contdb.goh

See Also: ContactEnsureEmptyField(), FoamDBSetFieldData().

ContactExportDBToTextFile()

ContactExportStatus 	ContactExportDBToTextFile(
        hptr 	fileExport,
        dword 	startElement,
        dword 	numOfRecords);

This function exports the Contact database's data as an ASCII file. On success, the function returns CES_NO_ERROR, otherwise it returns CES_FILE_ERROR. This function takes the following arguments:

fileExport
The handle of the opened file to hold the exported text.
startElement
The RecordID of the first record to export.
numOfRecords
This argument determines the range of records to export. All records with RecordID at least startElement but less than startElement+numOfRecords will be exported.

To export all the records, pass a startElement of zero and a numOfRecords of CONTACT_EXPORT_ALL_RECORDS.

Include: contdb.goh

See Also: ContactExportDBToTextFile().


Up: GEOS SDK TechDocs | Up | Prev: ClipboardSetQuickTransferFeedback() ... | Next: ContactGetDBHandle() ...