beautypg.com

Philips Bluetooth QuickStart Kit User Manual

Page 63

background image

Bluetooth QuickStart Kit Version 1.0 - User’s Guide

Page 63

Copyright 2004-2005 © Embedded Artists AB

B.7 Registry

API

B.7.1 regErase

void regErase( void )

Erase the entire registry.

B.7.2 regSetValue

tRegResult regSetValue( tU8* pKey, tU8 keyLen, tU8* pValue,
tU16 valueLen )

Set a value in the registry. This function is used when a new value is added to the
registry or when an old value is updated.

Parameters:

[in] pKey – the registry key associated with the value. This must be a unique value.
[in] keyLen – the length of the key in bytes.
[in] pValue – the value to set
[in] valueLen – length of the value in bytes.

Returns:

REG_RESULT_OK if the value was successfully added (or updated).

Possible error situations (what can be identified in an error code):

REG_RESULT_OK

- The function completed successfully.

REG_RESULT_KEY_LEN – The length of the key is too large.
REG_RESULT_FULL – The registry is full.
REG_RESULT_VAL_TRUNC – There was not enough space for the complete value.
It has been truncated.

B.7.3 regGetValue

tRegResult regGetValue( tU8* pKey, tU8 keyLen, tU8* pBuf, tU16

bufLen, tU16* pValueLen )

Get a value from the registry.

Parameters:

[in] pKey – the registry key associated with the value.
[in] keyLen – the length of the key in bytes.
[in] pBuf – the value is copied to this buffer
[in] bufLen – length of the buffer in bytes
[out] pValueLen – the actual length of the value is returned in this parameter.

Returns:

REG_RESULT_OK if the value was successfully retrieved.

Possible error situations (what can be identified in an error code):

REG_RESULT_OK

- The function completed successfully.

REG_RESULT_NO_KEY – The key did not exist in the registry.