OpenClovis Logo

clCorUtilityApi.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 : clCorUtilityApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  *
27  * The file contains utility APIs to modify paths/ids required by core COR
28  * APIs. for e.g APIs to generate ClCorMOId (a unique idenfier for MO)
29  *
30  *
31  *****************************************************************************/
32 
33 /*********************************************************************************/
34 /********************************* COR IPIs **************************************/
35 /*********************************************************************************/
36 /* */
37 /* clCorProcessClassTable */
38 /* clCorOmClassFromInfoModelGet */
39 /* clCorDataRestore */
40 /* clCorDataSave */
41 /* clCorDataFrequentSave */
42 /* clCorDataFrequentSaveStop */
43 /* clCorClassAttributeWalk */
44 /* clCorClassAttributeTypeGet */
45 /* clCorClassAttributeValuesGet */
46 /* clCorMoClassPathInitialize */
47 /* clCorMoClassPathAlloc */
48 /* clCorMoClassPathFree */
49 /* clCorMoClassPathTruncate */
50 /* clCorMoClassPathSet */
51 /* clCorMoClassPathAppend */
52 /* clCorMoClassPathDepthGet */
53 /* clCorMoClassPathToMoClassGet */
54 /* clCorMoClassPathFirstChildGet */
55 /* clCorMoClassPathNextSiblingGet */
56 /* clCorMoClassPathCompare */
57 /* clCorMoClassPathConcatenate */
58 /*********************************************************************************/
59 /********************************* COR APIs **************************************/
60 /*********************************************************************************/
61 /* clCorMoIdInitialize */
62 /* clCorMoIdAlloc */
63 /* clCorMoIdFree */
64 /* clCorMoIdTruncate */
65 /* clCorMoIdSet */
66 /* clCorMoIdAppend */
67 /* clCorMoIdDepthGet */
68 /* clCorMoIdShow */
69 /* clCorMoIdToMoClassGet */
70 /* clCorMoIdNameToMoIdGet */
71 /* clCorMoIdToMoIdNameGet */
72 /* clCorMoIdFirstInstanceGet */
73 /* clCorMoIdNextSiblingGet */
74 /* clCorMoIdValidate */
75 /* clCorMoIdToInstanceGet */
76 /* clCorMoIdToMoClassPathGet */
77 /* clCorMoIdClone */
78 /* clCorMoIdCompare */
79 /* clCorMoIdServiceGet */
80 /* clCorMoIdServiceSet */
81 /* clCorServiceIdValidate */
82 /* clCorMoIdInstanceSet */
83 /* clCorMoIdConcatenate */
84 /* clCorAttrPathAlloc */
85 /* clCorAttrPathInitialize */
86 /* clCorAttrPathFree */
87 /* clCorAttrPathTruncate */
88 /* clCorAttrPathSet */
89 /* clCorAttrPathAppend */
90 /* clCorAttrPathShow */
91 /* clCorAttrPathDepthGet */
92 /* clCorAttrPathToAttrIdGet */
93 /* clCorAttrPathIndexGet */
94 /* clCorAttrPathIndexSet */
95 /* clCorAttrPathCompare */
96 /* clCorAttrPathClone */
97 /* clCorUtilMoAndMSOCreate */
98 /* clCorUtilMoAndMSODelete */
99 /* */
100 /*********************************************************************************/
101 
113 #ifndef _CL_COR_UTILITY_API_H_
114 #define _CL_COR_UTILITY_API_H_
115 
116 #ifdef __cplusplus
117  extern "C" {
118 #endif
119 
120 #include <clCommon.h>
121 #include <clOmCommonClassTypes.h>
122 #include "clCorMetaData.h"
123 #include "clCorServiceId.h"
124 
125 
126 /******************************************************************************
127  * Constant and Macro Definitions
128  *****************************************************************************/
129 
130 
131 #define CL_COR_UTILS_UNKNOWN_ATTRIBUTE 0
132 
133 #define CL_COR_UTILS_UNKNOWN_CLASS 0
134 
138 typedef enum
139 {
140 
145 
150 
155 
156  CL_COR_PERS_RM_DATA,
157 
158  CL_COR_PERS_NI_DATA,
159 
160  CL_COR_PERS_DATA_MAX
161 
163 
167 typedef enum ClCorClsCfgType {
168 
169  CL_COR_BASE_CLASS,
170  CL_COR_MO_CLASS
171 
173 
174 
175 struct ClCorPersDataTlv
176 {
177 
181  ClCorPersDataTypeT type;
182 
186  ClInt32T len;
187 
188 };
189 
190 typedef struct ClCorPersDataTlv ClCorPersDataTlvT;
191 
192 
193 
194 /*****************************************************************************
195  * COR APIs
196  *****************************************************************************/
197 
198 
199 
200 
201 extern ClRcT clCorOmClassFromInfoModelGet(ClCorClassTypeT moClass, ClCorServiceIdT svcId, ClOmClassTypeT *pOmClass);
202 extern ClRcT clCorOmClassNameFromInfoModelGet(ClCorClassTypeT moClass, ClCorServiceIdT svcId, ClOmClassTypeT *pOmClass,
203  ClCharT *pOmClassName, ClUint32T maxClassSize);
204 extern ClRcT clCorConfigLoad(const ClCharT *pConfigFile, const ClCharT *pRouteFile);
205 
206 extern ClRcT clCorDataRestore();
207 
208 extern ClRcT clCorDataSave();
209 
210 
211 
212 extern ClRcT clCorDataFrequentSave(char *fileName, ClTimerTimeOutT frequency );
213 
214 
215 
216 extern ClRcT clCorDataFrequentSaveStop();
217 
218 
219 /* ------------- Attribute related utility IPIs ------------------ */
220 
221 
222 extern ClRcT clCorClassAttributeWalk(ClCorClassTypeT classId, ClCorClassAttrWalkFunc usrClBck, ClPtrT cookie);
223 
224 
225 
226 
227 extern ClRcT clCorClassAttributeTypeGet(ClCorClassTypeT clsHdl, ClCorAttrIdT attrId, ClCorAttrTypeT* atye);
228 
229 
230 
231 
232 extern ClRcT clCorClassAttributeValuesGet(ClCorClassTypeT clsHdl, ClCorAttrIdT attrId,
233  ClInt32T *pInit, ClInt32T *pMin, ClInt32T *pMax);
234 
235 
236 
237 
238 /* ------------- ClCorMOClassPath and ClCorMOId Utilities -------------------- */
239 
240 
241 extern ClRcT clCorMoClassPathInitialize(ClCorMOClassPathPtrT pPath);
242 
243 
244 
245 
246 extern ClRcT clCorMoClassPathAlloc(ClCorMOClassPathPtrT *pPath);
247 
248 
249 
250 
251 extern ClRcT clCorMoClassPathFree(ClCorMOClassPathPtrT pPath);
252 
253 
254 
255 
256 extern ClRcT clCorMoClassPathTruncate(ClCorMOClassPathPtrT pPath, ClInt16T level);
257 
258 
259 
260 
261 extern ClRcT clCorMoClassPathSet(ClCorMOClassPathPtrT pPath, ClUint16T level, ClCorClassTypeT type);
262 
263 
264 
265 
266 extern ClRcT clCorMoClassPathAppend(ClCorMOClassPathPtrT pPath, ClCorClassTypeT type);
267 
268 
269 
270 extern ClInt32T clCorMoClassPathDepthGet(ClCorMOClassPathPtrT pPath);
271 
272 
273 
274 extern ClCorClassTypeT clCorMoClassPathToMoClassGet(ClCorMOClassPathPtrT pPath);
275 
276 
277 
278 
279 extern ClRcT clCorMoClassPathFirstChildGet(ClCorMOClassPathPtrT pPath);
280 
281 
282 
283 
284 extern ClRcT clCorMoClassPathNextSiblingGet(ClCorMOClassPathPtrT pPath);
285 
286 
287 
288 
289 extern ClRcT clCorMoClassPathCompare(ClCorMOClassPathPtrT hMoPath1, ClCorMOClassPathPtrT hMoPath2);
290 
291 
292 
293 extern ClRcT clCorMoClassPathConcatenate(ClCorMOClassPathPtrT part1, ClCorMOClassPathPtrT part2, int copyWhere);
294 
329 
365 
395 
425 extern ClRcT clCorMoIdTruncate(CL_INOUT ClCorMOIdPtrT pMoId, CL_IN ClInt16T level);
426 
427 
463 extern ClRcT clCorMoIdSet(CL_INOUT ClCorMOIdPtrT pMoId, CL_IN ClUint16T level,
465 
466 
499 
500 
525 extern ClInt16T clCorMoIdDepthGet(CL_IN ClCorMOIdPtrT pMoId);
526 
550 extern void clCorMoIdShow(CL_IN ClCorMOIdPtrT pMoId);
551 
552 
587  CL_OUT ClCorClassTypeT *pClassId);
612 extern ClRcT clCorMoIdNameToMoIdGet(CL_IN ClNameT *moIdName, CL_OUT ClCorMOIdT *moId);
613 
642 extern ClRcT clCorMoIdToMoIdNameGet(CL_IN ClCorMOIdT *moId, CL_OUT ClNameT *moIdName);
643 
690 
691 
730 
731 
771 
772 
799 
800 
828 
829 
857 extern ClRcT clCorMoIdClone(ClCorMOIdPtrT pMoId, ClCorMOIdPtrT* newH);
858 
859 
860 ClBoolT
861 clCorMoIdIsWildCard(ClCorMOIdPtrT pMoId);
862 
893 extern int clCorMoIdSortCompare(CL_IN ClCorMOIdPtrT pMoId, CL_IN ClCorMOIdPtrT cmp);
894 
917 
918 
945 
946 
971 
972 
999 extern ClRcT clCorMoIdInstanceSet(CL_INOUT ClCorMOIdPtrT pMoId, CL_IN ClUint16T ndepth,
1000  CL_IN ClCorInstanceIdT newInstance);
1001 
1002 
1033 extern ClRcT clCorMoIdConcatenate(CL_INOUT ClCorMOIdPtrT part1, CL_INOUT ClCorMOIdPtrT part2, CL_IN ClInt32T copyWhere);
1034 extern ClRcT clCorMoIdPack(ClCorMOIdT *pMoId, ClCharT **ppDataBuffer, ClUint32T *pDataSize);
1035 extern ClRcT clCorMoIdUnpack(ClCharT *pData, ClUint32T dataSize, ClCorMOIdT *pMoId);
1036 
1037 /* -- APIs to manipulate the Containment Attribute Path --*/
1038 
1078 
1079 
1115 
1116 
1152 
1153 
1189 extern ClRcT clCorAttrPathTruncate(CL_INOUT ClCorAttrPathPtrT pAttrPath, CL_IN ClInt16T level);
1190 
1191 
1229 extern ClRcT clCorAttrPathSet(CL_INOUT ClCorAttrPathPtrT pAttrPath, CL_IN ClUint16T level,
1230  CL_IN ClCorAttrIdT attrId, CL_IN ClUint32T index);
1231 
1232 
1271  CL_IN ClCorInstanceIdT index);
1272 
1273 
1274 
1310 extern ClInt16T clCorAttrPathDepthGet(CL_IN ClCorAttrPathPtrT pAttrPath);
1311 
1312 
1348 extern void clCorAttrPathShow(CL_IN ClCorAttrPathPtrT pAttrPath);
1349 
1350 
1386 
1387 
1423 extern ClUint32T clCorAttrPathIndexGet(CL_IN ClCorAttrPathPtrT pAttrPath);
1424 
1425 
1461 extern ClRcT clCorAttrPathIndexSet(CL_INOUT ClCorAttrPathPtrT pAttrPath, CL_IN ClUint16T ndepth, CL_IN ClUint32T newIndex);
1462 
1463 
1501 extern ClInt32T clCorAttrPathCompare(CL_IN ClCorAttrPathPtrT pAttrPath, CL_IN ClCorAttrPathPtrT cmp);
1502 
1503 
1541 
1577 
1609 
1610 
1611 extern ClRcT clCorClientDebugCliRegister(ClHandleT *pDbgHandle);
1612 
1613 extern ClRcT clCorClientDebugCliDeregister(ClHandleT dbgHandle);
1614 
1615 extern ClRcT clCorClassAttrListGet(ClCharT* className,
1616  ClCorAttrFlagT attrFlags,
1617  ClUint32T* pAttrCount,
1618  ClCorAttrDefT** pAttrDefList);
1619 
1620 
1621 /*
1622  * MIB Table related APIs.
1623  */
1624 extern ClRcT clCorMibTableAttrListGet(ClCharT* mibTable,
1625  ClCorAttrFlagT attrFlags,
1626  ClUint32T* pAttrCount,
1627  ClCorAttrDefT** pAttrDefList);
1628 
1629 #ifdef __cplusplus
1630 }
1631 #endif
1632 
1633 #endif /* _CL_COR_UTILITY_API_H_ */
1634 
1635 
1636 

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