OpenClovis Logo

clNameApi.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 : name
21  * File : clNameApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  *
27  * This file contains Name Service Client Library related
28  * datastructures and APIs.
29  *
30  *
31  *****************************************************************************/
32 
45 #ifndef _CL_NAME_API_H_
46 #define _CL_NAME_API_H_
47 
48 #include "clBufferApi.h"
49 #include <clEoApi.h>
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 /*****************************************************************************/
55 /******************************** Defines/constants **************************/
56 /*****************************************************************************/
57 
61 #define CL_NS_MAX_NO_ATTR 5
62 
63 
67 #define CL_NS_MAX_STR_LENGTH 20
68 
72 #define CL_NS_DEFT_GLOBAL_CONTEXT 0xFFFFFFF
73 
74 
78 #define CL_NS_DEFT_LOCAL_CONTEXT 0xFFFFFFE
79 
83 #define CL_NS_DEFT_GLOBAL_MAP_COOKIE 0xFFFFFFF
84 
88 #define CL_NS_DEFT_LOCAL_MAP_COOKIE 0xFFFFFFE
89 
93 #define CL_NS_DEFT_ATTR_LIST 0x0
94 
98 #define CL_NS_GET_OBJ_REF 0xFFFFFFF
99 
103 #define CL_NAME_PUB_CHANNEL "NAME_SVC_PUB_CHANNEL"
104 
105 
109 #define CL_NAME_EVENT_TYPE 0x100
110 
114 # define CL_NAME_VERSION {'B', 0x1, 0x1}
115 # define CL_NAME_VERSION_SET(version) (version).releaseCode = 'B', \
116  (version).majorVersion = 0x1,\
117  (version).minorVersion = 0x1
118 
119 /********************* Name Service related data structures **********************/
120 /*********************************************************************************/
121 
125 typedef enum
126 {
127 
132 
138 
139 
143 typedef enum
144 {
149 
154 
155 
160 
166 
171 
172 }ClNameSvcOpT;
173 
174 
178 typedef enum
179 {
184 
189 
194 
196 
197 
202 typedef struct
203 {
204 
209 
213  ClUint64T objReference;
214 
219 
223  ClUint32T contextMapCookie;
225 
226 
230 typedef struct
231 {
232 
236 ClUint8T type[CL_NS_MAX_STR_LENGTH];
237 
241 ClUint8T value[CL_NS_MAX_STR_LENGTH];
243 
245 
246 
250 typedef struct
251 {
252 
257 
261  ClUint32T attrCount;
262 
266  ClUint32T opCode[CL_NS_MAX_NO_ATTR-1];
268 
270 
271 
275 typedef struct
276 {
277 
282 
286  ClUint32T compId;
287 
292 
296  ClUint32T attrCount;
297 
303 
305 
306 
310 typedef struct ClNameSvcCompList
311 {
312  ClUint32T dsId;
316  ClUint32T compId;
317 
322 
327 
332 
337 
343 
345 
346 
350 typedef struct
351 {
352 
353 
358 
362  ClUint64T objReference;
363 
367  ClUint32T refCount;
368 
373 
377  ClUint32T attrCount;
378 
384 
386 
387 /*********************************************************************************/
388 /************************** Client side APIs *********************************/
389 /*********************************************************************************/
390 
391 /*********************************************************************************/
392 /************************** API to Core Module ***********************************/
393 
419 
420 
444 
445 
488 ClRcT clNameRegister(CL_IN ClUint32T contextId,
489  CL_IN ClNameSvcRegisterT* pNSRegisInfo,
490  CL_INOUT ClUint64T *pObjReference);
491 
492 
493 
519 
520 
521 
553 ClRcT clNameServiceDeregister(CL_IN ClUint32T contextId,
554  CL_IN ClUint32T compId,
555  CL_IN ClNameT* serviceName);
556 
557 
594  CL_IN ClUint32T contextMapCookie,
595  CL_OUT ClUint32T *contextId);
596 
597 
625 ClRcT clNameContextDelete(CL_IN ClUint32T contextId);
626 
627 /**********************************************************************************/
628 /************************** API to Query Module ***********************************/
629 
630 
671  CL_IN ClUint32T attrCount,
672  CL_IN ClNameSvcAttrEntryT *pAttr,
673  CL_IN ClUint32T contextMapCookie,
674  CL_OUT ClUint64T* pObjReference);
675 
676 
717  CL_IN ClUint32T attrCount,
718  CL_IN ClNameSvcAttrEntryT *pAttr,
719  CL_IN ClUint32T contextMapCookie,
720  CL_OUT ClNameSvcEntryPtrT* pOutBuff);
721 
722 
744 ClRcT clNameObjectMappingCleanup(CL_IN ClNameSvcEntryPtrT pObjMapping);
745 
769 /**************************************************************************************/
770 
771 #ifdef __cplusplus
772 }
773 #endif
774 
775 #endif /* _CL_NAME_API_H_ */
776 

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