RecordID ContactMatchNumber(
TCHAR number,
ContdbCallType type,
FieldID *field,
word *numMatches );
This function takes a phone number, 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.
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().
void ContdbRecreateFieldLabel(
TCHAR *subLabel,
TCHAR *destination,
int fieldType);
This utility function takes a field sub-label (e.g., "GSM/PCN") and field type and creates a label from them (e.g. "Tel(GSM)". It will translate standard labels from English to the user's language. (Some field sublabels are standard, such as the "GSM" in "Tel(GSM)" and will be translated; the user's custom sublabels will not be translated.) This function takes the following arguments:
ContdbFieldType
value of the field.Include: contdb.goh
See Also: ContactImportDBFromTextFile().
void ContactReleaseDBHandle( void );
This function releases the Contact database's handle, signalling that the application is done with the database for now.
Include: contdb.goh
See Also: ContactGetDBHandle(),
ContactReleaseDBHandle().
dword ContactSaveRecord(
MemHandle record);
This functionsaves the passed record in the database, inserting it in the proper sort order. It returns the record's
RecordID
number.
Include: contdb.goh
See Also: FoamDBDiscardRecord(),
FoamDBDeleteRecord().
void ContactSetTemplateRecord(
MemHandle record);
This functionmakes the passed record the Contact database's template record. It also frees that contact's handle.
Include: contdb.goh
See Also: ContactCreateRecordFromTemplate().
void ContdbTranslateSubFieldLabelToEnglish(
TCHAR *subLabel,
TCHAR *destination);
This function translates a foreign sub-label to its english equivalent. This function only recognizes certain "standard" sublabels; the user's custom labels will not be translated. This function takes two arguments: a buffer containing the string to translate and a string buffer to hold the translation.
See Also: DBAllocUngrouped().
DataStoreStructureError DataStoreAddField(
word dsToken,
FieldDescriptor *fieldDescPtr,
FieldID *fieldIDPtr);
Adds a field to the datastore and writes the new field's
FieldID
to fieldIDPtr. Returns a
DataStoreStructureError
value (DSSE_NO_ERROR if successful). Takes the following arguments:
FieldDescriptor
structure. Set FD
_flags
to FF_PRIMARY_KEY if the field is part of the key. typedef struct {
FieldData FD_data;
TCHAR *FD_name;
} FieldDescriptor;
typedef struct {
FieldType FD_type;
FieldCategory FD_category;
FieldFlags FD_flags;
} FieldData;
FieldID
of the added field.Include: datastor.h
DataStoreStructureError DataStoreBuildIndex(
word dsToken,
MemHandle *indexBlockHan,
word dataSize,
DataStoreIndexCallbackParams *paramsPtr,
sword _pascal (*CallbackRoutine) (
word dsToken,
DataStoreIndexCallbackParams *paramsPtr));
Builds an index of
RecordNum
s (low word only) based on either a specified field or a callback function. Returns a
DataStoreStructureError
value (DSSE_NO_ERROR if successful). Takes the following arguments:
DataStoreIndexCallbackParams
structure. To build an index on a field, specify the field in DSICP
_indexField
. Set DSICP
_sortOrder
to SO_ASCENDING or SO_DESCENDING. If you specify a callback, the caller will pass DSICP
_cbData
, DSICP
_rec1
and DSICP
_rec2
to the callback. typedef struct {
FieldID DSICP_indexField;
SortOrder DSICP_sortOrder;
void *DSICP_cbData;
RecordHeader *DSICP_rec1;
RecordHeader *DSICP_rec1;
} DataStoreIndexCallbackParams;
DSICP_rec1
comes before
DSICP_rec2
1 if
DSICP_rec1
comes after
DSICP_rec2
Warnings: Cannot call this routine on datastores that contain more than 4,000 records (will return DSSE_INDEX_RECORD_NUMBER_LIMIT_EXCEEDED).
Include: datastor.h
DataStoreError DataStoreClose(
word dsToken); /* session token to opened datastore */
Closes the datastore if no other application has it open; otherwise, closes the "session" associated with
dsToken
. Returns a
DataStoreError
value (DSE_NO_ERROR if successful).
Warnings: Returns DSE_CLOSE_WITH_LOCKED_RECORD if the calling session has a record locked.
Include: datastor.h
GEOS SDK TechDocs
|
|
ContactGetDBHandle() ...
|
DataStoreCreate() ...