To use the write modified object API with a ChangeMgr that is opened for server sync, set the state, local and external fields of AlpHsObject instead of the global fields. In particular set the localId to the correct local id or zero, set the external id to zero or the server's object id, set state to the correct state and set localForwardingAddress to the new forwarding address or zero. If the server resolved a conflict for the specified object by merging content, then set isDominant to true, otherwise set it to false. The other fields do not need to be initialized. The ChangeMgr will assign a new id if necessary and use the stored server information to compute the object's pedigree. When the object's state is kObjectStateNew, the ChangeMgr will add an entry to its map table that contains the specified external id and the object's new local id. alp_hscm_write_next_modified_object() will fill in the remote fields of the input object, namely the globalId, globalForwardingAddress and (global) priority.
Functions | |
| alp_status_t | alp_hscm_get_last_anchors (AlpHsChangeMgrHandle hChgMgr, AlpHsAnchorPtr pLocalAnchor, AlpHsServerAnchor serverAnchor, AlpHsPedigreePtr *ppCoverage) |
| Retrieves the coverage, last local anchor and last server anchor values for an open datastore. | |
| alp_status_t | alp_hscm_get_next_anchor (AlpHsChangeMgrHandle hChgMgr, AlpHsAnchorPtr pNextAnchor) |
| Retrieves the local next anchor value for the current server. | |
| alp_status_t | alp_hscm_get_next_id_mapping (AlpHsIdMapIteratorPtr pIter, AlpHsServerId externalId, AlpLuidPtr pLuid) |
| Gets the next id mapping from an id map iterator. | |
| alp_status_t | alp_hscm_is_refresh_required (AlpHsChangeMgrHandle hChgMgr, bool *pIsRequired) |
| alp_status_t | alp_hscm_open_for_server_sync (const _TCHAR *syncMgrLocURI, const _TCHAR *nodeId, const _TCHAR *serverId, uint32_t userId, void *pContext, AlpHsObjectComparatorFnPtr cmpObjs, AlpHsChangeMgrHandle *phChgMgr) |
| Open the ChangeMgr for synchronization with a standard SyncML server. | |
| alp_status_t | alp_hscm_query_server_id_map (AlpHsChangeMgrHandle hChgMgr, const _TCHAR *locURI, AlpHsIdMapIteratorPtr *ppIter) |
| Retrieve an iterator over the current server's id map for the specified datastore. | |
| alp_status_t | alp_hscm_register_server (AlpHsServerRegistrationPtr pReg) |
| Register a new server. | |
| alp_status_t | alp_hscm_reset_last_anchors (AlpHsChangeMgrHandle hChgMgr) |
| Resets the last anchor values for the current server and datastore. | |
| alp_status_t | alp_hscm_set_last_anchors (AlpHsSnapshotHandle hSnapshot, bool delMapEntries) |
| Updates coverage and anchor values for an open datastore and server. | |
| alp_status_t | alp_hscm_set_next_server_anchor (AlpHsSnapshotHandle hSnapshot, const _TCHAR *locURI, AlpHsSyncType syncType, AlpHsServerAnchor nextServerAnchor) |
| Records the server's next anchor value for the specified datastore in the input snapshot. | |
|
||||||||||||||||||||
|
Retrieves the coverage, last local anchor and last server anchor values for an open datastore. This API retrieves the coverage, last local anchor and last server anchor values for the current server and datastore. It is used to retrieve the last anchor values for each datastore to be included in the sync. The coverage returned should be used as the bottom cover when the current datastore is added to the sync snapshot.
|
|
||||||||||||
|
Retrieves the local next anchor value for the current server. This API returns the next value of the current server's local clock. This is the the next anchor value for each local datastore to be included in the next sync with the current server.
|
|
||||||||||||||||
|
Gets the next id mapping from an id map iterator.
|
|
||||||||||||
|
|
|
||||||||||||||||||||||||||||||||
|
Open the ChangeMgr for synchronization with a standard SyncML server. This API opens the ChangeMgr for syncing to a previously registered SyncML server.
|
|
||||||||||||||||
|
Retrieve an iterator over the current server's id map for the specified datastore.
|
|
|
Register a new server. This API registers the input server with the ChangeMgr and creates a new clock for the server.
|
|
|
Resets the last anchor values for the current server and datastore. This API clears the anchors and coverage pedigrees for the current open datastore and server. It is typically called when a slow sync is necessary with the current server.
|
|
||||||||||||
|
Updates coverage and anchor values for an open datastore and server. This function is normally called after a successful server sync. It is used to update the coverage and anchor information used for fast synchronization with the current server. It performs the following tasks atomically:
|
|
||||||||||||||||||||
|
Records the server's next anchor value for the specified datastore in the input snapshot.
|
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.