OpenClovis Logo

clCkptApi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 /*******************************************************************************
20  * ModuleName : ckpt
21  * File : clCkptApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  * File : clCkptApi.h
27 * This file contains Checkpoint service APIs defined by SAF
28 *
29 *
30 *****************************************************************************/
31 
44 #ifndef _CL_CKPT_API_H_
45 #define _CL_CKPT_API_H_
46 
47 # ifdef __cplusplus
48 extern "C" {
49 # endif
50 
51 #include <clCommon.h>
52 #include <clIocApi.h>
53 
54 /********************************
55  C O N S T A N T S
56 ********************************/
57 
61 #define CL_CKPT_WR_ALL_REPLICAS 0X1
62 
66 #define CL_CKPT_WR_ACTIVE_REPLICA 0X2
67 
71 #define CL_CKPT_WR_ACTIVE_REPLICA_WEAK 0X4
72 
73 
77 #define CL_CKPT_CHECKPOINT_COLLOCATED 0X8
78 
82 #define CL_CKPT_DISTRIBUTED 0X10
83 
86 #define CL_CKPT_WR_ALL_SAFE 0X20
87 
91 #define CL_CKPT_ALL_OPEN_ARE_REPLICAS 0x40
92 
97 #define CL_CKPT_PEER_TO_PEER_REPLICA 0x80
98 
105 #define CL_CKPT_PEER_TO_PEER_CACHE_DISABLE 0x100
106 
110 #define CL_CKPT_CHECKPOINT_READ 0X1
111 
115 #define CL_CKPT_CHECKPOINT_WRITE 0X2
116 
120 #define CL_CKPT_CHECKPOINT_CREATE 0X4
121 
125 #define CL_CKPT_DEFAULT_SECTION_ID {0, NULL}
126 
129 #define CL_CKPT_GENERATED_SECTION_ID {0, NULL}
130 
131 
132 
136 typedef ClHandleT ClCkptSvcHdlT;
137 
141 typedef ClHandleT ClCkptHdlT;
142 
146 typedef ClHandleT ClCkptSecItrHdlT;
147 
151 typedef ClUint32T ClCkptCreationFlagsT;
152 
156 typedef ClUint32T ClCkptOpenFlagsT;
160 typedef ClUint32T ClCkptSelectionObjT;
161 
165 typedef struct {
166 
170  ClCkptCreationFlagsT creationFlags;
171 
176 
181 
185  ClUint32T maxSections;
186 
191 
197 
201 typedef struct {
202 
206  ClUint16T idLen;
207 
211  ClUint8T *id;
212 
214 
218 typedef struct {
219 
224 
230 
234 typedef enum {
235 
240 
246 
250 typedef struct {
251 
256 
261 
266 
271 
277 
281 typedef enum {
305 
309 typedef struct {
310 
315 
319  ClPtrT dataBuffer;
320 
325 
330 
336 
340 typedef struct {
341 
346 
350  ClUint32T numberOfSections;
351 
355  ClUint32T memoryUsed;
357 
404  ClCkptHdlT ckptHdl,
405  ClNameT *pName,
406  ClCkptIOVectorElementT *pIOVector,
407  ClUint32T numSections,
408  ClPtrT pCookie );
464  ClInvocationT invocation,
465  ClCkptHdlT checkpointHandle,
466  ClRcT error);
467 
512  ClInvocationT invocation,
513  ClRcT error);
514 
518 typedef struct {
519 
524 
530 
531 
568 extern ClRcT clCkptInitialize( CL_OUT ClCkptSvcHdlT *ckptSvcHandle, /* Checkpoint service handle */
569  CL_IN const ClCkptCallbacksT *callbacks, /* Optional callbacks */
570  CL_INOUT ClVersionT *version); /* Version */
571 
572 
573 
574 
611 extern ClRcT clCkptFinalize( CL_IN ClCkptSvcHdlT ckptHandle);
612 
670 extern ClRcT clCkptCheckpointOpen( CL_IN ClCkptSvcHdlT ckptHandle, /* Service handle */
671  CL_IN const ClNameT *ckeckpointName, /* Name of the checkpoint */
672  CL_IN const ClCkptCheckpointCreationAttributesT *checkpointCreationAttributes,
673  CL_IN ClCkptOpenFlagsT checkpointOpenFlags, /* Open flags */
674  CL_IN ClTimeT timeout, /* Time out */
675  CL_IN ClCkptHdlT *checkpointHandle); /* Return handle */
676 
677 
678 
714 extern ClRcT clCkptCheckpointOpenAsync( CL_IN ClCkptSvcHdlT ckptHandle,
715  CL_IN ClInvocationT invocation,
716  CL_IN const ClNameT *checkpointName,
717  CL_IN const ClCkptCheckpointCreationAttributesT *checkpoiNtCreationAttributes,
718  CL_IN ClCkptOpenFlagsT checkpointOpenFlags);
719 
761 extern ClRcT clCkptCheckpointClose(CL_IN ClCkptHdlT checkpointHandle);
762 
811 extern ClRcT clCkptCheckpointDelete( CL_IN ClCkptSvcHdlT ckptHandle, /* checkpoint svc handle */
812  CL_IN const ClNameT *checkpointName);
813 
838 extern ClRcT clCkptCheckpointRetentionDurationSet( CL_IN ClCkptHdlT checkpointHandle,
839  CL_IN ClTimeT retentionDuration);
840 
862 extern ClRcT clCkptActiveReplicaSet(CL_IN ClCkptHdlT checkpointHandle);
863 
900 extern ClRcT clCkptCheckpointStatusGet( CL_IN ClCkptHdlT checkpointHandle,
901  CL_OUT ClCkptCheckpointDescriptorT *checkpointStatus);
960 extern ClRcT clCkptSectionCreate( CL_IN ClCkptHdlT checkpointHandle,
961  CL_IN ClCkptSectionCreationAttributesT *sectionCreationAttributes,
962  CL_IN const ClUint8T *initialData,
963  CL_IN ClSizeT initialDataSize);
964 
965 
1006 extern ClRcT clCkptSectionDelete( CL_IN ClCkptHdlT checkpointHandle,
1007  CL_IN const ClCkptSectionIdT *sectionId);
1008 
1040 extern ClRcT clCkptSectionExpirationTimeSet( CL_IN ClCkptHdlT checkpointHandle,
1041  CL_IN const ClCkptSectionIdT* sectionId,
1042  CL_IN ClTimeT expirationTime);
1077 extern ClRcT clCkptSectionIterationInitialize( CL_IN ClCkptHdlT checkpointHandle,
1078  CL_IN ClCkptSectionsChosenT sectionsChosen,
1079  CL_IN ClTimeT expirationTime,
1080  CL_OUT ClHandleT *sectionIterationHandle);
1081 
1113 extern ClRcT clCkptSectionIterationNext( CL_IN ClHandleT sectionIterationHandle,
1114  CL_OUT ClCkptSectionDescriptorT *sectionDescriptor);
1115 
1144 extern ClRcT clCkptSectionIterationFinalize(CL_IN ClHandleT sectionIterationHandle);
1145 
1206 extern ClRcT clCkptCheckpointWrite( CL_IN ClCkptHdlT checkpointHandle,
1207  CL_IN const ClCkptIOVectorElementT *ioVector,
1208  CL_IN ClUint32T numberOfElements,
1209  CL_OUT ClUint32T *erroneousVectorIndex);
1210 
1254 extern ClRcT clCkptSectionOverwrite(CL_IN ClCkptHdlT checkpointHandle,
1255  CL_IN const ClCkptSectionIdT *sectionId,
1256  CL_IN const void *dataBuffer,
1257  CL_IN ClSizeT dataSize);
1258 
1307 extern ClRcT clCkptCheckpointRead( CL_IN ClCkptHdlT checkpointHandle,
1308  CL_INOUT ClCkptIOVectorElementT *ioVector,
1309  CL_IN ClUint32T numberOfElements,
1310  CL_OUT ClUint32T *erroneousVectorIndex);
1311 
1334 extern ClRcT clCkptCheckpointSynchronize( CL_IN ClCkptHdlT ckeckpointHandle,
1335  CL_IN ClTimeT timeout);
1357 extern ClRcT clCkptCheckpointSynchronizeAsync( CL_IN ClCkptHdlT checkpointHandle,
1358  CL_IN ClInvocationT invocation);
1380 extern ClRcT clCkptImmediateConsumptionRegister( CL_IN ClCkptHdlT checkpointHandle,
1382  CL_IN ClPtrT pCookie);
1383 
1422 extern ClRcT clCkptSelectionObjectGet(CL_IN ClCkptSvcHdlT ckptHandle,
1423  CL_OUT ClSelectionObjectT *selectionObject);
1424 
1425 
1456 extern ClRcT clCkptDispatch(CL_IN ClCkptSvcHdlT ckptHandle,
1457  CL_IN ClDispatchFlagsT dispatchFlags);
1458 
1459 #ifdef __cplusplus
1460 }
1461 #endif
1462 
1463 #endif /* _CL_CKPT_API_H_*/
1464 

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen