OpenClovis Logo

clTmsApi.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 : gms
21  * File : clTmsApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  *
27  * This client API extends the SA Forum compliant cluster membership
28  * query and tracking API with group view management.
29  *
30  * Special applications can use this service to create and manage
31  * group (views) on top of the cluster (views).
32  *
33  *
34  * Synchronization of the group with the cluster group view is provided
35  * by the implementation of this service and it works as follows:
36  * An application can create a group and join the group if its node is also
37  * part of the cluster group. If a cluster node leaves (or is removed) from
38  * the cluster, any process on the removed node that participates in any
39  * group(s) is also removed from the respective group(s).
40  *
41  * An instance of this service (instantiated by the clTmsInitialize()
42  * API and identified by the svcHandle) can view and manage any group.
43  *
44  *
45  * FIXME/TODO:
46  * - Need to make sure all error codes are defined (here or in clCommon.h)
47  * - Need to address group address synchronization issue. If this service
48  * is to synchronize group address with group membership, then this has
49  * to be requested explicitely (and the address provided too).
50  *
51  *
52  *****************************************************************************/
53 
65 #ifndef _CL_TMS_API_H
66 #define _CL_TMS_API_H
67 
68 # ifdef __cplusplus
69 extern "C" {
70 # endif
71 
72 #include <clCommon.h>
73 #include <clClmApi.h>
74 #include <clTmsApi.h>
75 
76 /*=========================================================================
77  * Type/constant definitions:
78  *=======================================================================*/
79 
83 #define clTmsInitialize clGmsInitialize
84 #define clTmsFinalize clGmsFinalize
85 
86 typedef ClGmsHandleT ClTmsHandleT;
88 typedef ClGmsGroupIdT ClTmsGroupIdT;
90 typedef ClGmsMemberIdT ClTmsMemberIdT;
92 typedef ClGmsLeadershipCredentialsT ClTmsLeadershipCredentialsT;
97 
98 /*=========================================================================
99  * Callback Functions:
100  *=======================================================================*/
101 typedef void (*ClTmsGroupMessageDeliveryCallbackT) (ClTmsGroupIdT groupId,
102  ClTmsMemberIdT senderId,
103  ClUint32T messageSize,
104  void *message);
105 
106 
107 /*=========================================================================
108  * API Functions:
109  *=======================================================================*/
110 
137 extern ClRcT clTmsGroupCreate(
138  CL_IN ClTmsHandleT svcHandle,
139  CL_IN ClTmsGroupNameT *groupName,
140  CL_INOUT ClTmsGroupParamsT *groupParams,
141  CL_OUT ClTmsGroupIdT *groupId);
142 
143 
163 extern ClRcT clTmsGroupDestroy(
164  CL_IN ClTmsHandleT svcHandle,
165  CL_IN ClTmsGroupIdT groupId);
166 
191 extern ClRcT clTmsGroupJoin(
192  CL_IN ClTmsHandleT svcHandle,
193  CL_IN ClTmsGroupIdT groupId,
194  CL_IN ClTmsMemberIdT memberId,
195  CL_IN ClTmsMemberNameT *memberName,
196  CL_IN ClTmsLeadershipCredentialsT credentials,
197  CL_IN ClTmsGroupMessageDeliveryCallbackT msgDeliveryCallback,
198  CL_IN ClTimeT timeout);
199 
200 
222 extern ClRcT clTmsGroupLeave(
223  CL_IN ClTmsHandleT svcHandle,
224  CL_IN ClTmsGroupIdT groupId,
225  CL_IN ClTmsMemberIdT memberId,
226  CL_IN ClTimeT timeout);
227 
254 extern ClRcT clTmsSendAll(
255  CL_IN ClGmsHandleT svcHandle,
256  CL_IN ClGmsGroupIdT groupId,
257  CL_IN ClGmsMemberIdT memberId,
258  CL_IN ClTimeT timeout,
259  CL_IN ClUint32T dataSize,
260  CL_IN ClPtrT data);
261 
285 extern ClRcT clTmsGroupTrack(
286  CL_IN ClTmsHandleT svcHandle,
287  CL_IN ClTmsGroupIdT groupId,
288  CL_IN ClUint8T trackFlags,
289  CL_INOUT ClTmsGroupNotificationBufferT *notificationBuffer);
290 
312  CL_IN ClTmsHandleT svcHandle,
313  CL_IN ClTmsGroupIdT groupId);
314 
343 extern ClRcT clTmsListGroups(
344  CL_IN ClTmsHandleT svcHandle,
345  CL_IN ClTimeT timeout,
346  CL_INOUT ClTmsGroupInfoListT *groups);
347 
348 
381 extern ClRcT clTmsGetGroupInfo(
382  CL_IN ClTmsHandleT svcHandle,
383  CL_IN ClTmsGroupNameT *groupName,
384  CL_IN ClTimeT timeout,
385  CL_INOUT ClTmsGroupInfoT *groupInfo);
386 
387 #ifdef __cplusplus
388 }
389 #endif
390 
391 #endif /* _CL_TMS_API_H_ */
392 

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