|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __GENERICSTUB_H__ |
|
21 #define __GENERICSTUB_H__ |
|
22 #include <rpc/types.h> |
|
23 #include <rpc/rpc.h> |
|
24 |
|
25 #define ERR_NONE 0 |
|
26 |
|
27 // errors |
|
28 #define ERR_SERVICE_ALREADY_STARTED -1 |
|
29 #define ERR_SERVICE_NOT_RUNNING -2 |
|
30 #define ERR_ACTIVE_USER_SESSIONS -3 |
|
31 #define ERR_FAILED_TO_REMOVE_ACTIVE_SESSIONS -4 |
|
32 #define ERR_FAILED_TO_CREATE_COMPONENT_MANAGER -5 |
|
33 #define ERR_FAILED_TO_RETRIEVE_KEY -6 |
|
34 #define ERR_INSTANCE_DOES_NOT_EXIST -7 |
|
35 #define ERR_INVALID_METHOD -8 |
|
36 #define ERR_CANNOT_CREATE_NEW_INSTANCE -9 |
|
37 #define ERR_STUB_ALREADY_CONNECTED -10 |
|
38 #define ERR_FAILED_TO_CONNECT -11 |
|
39 #define ERR_STUB_NOT_CONNECTED -12 |
|
40 #define ERR_INVALID_RV_POINTER -13 |
|
41 #define ERR_RPC_ERROR -14 |
|
42 #define ERR_INVALID_SERVICE -15 |
|
43 #define ERR_INVALID_ERROR_CODE -16 |
|
44 #define ERR_MISSING_PARAMETER -17 |
|
45 #define ERR_INVALID_CALL -18 |
|
46 |
|
47 #define ERR_INVALIDARG -50 |
|
48 #define ERR_INVALIDSTATE -51 |
|
49 #define ERR_GENERAL -52 |
|
50 |
|
51 |
|
52 #define INFO_MAXIMUM_OBJECTS 256 |
|
53 |
|
54 #ifdef __cplusplus |
|
55 extern "C" { |
|
56 #endif |
|
57 extern int StartUCCService( int anIID, int aVersion ); |
|
58 #ifdef __cplusplus |
|
59 } // extern "C" |
|
60 #endif |
|
61 |
|
62 typedef struct { |
|
63 u_int TComponentList_len; |
|
64 int *TComponentList_val; |
|
65 } TComponentList; |
|
66 #ifdef __cplusplus |
|
67 extern "C" { |
|
68 bool_t xdr_GenericStub_TComponentList(...); |
|
69 } |
|
70 #else |
|
71 bool_t xdr_GenericStub_TComponentList(); |
|
72 #endif |
|
73 |
|
74 #define MAXPARAMNAMELENGTH 128 |
|
75 #define MAXPARAMVALUELENGTH 1024 |
|
76 |
|
77 struct TStartupInfo { |
|
78 int iEmpty; |
|
79 }; |
|
80 typedef struct TStartupInfo TStartupInfo; |
|
81 #ifdef __cplusplus |
|
82 extern "C" { |
|
83 bool_t xdr_GenericStub_TStartupInfo(...); |
|
84 } |
|
85 #else |
|
86 bool_t xdr_GenericStub_TStartupInfo(); |
|
87 #endif |
|
88 |
|
89 |
|
90 struct TParam { |
|
91 char iName[MAXPARAMNAMELENGTH]; |
|
92 char iValue[MAXPARAMVALUELENGTH]; |
|
93 }; |
|
94 typedef struct TParam TParam; |
|
95 #ifdef __cplusplus |
|
96 extern "C" { |
|
97 bool_t xdr_GenericStub_TParam(...); |
|
98 } |
|
99 #else |
|
100 bool_t xdr_GenericStub_TParam(); |
|
101 #endif |
|
102 |
|
103 |
|
104 struct TCall { |
|
105 int iCallID; |
|
106 struct { |
|
107 u_int iParams_len; |
|
108 TParam *iParams_val; |
|
109 } iParams; |
|
110 }; |
|
111 typedef struct TCall TCall; |
|
112 #ifdef __cplusplus |
|
113 extern "C" { |
|
114 bool_t xdr_GenericStub_TCall(...); |
|
115 } |
|
116 #else |
|
117 bool_t xdr_GenericStub_TCall(); |
|
118 #endif |
|
119 |
|
120 #define SS_STARTUPRPCSERVICE ((u_long)1) |
|
121 #ifdef __cplusplus |
|
122 extern "C" { |
|
123 extern int *ss_startuprpcservice_1( TStartupInfo * arg, CLIENT *cl ); |
|
124 } |
|
125 #else |
|
126 extern int *ss_startuprpcservice_1(); |
|
127 #endif /* __cplusplus */ |
|
128 #define SC_SHUTDOWNRPCSERVICE ((u_long)2) |
|
129 #ifdef __cplusplus |
|
130 extern "C" { |
|
131 extern int *sc_shutdownrpcservice_1( int * arg, CLIENT *cl ); |
|
132 } |
|
133 #else |
|
134 extern int *sc_shutdownrpcservice_1(); |
|
135 #endif /* __cplusplus */ |
|
136 #define LIST_CONNECTIONS ((u_long)30) |
|
137 #ifdef __cplusplus |
|
138 extern "C" { |
|
139 extern TComponentList *list_connections_1( void * arg, CLIENT *cl ); |
|
140 } |
|
141 #else |
|
142 extern TComponentList *list_connections_1(); |
|
143 #endif /* __cplusplus */ |
|
144 #define CSTR_STARTPROCESS ((u_long)31) |
|
145 #ifdef __cplusplus |
|
146 extern "C" { |
|
147 extern int *cstr_startprocess_1( char ** arg, CLIENT *cl ); |
|
148 } |
|
149 #else |
|
150 extern int *cstr_startprocess_1(); |
|
151 #endif /* __cplusplus */ |
|
152 #define DSTR_REMOVEPROCESS ((u_long)32) |
|
153 #ifdef __cplusplus |
|
154 extern "C" { |
|
155 extern int *dstr_removeprocess_1( int * arg, CLIENT *cl ); |
|
156 } |
|
157 #else |
|
158 extern int *dstr_removeprocess_1(); |
|
159 #endif /* __cplusplus */ |
|
160 #define RUN_COMMAND ((u_long)10) |
|
161 #ifdef __cplusplus |
|
162 extern "C" { |
|
163 extern int *run_command_1( TCall * arg, CLIENT *cl ); |
|
164 } |
|
165 #else |
|
166 extern int *run_command_1(); |
|
167 #endif /* __cplusplus */ |
|
168 |
|
169 #endif /* __GENERICSTUB_H__ */ |