Reading Datastore Meta-Data
[API's]


Detailed Description

These functions are used to read capabilities and WBXML string tables from an open datastore. They simply call the corresponding datastore functions.


Functions

alp_status_t alp_hscm_is_version_current (AlpHsChangeMgrHandle hChgMgr, AlpHsDataStoreVersionType type, uint32_t version, bool *pIsCurrent)
 Determine whether the input content type capabilities or string table version is current for an open datastore.
alp_status_t alp_hscm_read_capabilities (AlpHsChangeMgrHandle hChgMgr, uint32_t *pCurrentVersion, size_t *pSize, _TCHAR *pBuf)
 Read content type capabilities from an open datastore.
alp_status_t alp_hscm_read_string_table (AlpHsChangeMgrHandle hChgMgr, AlpHsObjectTypePtr pObjType, uint32_t *pCurrentVersion, size_t *pSize, _TCHAR *pBuf)
 Read an open datastore's WBXML string table for the input object type.


Function Documentation

alp_status_t alp_hscm_is_version_current AlpHsChangeMgrHandle  hChgMgr,
AlpHsDataStoreVersionType  type,
uint32_t  version,
bool *  pIsCurrent
 

Determine whether the input content type capabilities or string table version is current for an open datastore.

The datastore implementer is required to change the version number of its capabilities or string table each time the underlying information is changed. This function allows the caller to determine whether its stored value for the datastore's capabilities or string table version is still current. When this function returns false, the updated information and version number are available from either alp_hscm_read_capabilities() or alp_hscm_read_string_table().

Parameters:
[in] hChgMgr Handle to a ChangeMgr open for a datastore
[in] type Indicates which version to check
[in] version The stored version value
[out] pIsCurrent The return value
Returns:
If successful returns ALP_STATUS_HOTSYNC_OK; otherwise returns an error.
See also:
alp_hscm_read_capabilities(), alp_hscm_read_string_table().

alp_status_t alp_hscm_read_capabilities AlpHsChangeMgrHandle  hChgMgr,
uint32_t *  pCurrentVersion,
size_t *  pSize,
_TCHAR *  pBuf
 

Read content type capabilities from an open datastore.

This function reads a datastore's content type capabilities. The returned version number may be used to determine whether the capabilities are changed later (see alp_hscm_is_version_current()).

Parameters:
[in] hChgMgr Handle to a ChangeMgr open for a datastore
[out] pCurrentVersion The current capabilities version
[in,out] pSize On input the size of *pBuf; on output the number of bytes written to pBuf
[in,out] pBuf The datastore's content type capabilities
Remarks:
The caller is responsible for allocating pBuf. The correct size can be found by calling this function with pBuf equal to zero.

The name of this function is somewhat misleading. The return value should conform to the OMA DS DevInfo DTD for the Datastore element. The content type capabilities are actually embedded in CTCap elements within the Datastore element.

The Change Manager calls alp_hsds_read_capabilities() to implement this function.

Returns:
If successful returns ALP_STATUS_HOTSYNC_OK; otherwise returns an error.
See also:
alp_hscm_is_version_current().

alp_status_t alp_hscm_read_string_table AlpHsChangeMgrHandle  hChgMgr,
AlpHsObjectTypePtr  pObjType,
uint32_t *  pCurrentVersion,
size_t *  pSize,
_TCHAR *  pBuf
 

Read an open datastore's WBXML string table for the input object type.

Parameters:
[in] hChgMgr Handle to a ChangeMgr open for a datastore
[in] pObjType The input object type
[out] pCurrentVersion The current string table version
[in,out] pSize On input the size of *pBuf; on output the number of bytes written to pBuf
[in,out] pBuffer The datastore's string table for the input object type
Remarks:
The caller is responsible for allocating pBuf. The correct size can be found by calling this function with pBuf equal to zero.

The Change Manager calls alp_hsds_read_string_table() to implement this function.

Returns:
If successful returns ALP_STATUS_HOTSYNC_OK; otherwise returns an error.
See also:
alp_hscm_read_capabilities().


Generated on Wed Jul 30 07:06:41 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.