OpenClovis Logo

clCorTxnApi.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 : cor
21  * File : clCorTxnApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  *
27  * This file contains the transaction related APIs for COR.
28  *
29  *****************************************************************************/
30 
42 #ifndef _CL_COR_TXN_API_H_
43 #define _CL_COR_TXN_API_H_
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #include <clCommon.h>
50 #include <clTxnApi.h>
51 #include <clCorMetaData.h>
52 
53 /*********************************************************************************/
54 /******************************** COR APIs ***************************************/
55 /*********************************************************************************/
56 /* */
57 /* clCorTxnJobWalk */
58 /* clCorTxnSessionCommit */
59 /* clCorTxnSessionFinalize */
60 /* clCorTxnSessionCancel */
61 /* clCorTxnJobHandleToCorTxnIdGet */
62 /* clCorTxnIdTxnFree */
63 /* clCorTxnJobAttributeTypeGet */
64 /* clCorTxnJobSetParamsGet */
65 /* clCorTxnJobAttrPathGet */
66 /* clCorTxnJobOperationGet */
67 /* clCorTxnJobMoIdGet */
68 /* clCorTxnJobObjectHandleGet */
69 /* clCorTxnFirstJobGet */
70 /* clCorTxnLastJobGet */
71 /* clCorTxnNextJobGet */
72 /* clCorTxnPreviousJobGet */
73 /* clCorTxnFailedJobGet */
74 /* clCorTxnJobStatusSet */
75 /* clCorTxnJobStatusGet */
76 /* clCorTxnJobDefnHandleUpdate */
77 /* */
78 /*********************************************************************************/
79 
80 /******************************************************************************
81  * Constant and Macro Definitions
82  *****************************************************************************/
83 
84 #define COR_TXN_MAX_STATIONS 8
85 #define CL_COR_TXN_SERVICE_ID_READ 1
86 #define CL_COR_TXN_SERVICE_ID_WRITE 2
87 
88 
89 /******************************************************************************
90  * Data Types
91  *****************************************************************************/
92 
118 typedef ClRcT (*ClCorTxnFuncT)(ClCorTxnIdT trans,
119  ClCorTxnJobIdT jobId,
120  void *cookie);
121 
122 /*****************************************************************************
123  * Functions
124  *****************************************************************************/
125 
152  CL_IN ClCorTxnFuncT funcPtr,
153  CL_IN void *cookie);
154 
185 
207 extern ClRcT clCorTxnSessionCancel(CL_IN ClCorTxnSessionIdT txnSessionId) CL_DEPRECATED;
208 
233 
255  CL_IN ClTxnJobDefnHandleT jobDefn,
256  CL_IN ClSizeT size,
257  CL_OUT ClCorTxnIdT *pTxnId);
258 
259 
279  CL_IN ClCorTxnIdT corTxnId);
280 
310  CL_IN ClCorTxnIdT txnId,
311  CL_IN ClCorTxnJobIdT jobId,
312  CL_OUT ClCorAttrTypeT *pAttrType,
313  CL_OUT ClCorTypeT *pAttrDataType);
314 
315 
352  CL_IN ClCorTxnIdT txnId,
353  CL_IN ClCorTxnJobIdT jobId,
354  CL_OUT ClCorAttrIdT *pAttrId,
355  CL_OUT ClInt32T *pIndex,
356  CL_OUT void **pValue,
357  CL_OUT ClUint32T *pSize);
358 
386  CL_IN ClCorTxnIdT txnId,
387  CL_IN ClCorTxnJobIdT jobId,
388  CL_OUT ClCorAttrPathT **pAttrPath);
389 
390 
420  CL_IN ClCorTxnIdT txnId,
421  CL_IN ClCorTxnJobIdT jobId,
422  CL_OUT ClCorOpsT *op);
423 
424 
451  CL_IN ClCorTxnIdT txnId,
452  CL_OUT ClCorMOIdT *pMOId);
453 
454 
481  CL_IN ClCorTxnIdT txnId,
482  CL_OUT ClCorObjectHandleT *pObjHandle);
483 
484 
511  CL_IN ClCorTxnIdT txnId,
512  CL_OUT ClCorTxnJobIdT *pJobId);
513 
540  CL_IN ClCorTxnIdT txnId,
541  CL_OUT ClCorTxnJobIdT *pJobId);
542 
571  CL_IN ClCorTxnIdT txnId,
572  CL_IN ClCorTxnJobIdT currentJobHdl,
573  CL_OUT ClCorTxnJobIdT *pNextJobHdl);
574 
575 
604  CL_IN ClCorTxnIdT txnId,
605  CL_IN ClCorTxnJobIdT currentJobId,
606  CL_OUT ClCorTxnJobIdT *pPrevJobId);
607 
647  ClCorTxnSessionIdT txnSessionId,
648  ClCorTxnInfoT *pPrevTxnInfo,
649  ClCorTxnInfoT *pNextTxnInfo);
650 
677  CL_IN ClCorTxnIdT txnId,
678  CL_IN ClCorTxnJobIdT jobId,
679  CL_IN ClUint32T jobStatus);
680 
707  CL_IN ClCorTxnIdT txnId,
708  CL_IN ClCorTxnJobIdT jobId,
709  CL_OUT ClUint32T* jobStatus);
710 
735  CL_OUT ClTxnJobDefnHandleT jobDefnHandle,
736  CL_IN ClCorTxnIdT corTxnId);
737 
738 
739 extern ClRcT clCorTxnJobOmClassIdGet(CL_IN ClCorTxnIdT corTxnId,
740  CL_OUT ClCorClassTypeT * pOmClassId);
741 
742 #ifdef __cplusplus
743 }
744 #endif
745 
746 #endif /* _CL_COR_TXN_API_H_ */
747 
748 
749 
Typical defines found in any software project.
Header file of all MetaData data structures.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
ClUint64T ClSizeT
Definition: clCommon.h:157
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
enum ClCorType ClCorTypeT
The ClCorType enumeration contains the basic COR data types.
enum ClCorAttrType ClCorAttrTypeT
The values of this enumeration type refer to the COR attribute types.
ClRcT clCorTxnIdTxnFree(CL_IN ClCorTxnIdT corTxnId)
Frees the data for the transactionID .
ClPtrT ClCorObjectHandleT
The structure ClCorObjectHandle is the handle to MO.
Definition: clCorMetaData.h:608
ClRcT clCorTxnJobSetParamsGet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT jobId, CL_OUT ClCorAttrIdT *pAttrId, CL_OUT ClInt32T *pIndex, CL_OUT void **pValue, CL_OUT ClUint32T *pSize)
Get all the information necessary for setting the attribute.
ClInt32T ClCorClassTypeT
The type of an identifier for the COR class.
Definition: clCorMetaData.h:201
ClRcT clCorTxnSessionCancel(CL_IN ClCorTxnSessionIdT txnSessionId) CL_DEPRECATED
Cancels a transaction session.
ClRcT clCorTxnSessionFinalize(CL_IN ClCorTxnSessionIdT txnSessionId)
Finalizes a COR transaction session.
ClPtrT ClCorTxnIdT
The type of the COR transaction ID used to identify a transaction session.
Definition: clCorMetaData.h:642
ClRcT clCorTxnNextJobGet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT currentJobHdl, CL_OUT ClCorTxnJobIdT *pNextJobHdl)
Get the next job in the transaction.
ClCorOpsT
The values of the ClCorOpsT enumeration type contain the Operation IDs.
Definition: clCorMetaData.h:653
ClRcT clCorTxnLastJobGet(CL_IN ClCorTxnIdT txnId, CL_OUT ClCorTxnJobIdT *pJobId)
Get the last job in the transaction.
ClRcT clCorTxnJobStatusSet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT jobId, CL_IN ClUint32T jobStatus)
Set the status of a particular job.
ClInt32T ClCorAttrIdT
The type of an identifier for a COR attribute.
Definition: clCorMetaData.h:206
ClRcT clCorTxnJobStatusGet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT jobId, CL_OUT ClUint32T *jobStatus)
Get the status of a particular job.
ClRcT clCorTxnJobDefnHandleUpdate(CL_OUT ClTxnJobDefnHandleT jobDefnHandle, CL_IN ClCorTxnIdT corTxnId)
This function is used to pack the transaction information and update it in the given job definition h...
ClPtrT ClCorTxnSessionIdT
The type of the handle of a COR transaction session.
Definition: clCorMetaData.h:637
ClRcT clCorTxnJobObjectHandleGet(CL_IN ClCorTxnIdT txnId, CL_OUT ClCorObjectHandleT *pObjHandle)
Get the Object handle from the transaction.
ClRcT clCorTxnJobAttributeTypeGet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT jobId, CL_OUT ClCorAttrTypeT *pAttrType, CL_OUT ClCorTypeT *pAttrDataType)
Get the attribute type information.
ClRcT clCorTxnJobAttrPathGet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT jobId, CL_OUT ClCorAttrPathT **pAttrPath)
Retrieves the attrpath from the transaction.
ClUint32T ClCorTxnJobIdT
The type of COR transaction Job Id, used to identify a job uniquely within a transaction.
Definition: clCorMetaData.h:647
ClRcT clCorTxnFirstJobGet(CL_IN ClCorTxnIdT txnId, CL_OUT ClCorTxnJobIdT *pJobId)
Get the first job.
ClRcT clCorTxnPreviousJobGet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT currentJobId, CL_OUT ClCorTxnJobIdT *pPrevJobId)
Get the previous job in the transaction.
ClRcT clCorTxnJobHandleToCorTxnIdGet(CL_IN ClTxnJobDefnHandleT jobDefn, CL_IN ClSizeT size, CL_OUT ClCorTxnIdT *pTxnId)
Get thetransactionID from thetransactionJob handle.
ClRcT clCorTxnJobMoIdGet(CL_IN ClCorTxnIdT txnId, CL_OUT ClCorMOIdT *pMOId)
Get the MoId From the transaction.
ClRcT clCorTxnJobWalk(CL_IN ClCorTxnIdT pThis, CL_IN ClCorTxnFuncT funcPtr, CL_IN void *cookie)
Walk through the transaction Jobs.
ClRcT(* ClCorTxnFuncT)(ClCorTxnIdT trans, ClCorTxnJobIdT jobId, void *cookie)
Type of the callback function which will be called while doing transaction job walk.
Definition: clCorTxnApi.h:118
ClRcT clCorTxnFailedJobGet(ClCorTxnSessionIdT txnSessionId, ClCorTxnInfoT *pPrevTxnInfo, ClCorTxnInfoT *pNextTxnInfo)
Retrieves the information about the failed transaction job for a pariticular transaction Id.
ClRcT clCorTxnJobOperationGet(CL_IN ClCorTxnIdT txnId, CL_IN ClCorTxnJobIdT jobId, CL_OUT ClCorOpsT *op)
Get the operation type.
ClRcT clCorTxnSessionCommit(CL_IN ClCorTxnSessionIdT txnSessionId)
Commits an active transaction session.
The structure ClCorMOId contains MoId of the object, which is the address of the COR object.
Definition: clCorMetaData.h:918
The structure ClCorAttrPath contains the path-list of the attribute.
Definition: clCorMetaData.h:997
COR Txn Failed Job Information.
Definition: clCorMetaData.h:1244

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