include/alp/hs_change_mgr.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 1999-2008 ACCESS CO., LTD. All rights reserved.
00003  * Copyright (c) 2006 PalmSource, Inc (an ACCESS company). All rights reserved.
00004  *****************************************************************************/
00011 #ifndef ALP_HS_CHANGE_MGR_H
00012 #define ALP_HS_CHANGE_MGR_H 1
00013 
00014 
00015 #include <alp/types.h>
00016 #include <alp/hs_common.h>
00017 
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00052 /*****************************************************************************
00053 * Typedefs 
00054 *****************************************************************************/
00060 typedef void*       AlpHsObjectUpdateHandle;
00061 typedef void*       AlpHsMonitorPtr;
00062 typedef struct _AlpHsMonitorPolicy AlpHsMonitorPolicy;
00063 typedef AlpHsMonitorPolicy* AlpHsMonitorPolicyPtr;
00064 struct _AlpHsMonitorPolicy {
00065     bool createConflicts;
00066 };
00067 typedef struct _AlpHsMonitorStatus AlpHsMonitorStatus;
00068 typedef AlpHsMonitorStatus* AlpHsMonitorStatusPtr;
00069 struct _AlpHsMonitorStatus {
00070     uint32_t modifiedCount, deletedCount;
00071 };
00072 typedef void*       AlpHsBatchHandle;
00073     
00075     
00076 /*****************************************************************************
00077 * Functions and Grouping Objects
00078 *****************************************************************************/
00112 alp_status_t    alp_hscm_open (const _TCHAR* nodeName, const _TCHAR* locURI, uint32_t userId, AlpHsDbPtr pDb, AlpHsChangeMgrHandle* phChgMgr);
00124 alp_status_t    alp_hscm_close(AlpHsChangeMgrHandle hChgMgr);
00125     
00127 
00128 //---------------------------------------------------------------------------
00173 alp_status_t    alp_hscm_register_data_store  (uint32_t userId, AlpHsDataStoreRegistrationPtr pReg);
00186 alp_status_t    alp_hscm_unregister_data_store(const _TCHAR* nodeName, uint32_t userId, const _TCHAR* locURI);
00187 
00189 #if !defined(WIN32)
00190 //---------------------------------------------------------------------------
00223 alp_status_t    alp_hscm_register_comparator      (uint32_t userId, AlpHsObjectComparatorInfoPtr pCmp);
00233 alp_status_t    alp_hscm_unregister_comparator    (uint32_t userId, const _TCHAR* cmpId);
00247 alp_status_t    alp_hscm_set_preferred_comparator (uint32_t userId, const _TCHAR* cmpId);
00248 
00250 #endif
00251 //---------------------------------------------------------------------------
00252 
00332 alp_status_t alp_hscm_acquire_object_monitor   (AlpHsChangeMgrHandle    hChgMgr,
00333                                                 AlpLuid                 objLuid,
00334                                                 AlpHsMonitorPolicyPtr   pPolicy,
00335                                                 AlpHsMonitorPtr*        ppMonitor
00336                                                 );
00350 alp_status_t alp_hscm_acquire_datastore_monitor(AlpHsChangeMgrHandle    hChgMgr,
00351                                                 AlpHsMonitorPolicyPtr   pPolicy,
00352                                                 AlpHsMonitorPtr*        ppMonitor
00353                                                 );
00366 alp_status_t alp_hscm_set_monitor_policy       (AlpHsMonitorPtr         pMonitor,
00367                                                 AlpHsMonitorPolicyPtr   pPolicy
00368                                                 );
00381 alp_status_t alp_hscm_get_monitor_policy       (AlpHsMonitorPtr         pMonitor,
00382                                                 AlpHsMonitorPolicyPtr   pPolicy
00383                                                 );
00406 alp_status_t alp_hscm_get_monitor_status       (AlpHsChangeMgrHandle    hChgMgr,
00407                                                                                                 AlpHsMonitorPtr         pMonitor,
00408                                                 AlpHsMonitorStatusPtr   pStatus
00409                                                 );
00422 alp_status_t alp_hscm_release_monitor          (AlpHsChangeMgrHandle    hChgMgr,
00423                                                                                                 AlpHsMonitorPtr         pMonitor);
00491 alp_status_t alp_hscm_begin_modify(AlpHsChangeMgrHandle     hChgMgr,
00492                                    AlpHsObjectState         state,
00493                                    AlpHsMonitorPtr          pMonitor,
00494                                    AlpLuidPtr               pId,
00495                                    AlpLuid                  localForwardingAddress,
00496                                    AlpHsObjectUpdateHandle* pHandle
00497                                    );
00519 alp_status_t alp_hscm_begin_create_with_external_guid(AlpHsChangeMgrHandle     hChgMgr,
00520                                                       AlpHsMonitorPtr          pMonitor,
00521                                                       AlpGuidPtr               pExternalGuid,
00522                                                       AlpLuidPtr               pNewLuid,
00523                                                       AlpHsObjectUpdateHandle* pHandle
00524                                                       );
00525 
00549 alp_status_t alp_hscm_begin_create_with_extended_guid(AlpHsChangeMgrHandle     hChgMgr,
00550                                                       AlpHsMonitorPtr          pMonitor,
00551                                                       unsigned int             luidCount,
00552                                                       AlpLuidPtr               pLuids,
00553                                                       AlpLuidPtr               pNewLuid,
00554                                                       AlpHsObjectUpdateHandle* pHandle
00555                                                       );
00589 alp_status_t alp_hscm_end_modify (AlpHsObjectUpdateHandle hChgMgr, bool modifySucceeded, AlpHsMonitorPtr* ppObjectMonitor);
00590 
00631 alp_status_t alp_hscm_begin_modify_batch(AlpHsChangeMgrHandle   hChgMgr, AlpHsBatchHandle* phBatch);
00659 alp_status_t alp_hscm_join_modify_batch (AlpHsChangeMgrHandle   hChgMgr, AlpHsBatchHandle hBatch);
00682 alp_status_t alp_hscm_end_modify_batch  (AlpHsChangeMgrHandle   hChgMgr,
00683                                          bool                   batchSucceeded);
00685 //---------------------------------------------------------------------------
00686 
00712 alp_status_t    alp_hscm_purge_obsolete_versions(AlpHsChangeMgrHandle hChgMgr);
00713 
00733 alp_status_t    alp_hscm_purge_deleted_objects    (AlpHsChangeMgrHandle hChgMgr);
00748 alp_status_t    alp_hscm_get_deleted_objects_size (AlpHsChangeMgrHandle hChgMgr,
00749                                                    uint32_t*            pTotalSize
00750                                                   );
00760 alp_status_t    alp_hscm_purge_all_objects        (AlpHsChangeMgrHandle hChgMgr);
00761 
00763 
00793 alp_status_t    alp_hscm_query_object_luids(AlpHsChangeMgrHandle hChgMgr,
00794                                             bool                 skipDeletes,
00795                                             bool                 skipObsoleteVersions,
00796                                             uint32_t*            pLuidCount,
00797                                             AlpLuidPtr           pLuidArray
00798                                             );
00800 
00802 
00803 #ifdef __cplusplus
00804 }
00805 #endif
00806 
00807 #endif // ALP__HS_CHANGE_MGR_H

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

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