Registering Datastores
[API's]


Detailed Description

These functions are used to register local datastores with the ChangeMgr. Registrations persist until the DataStore is explicity unregistered. Once a DataStore is registered, HotSync will include its data in subsequent syncs.

Each datastore is identified by a unique local URI, or locURI, that is relative to the device. For example the URI, "./alp/PIM/Contacts/Content" might identify the contacts datastore on an ALP device.

When a local datastore registers it must specify a unique target URI. HotSync will sync data from the datastore with remote datastores that specify the same target URI.

The ChangeMgr provides a basic object change notification mechanism for any datastore that registers a non-NULL notifyType string. Whenever an object in the datastore is successfully modified, the ChangeMgr sends a notification via the Notification Manager to any subscribers registered for notifications with the datastore's notifyType. A process that plans to make a sequence of modifications can cause a single notification to be sent for the entire sequence by using the ChangeMgr's batch modify API. AlpDatamodelChangeData specifies the notification structure. For a single modification, the notification specifies the type of change made (e.g., delete, modify or create) and the local id of the object affected. For batched modifications, the notification specifies the number of changes made. There are no uniqueness constraints for a datastore's notifyType; for example, multiple datastores may specify the same notifyType if this is convenient for users. Please refer to the datastore's design documentation for the specific notifyType string and notification usage.


Functions

alp_status_t alp_hscm_register_data_store (uint32_t userId, AlpHsDataStoreRegistrationPtr pReg)
 Register a datastore with the ChangeMgr.
alp_status_t alp_hscm_unregister_data_store (const _TCHAR *nodeName, uint32_t userId, const _TCHAR *locURI)
 Unregister a datastore with the ChangeMgr (NOTE: this function is not implemented).


Function Documentation

alp_status_t alp_hscm_register_data_store uint32_t  userId,
AlpHsDataStoreRegistrationPtr  pReg
 

Register a datastore with the ChangeMgr.

Parameters:
[in] userId Desktop only. Should be set to zero for ALP.
[in] pReg The datastore's registration.
Returns:
If successful returns ALP_STATUS_HOTSYNC_OK; otherwise returns an error.

alp_status_t alp_hscm_unregister_data_store const _TCHAR *  nodeName,
uint32_t  userId,
const _TCHAR *  locURI
 

Unregister a datastore with the ChangeMgr (NOTE: this function is not implemented).

Parameters:
[in] nodeName Desktop only. On ALP, this parameter must be set to ALP_HS_DEFAULT_NODE_NAME.
[in] userId Desktop only. Should be set to zero on ALP.
[in] locURI The datastore's locURI.
Returns:
Returns ALP_STATUS_HOTSYNC_NOT_IMPL.


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.