OpenClovis Logo

clCorApi.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 : clCorApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  *
27  * This module contains Clovis Object Registry (COR) related definitions.
28  *
29  *
30  *****************************************************************************/
31 
32 
33 /*********************************************************************************/
34 /******************************** COR IPIs ***************************************/
35 /*********************************************************************************/
36 /* */
37 /* clCorClientInitialize */
38 /* clCorClientFinalize */
39 /* clCorClassCreate */
40 /* clCorClassDelete */
41 /* clCorClassAttributeCreate */
42 /* clCorClassAttributeArrayCreate */
43 /* clCorClassAttributeValueSet */
44 /* clCorClassAttributeUserFlagsSet */
45 /* clCorClassAttributeUserFlagsGet */
46 /* clCorClassAttributeTypeGet */
47 /* clCorClassAssociationCreate */
48 /* clCorClassContainmentAttributeCreate */
49 /* clCorClassAttributeDelete */
50 /* clCorClassNameSet */
51 /* clCorClassNameGet */
52 /* clCorClassTypeFromNameGet */
53 /* clCorClassAttributeNameGet */
54 /* clCorClassAttributeNameSet */
55 /* clCorMOClassCreate */
56 /* clCorMOClassDelete */
57 /* clCorMSOClassCreate */
58 /* clCorMSOClassExist */
59 /* clCorMSOClassDelete */
60 /* clCorMOClassExist */
61 /* clCorMOPathToClassIdGet */
62 /* clCorServiceRuleDisable */
63 /* clCorServiceRuleDeleteAll */
64 /* clCorServiceRuleStatusGet */
65 /* clCorMoIdToComponentAddressGet */
66 /* clCorObjectFlagsSet <-- !!! Not Supported !!!!--- > */
67 /* clCorObjectFlagsGet <-- !!! Not Supported !!!!--- > */
68 /* clCorSubTreeDelete <--- !!! Not Supported !!!!--- > */
69 /*********************************************************************************/
70 /******************************** COR APIs ***************************************/
71 /*********************************************************************************/
72 /* clCorObjectAttributeSet */
73 /* clCorObjectAttributeGet */
74 /* clCorObjectHandleGet */
75 /* clCorObjectCreate */
76 /* clCorObjectDelete */
77 /* clCorObjectWalk */
78 /* clCorObjectHandleToTypeGet */
79 /* clCorObjectHandleToMoIdGet */
80 /* clCorServiceAdd <--- !!! Not Supported !!!!--- > */
81 /* clCorServiceRuleAdd */
82 /* clCorServiceRuleDelete */
83 /* clCorMoIdToLogicalSlotGet <--- !!! Not Supported !!!!--- > */
84 /* clCorLogicalSlotToMoIdGet <--- !!! Not Supported !!!!--- > */
85 /* clCorObjectAttributeWalk */
86 /* clCorVersionCheck */
87 /* clCorMoIdToNodeNameGet */
88 /* clCorNodeNameToMoIdGet */
89 /* */
90 /*********************************************************************************/
91 
104 #ifndef _CL_COR_API_H_
105 #define _CL_COR_API_H_
106 
107 #ifdef __cplusplus
108 extern "C" {
109 #endif
110 
111 #include <clCommon.h>
112 #include <clCorUtilityApi.h>
113 #include <clCorServiceId.h>
114 #include <clCorMetaData.h>
115 
116 /******************************************************************************
117  * Constant and Macro Definitions
118  *****************************************************************************/
119 
120 /* For constants and macros, refer to clCorMetaData.h header file */
121 
122 /******************************************************************************
123  * Data Types
124  *****************************************************************************/
125 /* For datatypes, refer to clCorMetaData.h header file */
126 
127 /*****************************************************************************
128  * Internal IPI Functions
129  *****************************************************************************/
130 
131 ClRcT clCorClientInitialize(void);
132 
133 ClRcT clCorClientFinalize(void);
134 
135 
136 /*****************************************************************************
137  * -- IPI's for defining classes and relationships among them --- *
138  *****************************************************************************/
139 
140 extern ClRcT clCorClassCreate(ClCorClassTypeT classId, ClCorClassTypeT superClassId);
141 extern ClRcT clCorClassDelete(ClCorClassTypeT classId);
142 extern ClRcT clCorClassAttributeCreate(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClCorTypeT attrType);
143 extern ClRcT clCorClassAttributeArrayCreate(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClCorTypeT attrType, ClInt32T arraySize);
144 extern ClRcT clCorClassAttributeValueSet(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClInt64T init, ClInt64T min, ClInt64T max);
145 extern ClRcT clCorClassAttributeUserFlagsSet(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClUint32T flags);
146 extern ClRcT clCorClassAttributeUserFlagsGet(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClUint32T* flags);
147 extern ClRcT clCorClassAttributeTypeGet(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClCorAttrTypeT *pAttrType);
148 extern ClRcT clCorClassAssociationCreate(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClCorClassTypeT associatedClass, ClInt32T max);
149 extern ClRcT clCorClassContainmentAttributeCreate(ClCorClassTypeT classId, ClCorAttrIdT attrId, ClCorClassTypeT containedClass, ClInt32T min, ClInt32T max);
150 extern ClRcT clCorClassAttributeDelete(ClCorClassTypeT classId, ClCorAttrIdT attrId);
151 
152 /* -- Class related IPIs for debugging purposes only. --- */
153 
154 extern ClRcT clCorClassNameSet(ClCorClassTypeT classId, char* name);
155 extern ClRcT clCorClassNameGet(ClCorClassTypeT classId, char *name, ClUint32T* size);
156 extern ClRcT clCorClassTypeFromNameGet(char *name, ClCorClassTypeT *classId);
157 extern ClRcT clCorClassAttributeNameGet(ClCorClassTypeT classId, ClCorAttrIdT attrId, char *name, ClUint32T* size);
158 extern ClRcT clCorClassAttributeNameSet(ClCorClassTypeT classId, ClCorAttrIdT attrId, char *name);
159 
160 /* -- IPI's for MOClass Tree manuplation (create,delete MOClasses) --- */
161 
162 extern ClRcT clCorMOClassCreate(ClCorMOClassPathPtrT moPath, ClInt32T maxInstances);
163 extern ClRcT clCorMOClassDelete(ClCorMOClassPathPtrT moPath);
164 extern ClRcT clCorMSOClassCreate(ClCorMOClassPathPtrT moPath, ClCorServiceIdT svcId, ClCorClassTypeT classId);
165 extern ClRcT clCorMSOClassExist(ClCorMOClassPathPtrT moPath, ClCorServiceIdT svcId);
166 extern ClRcT clCorMSOClassDelete(ClCorMOClassPathPtrT moPath, ClCorServiceIdT svcId);
167 extern ClRcT clCorMOClassExist(ClCorMOClassPathPtrT moPath);
168 extern ClRcT clCorMOPathToClassIdGet(ClCorMOClassPathPtrT pPath, ClCorServiceIdT svcId, ClCorClassTypeT* pClassId);
169 
170 /* This Object Tree Related Apis'-- not Supported */
171 extern ClRcT clCorSubTreeDelete(ClCorMOIdT moId);
172 extern ClRcT clCorObjectFlagsSet(CL_IN ClCorMOIdPtrT moh, CL_IN ClCorObjFlagsT flags);
173 extern ClRcT clCorObjectFlagsGet(CL_IN ClCorMOIdPtrT moh, CL_OUT ClCorObjFlagsT* pFlags);
174 /* MSP list related api. This is depricated now. */
175 extern ClRcT clCorServiceAdd(ClCorServiceIdT id, char *mspName, ClCorCommInfoPtrT comm);
176 
179 extern ClRcT clCorServiceRuleDisable(ClCorMOIdPtrT moId, ClCorAddrT addr);
180 extern ClRcT clCorServiceRuleStatusGet(ClCorMOIdPtrT moId, ClCorAddrT addr, ClInt8T *status);
181 extern ClRcT clCorServiceRuleDeleteAll(ClCorServiceIdT srvcId, ClCorAddrT addr);
182 extern ClRcT clCorOIRegisterAndDisable(ClCorMOIdPtrT pMoId, ClCorAddrT addr);
183 
184 
185 /* -- IPI for getting the object Attribute information */
186 extern ClRcT clCorObjAttrInfoGet(CL_IN ClCorObjectHandleT objH, CL_IN ClCorAttrPathPtrT pAttrPath, CL_IN ClCorAttrIdT attrId,
187  CL_OUT ClCorTypeT *attrType, CL_OUT ClCorAttrTypeT *arrDataType, CL_OUT ClUint32T *attrSize,
188  CL_OUT ClUint32T *userFlags );
189 /* --- object manipulation APIs --- */
190 
252 
253 /* New function to do get/set operation on all types of attributes.*/
254 
312 extern ClRcT clCorObjectAttributeSet(CL_INOUT ClCorTxnSessionIdT *txnSessionId, CL_IN ClCorObjectHandleT pHandle, CL_IN ClCorAttrPathPtrT contAttrPath, CL_IN ClCorAttrIdT attrId, CL_IN ClUint32T index, CL_IN void *value, CL_IN ClUint32T size);
313 
364 
415 extern ClRcT clCorObjectAttributeGet(CL_IN ClCorObjectHandleT pHandle, CL_IN ClCorAttrPathPtrT contAttrPath, CL_IN ClCorAttrIdT attrId, CL_IN ClInt32T index, CL_OUT void *value, CL_INOUT ClUint32T *size);
416 
486 
519 
520 extern void clCorObjectHandleFree(ClCorObjectHandleT* pObjH);
521 
522 /* Function to get the size of the object handle. */
523 extern ClRcT clCorObjectHandleSizeGet(ClCorObjectHandleT objH, ClUint16T* pSize);
524 
576  CL_IN ClCorObjWalkFlagsT flags, CL_IN void *cookie);
577 
578 /* -- Object handle manipulation APIs-- */
609 
610 extern ClRcT clCorObjectHandleServiceSet(ClCorObjectHandleT objH, ClCorServiceIdT svcId);
611 
640 
641 
642 extern ClRcT clCorMoIdToObjectHandleGet(ClCorMOIdPtrT pMoId, ClCorObjectHandleT* pObjH);
643 
674 
675 
707 
708 
709 /* --- Route Manager APIs --- */
710 
733 ClRcT clCorMoIdToLogicalSlotGet(ClCorMOIdPtrT pMoId, ClUint32T* logicalSlot);
734 
735 
758 ClRcT clCorLogicalSlotToMoIdGet(ClUint32T logicalSlot, ClCorMOIdPtrT pMoId);
759 
848 ClRcT
850  CL_IN ClCorObjAttrWalkFuncT fp, CL_IN void * cookie);
851 
852 
873 ClRcT
875 
876 
898 ClRcT
900 
921 ClRcT
923 
951  CL_IN const ClCorAddrPtrT pCompAaddr);
952 
980  CL_IN const ClCorAddrPtrT pCompAddr);
981 
1036  CL_IN const ClCorAddrPtrT pCompAddr);
1037 
1038 ClRcT clCorNIPrimaryOISet ( CL_IN const ClCharT *pResource);
1039 
1067  CL_IN const ClCorAddrPtrT pCompAddr);
1068 
1069 ClRcT clCorNIPrimaryOIClear ( CL_IN const ClCharT *pResource);
1070 
1099  CL_OUT ClCorAddrPtrT pCompAddr);
1100 
1134 ClRcT clCorBundleInitialize( CL_OUT ClCorBundleHandlePtrT pBundleHandle,
1135  CL_IN ClCorBundleConfigPtrT pBundleConfig);
1136 
1137 
1175  CL_IN ClPtrT userArg);
1176 
1210 
1211  ClRcT clCorBundleApplySync(CL_IN ClCorBundleHandleT bundleHandle);
1212 
1213 
1214 
1242 
1243 ClRcT clCorBundleAttrValueSet(
1244  CL_IN ClCorTxnIdT txnId,
1245  CL_IN ClCorTxnJobIdT jobId,
1246  CL_IN ClPtrT *pValue);
1247 
1286  CL_IN const ClCorObjectHandleT *pObjectHandle,
1288 
1289 ClRcT clCorNIAttrIdGet(ClCorClassTypeT classId, char *name, ClCorAttrIdT *attrId);
1290 
1291 #ifdef __cplusplus
1292 }
1293 #endif
1294 
1295 #endif /* _CL_COR_API_H_ */
Typical defines found in any software project.
Header file of all MetaData data structures.
Header file of COR Service Ids.
Header File of COR utility APIs.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_INOUT
CL_INOUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:108
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClCorObjWalkFlagsT
This enumeration type contains the walk related definitions.
Definition: clCorMetaData.h:548
enum ClCorType ClCorTypeT
The ClCorType enumeration contains the basic COR data types.
ClRcT clCorObjectHandleToMoIdGet(CL_IN ClCorObjectHandleT objHandle, CL_OUT ClCorMOIdPtrT moId, CL_OUT ClCorServiceIdT *srvcId)
Returns the MOID corresponding to compressed MO handle.
ClRcT clCorObjectDelete(CL_INOUT ClCorTxnSessionIdT *txnSessionId, CL_IN ClCorObjectHandleT handle)
Deletes a COR object.
ClRcT(* ClCorObjAttrWalkFuncT)(ClCorAttrPathPtrT pAttrPath, ClCorAttrIdT attrId, ClCorAttrTypeT attrType, ClCorTypeT attrDataType, void *value, ClUint32T size, ClCorAttrFlagT attrData, void *cookie)
The type of the callback API that is invoked for every attribute within a COR object,...
Definition: clCorMetaData.h:1130
enum ClCorAttrType ClCorAttrTypeT
The values of this enumeration type refer to the COR attribute types.
ClPtrT ClCorObjectHandleT
The structure ClCorObjectHandle is the handle to MO.
Definition: clCorMetaData.h:608
ClInt32T ClCorClassTypeT
The type of an identifier for the COR class.
Definition: clCorMetaData.h:201
ClRcT clCorMoIdToLogicalSlotGet(ClCorMOIdPtrT pMoId, ClUint32T *logicalSlot)
Returns the logical slot.
ClPtrT ClCorTxnIdT
The type of the COR transaction ID used to identify a transaction session.
Definition: clCorMetaData.h:642
ClRcT clCorMoIdToComponentAddressGet(CL_IN ClCorMOIdPtrT moh, CL_OUT ClCorAddrT *addr)
– IPI's for Route List manipulation –
ClRcT clCorObjectHandleGet(ClCorMOIdPtrT pMoId, ClCorObjectHandleT *objHandle)
Retrieves the compressed MO handle corresponding to MOID.
ClCorServiceIdT
The members of this enumeration type contains the service ID for all MSPs.
Definition: clCorServiceId.h:57
ClCorObjFlagsT
MO and MSO related flags Following flags are used to specify:
Definition: clCorMetaData.h:719
ClRcT clCorBundleApplyAsync(CL_IN ClCorBundleHandleT bundleHandle, CL_IN ClCorBundleCallbackPtrT funcPtr, CL_IN ClPtrT userArg)
Function to apply the bundle asynchronously.
ClInt32T ClCorAttrIdT
The type of an identifier for a COR attribute.
Definition: clCorMetaData.h:206
ClRcT clCorObjectCreateAndSet(CL_INOUT ClCorTxnSessionIdT *tid, CL_IN ClCorMOIdPtrT pMoId, CL_IN ClCorAttributeValueListPtrT attrList, CL_OUT ClCorObjectHandleT *pHandle)
Creates and sets a COR object.
ClCorObjTypesT
This type used to know the type of object the object-handle contains.
Definition: clCorMetaData.h:513
ClRcT clCorBundleInitialize(CL_OUT ClCorBundleHandlePtrT pBundleHandle, CL_IN ClCorBundleConfigPtrT pBundleConfig)
Creates a bundle and returns a unique handle identifying the bundle.
ClRcT clCorBundleObjectGet(CL_IN ClCorBundleHandleT bundleHandle, CL_IN const ClCorObjectHandleT *pObjectHandle, CL_INOUT ClCorAttrValueDescriptorListPtrT pAttrList)
Populates a bundle with read-jobs.
ClRcT clCorObjectAttributeWalk(CL_IN ClCorObjectHandleT objH, CL_IN ClCorObjAttrWalkFilterT *pFilter, CL_IN ClCorObjAttrWalkFuncT fp, CL_IN void *cookie)
Walk is performed on the attributes of the object.
ClRcT clCorOIUnregister(CL_IN const ClCorMOIdPtrT pMoId, CL_IN const ClCorAddrPtrT pCompAddr)
De-register the component acting as the OI.
ClPtrT ClCorTxnSessionIdT
The type of the handle of a COR transaction session.
Definition: clCorMetaData.h:637
ClCorCommInfoT * ClCorCommInfoPtrT
The type of the pointer for COR communication configuration.
Definition: clCorMetaData.h:830
ClRcT clCorVersionCheck(CL_INOUT ClVersionT *version)
Verifies the version supported by COR.
ClRcT clCorObjectWalk(CL_IN ClCorMOIdPtrT moIdRoot, CL_IN ClCorMOIdPtrT moIdFilter, CL_IN ClCorObjectWalkFunT fp, CL_IN ClCorObjWalkFlagsT flags, CL_IN void *cookie)
Walks through the object tree.
ClHandleT ClCorBundleHandleT
Type definition of the bundle handle.
Definition: clCorMetaData.h:226
ClRcT clCorObjectCreate(CL_INOUT ClCorTxnSessionIdT *txnSessionId, CL_IN ClCorMOIdPtrT moId, CL_OUT ClCorObjectHandleT *handle)
Creates a COR object.
ClRcT clCorLogicalSlotToMoIdGet(ClUint32T logicalSlot, ClCorMOIdPtrT pMoId)
Returns MOId given the Logical Slot.
ClRcT clCorObjectAttributeSet(CL_INOUT ClCorTxnSessionIdT *txnSessionId, CL_IN ClCorObjectHandleT pHandle, CL_IN ClCorAttrPathPtrT contAttrPath, CL_IN ClCorAttrIdT attrId, CL_IN ClUint32T index, CL_IN void *value, CL_IN ClUint32T size)
Sets the attribute of a COR object.
ClRcT clCorBundleFinalize(ClCorBundleHandleT bundleHandle)
Finalizes the bundle.
ClRcT clCorBundleApply(CL_IN ClCorBundleHandleT bundleHandle)
Submits a bundle to the COR server for execution.
ClRcT(* ClCorObjectWalkFunT)(void *data, void *cookie)
Type of callback function used for Object Walk.
Definition: clCorMetaData.h:1507
ClRcT clCorOIRegister(CL_IN const ClCorMOIdPtrT pMoId, CL_IN const ClCorAddrPtrT pCompAaddr)
A component can register itself as an OI through this API.
ClRcT clCorServiceRuleAdd(CL_IN ClCorMOIdPtrT moh, CL_IN ClCorAddrT addr)
Adds a new route rule entry.
ClUint32T ClCorTxnJobIdT
The type of COR transaction Job Id, used to identify a job uniquely within a transaction.
Definition: clCorMetaData.h:647
ClRcT clCorPrimaryOISet(CL_IN const ClCorMOIdPtrT pMoId, CL_IN const ClCorAddrPtrT pCompAddr)
Sets a component as the primary OI.
ClRcT clCorNodeNameToMoIdGet(CL_IN ClNameT nodeName, CL_OUT ClCorMOIdPtrT pMoId)
This function can be used to give the MoId corresponding to the node name supplied.
ClRcT clCorObjectAttributeGet(CL_IN ClCorObjectHandleT pHandle, CL_IN ClCorAttrPathPtrT contAttrPath, CL_IN ClCorAttrIdT attrId, CL_IN ClInt32T index, CL_OUT void *value, CL_INOUT ClUint32T *size)
Retrieves the value of an attribute belonging to an object.
ClRcT(* ClCorBundleCallbackPtrT)(ClCorBundleHandleT bundleHandle, ClPtrT userArg)
The callback function for the asynchronous bunlde.
Definition: clCorMetaData.h:1545
ClRcT clCorMoIdToNodeNameGet(CL_IN ClCorMOIdPtrT pMoId, CL_OUT ClNameT *nodeName)
This function can be used to get node name corresponding to a moId which is specified in the ASP conf...
ClRcT clCorPrimaryOIGet(CL_IN const ClCorMOIdPtrT pMoId, CL_OUT ClCorAddrPtrT pCompAddr)
Obtains the primary OI for a given MO.
ClRcT clCorServiceRuleDelete(CL_IN ClCorMOIdPtrT moh, CL_IN ClCorAddrT addr)
Delete the station from the route list.
ClRcT clCorObjectHandleToTypeGet(CL_IN ClCorObjectHandleT pHandle, CL_OUT ClCorObjTypesT *type)
Returns the type of an object when its object handle is provided.
ClRcT clCorPrimaryOIClear(CL_IN const ClCorMOIdPtrT pMoId, CL_IN const ClCorAddrPtrT pCompAddr)
De-register the component that is acting as the primary OI.
A name.
Definition: clCommon.h:197
Version Information for various services.
Definition: clCommon.h:250
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
The structure ClCorObjAttrWalkFilter is used to specify filter properties while performing attribute ...
Definition: clCorMetaData.h:1029
The structure ClCorMOClassPath contains the COR object handle.
Definition: clCorMetaData.h:1212
Type to provide the list of attribute values for initialized attributes.
Definition: clCorMetaData.h:1350
Type for the attribute value list.
Definition: clCorMetaData.h:1418
Structure for storing the bundle configuration.
Definition: clCorMetaData.h:1479
The IOC Physical address of an application's communication end point.
Definition: clIocApi.h:383

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