Up: GEOS SDK TechDocs | Up | Prev: ImpexExportToMetafile() ... | Next: InitFileReadStringBlock() ...

InitFileEnumStringSection()

Boolean	InitFileEnumStringSection(
        const char *		category,
        const char *		key,
        InitFileReadFlags		flags,
        Boolean _pascal (*callback)		(const char *				stringSection,
        		 word 				sectionNum,
        		 void *				enumData),
        void *		enumdata);

This routine enumerates a particular blob, allowing a callback routine to process each of the string sections in it. The routine will stop processing either after the last string section or when the callback routine returns true .

Pass this routine the following:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be enumerated.
flags
A record of InitFileReadFlags indicating the method of character conversion upon reading (upcase all, downcase all, do not change).
callback
A pointer to a Boolean callback routine. The callback routine is described below.
enumData
This pointer is passed unchanged to the callback routine. InitFileEnumStringSection() does not use it.

This routine returns a Boolean value. It returns true if the callback routine halted the enumeration by returning true ; otherwise, it returns false .

Callback Routine:

The callback routine may do anything it wants with the string section it receives. It must be declared _pascal. It must return a Boolean value: If it returns true , InitFileEnumStringSection() will stop processing the blob. If it returns false , processing will continue to the next string section, if any. The callback will receive the following parameters:

stringSection
A pointer to the null-terminated string section to be processed.
sectionNum
The zero-based number of the string section currently being processed.
enumData
A pointer passed through from the caller of InitFileEnumStringSection() .

Include: initfile.h

InitFileGetTimeLastModified()

dword	InitFileGetTimeLastModified(void);

This routine returns the time when the GEOS.INI file was last modified. The returned time is the value of the system counter when the file was last written.

Include: initfile.h

InitFileMakeCanonicKeyCategory()

void       InitFileMakeCanonicKeyCategory(
	char 		*keyCat, 
	const TCHAR 	*src);

Converts a SBCS/DBCS (depending on GEOS version) string to an ASCIIX string without special INI characters. This is used to convert any type of string to one suitable for use as an INI file key or category.

Pass:

keyCat
The unconverted SBCS/DBCS string.
src
The buffer for the converted SBCS ASCII hex string. If keyCat is SBCS, then src should be the same length as keyCat (including the NULL terminator); otherwise, if keyCat is DBCS then src should point to a buffer which is twice as long as keyCat (including its NULL terminator).

Include: initfile.h

Version: This routine is available on builds 4 or greater of the Nokia 9000i Communicator (see the Versions chapter for more information).

InitFileReadBoolean()

Boolean	InitFileReadBoolean(
        const char *		category,
        const char *		key,
        Boolean *		bool);

This routine reads a Boolean entry in the GEOS.INI file, copying it into a passed buffer. It returns the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteBoolean() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
bool
A pointer to a Boolean variable in which the Boolean value will be returned.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Warnings: The return value of this function is not the Boolean stored in the GEOS.INI file. That value is returned in the Boolean pointed to by bool .

Include: initfile.h

InitFileReadDataBlock()

Boolean	InitFileReadDataBlock(
        const char *		category,
        const char *		key,
        MemHandle *		block,
        word *		dataSize);

This routine reads an entry in the GEOS.INI file, allocating a new block and copying the data into it. The routine returns the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteData() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
block
A pointer to a null memory handle. This pointer will point to the newly-allocated block handle upon return. The data read will be in the new block. It is your respojnsibility to free this block when you're done with it.
dataSize
The size of the read data. All the data will be read; the block will be as large as necessary.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Include: initfile.h

InitFileReadDataBuffer()

Boolean	InitFileReadDataBuffer(
        const char *		category,
        const char *		key,
        void *		buffer,
        word		bufSize,
        word *		dataSize);

This routine reads an entry in the GEOS.INI file, copying it into a passed buffer. It returns the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteData() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
buffer
A pointer to the buffer in which the data will be returned. This buffer must be in locked or fixed memory.
bufSize
The size of the passed buffer in bytes. If you are not sure what the data's size will be, you may want to use the (slightly less efficient) InitFileReadDataBlock() .
dataSize
A pointer to a word; on return, the word pointed to will contain the size (in bytes) of the data returned.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Include: initfile.h

InitFileReadInteger()

Boolean	InitFileReadInteger(
        const char *		category,
        const char *		key,
        word *		i);

This routine reads an integer entry in the GEOS.INI file, copying it into the passed variable. It returns the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteInteger() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
i
A pointer to a word in which the integer will be returned.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Include: initfile.h


Up: GEOS SDK TechDocs | Up | Prev: ImpexExportToMetafile() ... | Next: InitFileReadStringBlock() ...