|
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 |
|
21 #ifndef __TESTSERVICE_H__ |
|
22 #define __TESTSERVICE_H__ |
|
23 #include <rpc/types.h> |
|
24 #include <rpc/rpc.h> |
|
25 |
|
26 #define ERR_NONE 0 |
|
27 #define ERR_INVALID_ERROR_CODE -16 |
|
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_CANNOT_CREATE_NEW_INSTANCE -9 |
|
36 #define ERR_MISSING_PARAMETER -17 |
|
37 #define ERR_INVALID_METHOD -8 |
|
38 #define ERR_STUB_ALREADY_CONNECTED -10 |
|
39 #define ERR_FAILED_TO_CONNECT -11 |
|
40 #define ERR_STUB_NOT_CONNECTED -12 |
|
41 #define ERR_INVALID_RV_POINTER -13 |
|
42 #define ERR_RPC_ERROR -14 |
|
43 #define ERR_INVALID_SERVICE -15 |
|
44 #define ERR_INVALIDARG -50 |
|
45 #define ERR_INVALIDSTATE -51 |
|
46 #define ERR_GENERAL -52 |
|
47 #define INFO_MAXIMUM_OBJECTS 256 |
|
48 |
|
49 typedef struct { |
|
50 u_int TComponentList_len; |
|
51 int *TComponentList_val; |
|
52 } TComponentList; |
|
53 #ifdef __cplusplus |
|
54 extern "C" { |
|
55 bool_t xdr_testservice_TComponentList(...); |
|
56 } |
|
57 #else |
|
58 bool_t xdr_testservice_TComponentList(); |
|
59 #endif |
|
60 |
|
61 |
|
62 struct TResult { |
|
63 int iStandardResult; |
|
64 int iExtendedCode; |
|
65 int iSystemError; |
|
66 }; |
|
67 typedef struct TResult TResult; |
|
68 #ifdef __cplusplus |
|
69 extern "C" { |
|
70 bool_t xdr_testservice_TResult(...); |
|
71 } |
|
72 #else |
|
73 bool_t xdr_testservice_TResult(); |
|
74 #endif |
|
75 |
|
76 |
|
77 struct TStartupInfo { |
|
78 int iEmpty; |
|
79 }; |
|
80 typedef struct TStartupInfo TStartupInfo; |
|
81 #ifdef __cplusplus |
|
82 extern "C" { |
|
83 bool_t xdr_testservice_TStartupInfo(...); |
|
84 } |
|
85 #else |
|
86 bool_t xdr_testservice_TStartupInfo(); |
|
87 #endif |
|
88 |
|
89 |
|
90 #define TESTSERVICE ((u_long)0x34630211) |
|
91 #define TESTSERVICE_VERSION ((u_long)11) |
|
92 #define SS_STARTUPRPCSERVICE ((u_long)1) |
|
93 #ifdef __cplusplus |
|
94 extern "C" { |
|
95 extern int *ss_startuprpcservice_11( TStartupInfo * arg, CLIENT *cl ); |
|
96 } |
|
97 #else |
|
98 extern int *ss_startuprpcservice_11(); |
|
99 #endif /* __cplusplus */ |
|
100 #define SC_SHUTDOWNRPCSERVICE ((u_long)2) |
|
101 #ifdef __cplusplus |
|
102 extern "C" { |
|
103 extern int *sc_shutdownrpcservice_11( int * arg, CLIENT *cl ); |
|
104 } |
|
105 #else |
|
106 extern int *sc_shutdownrpcservice_11(); |
|
107 #endif /* __cplusplus */ |
|
108 #define LIST_DEVICES ((u_long)3) |
|
109 #ifdef __cplusplus |
|
110 extern "C" { |
|
111 extern TComponentList *list_devices_11( void * arg, CLIENT *cl ); |
|
112 } |
|
113 #else |
|
114 extern TComponentList *list_devices_11(); |
|
115 #endif /* __cplusplus */ |
|
116 #define ST_DISCARD ((u_long)10) |
|
117 #ifdef __cplusplus |
|
118 extern "C" { |
|
119 extern TResult *st_discard_11( int * arg, CLIENT *cl ); |
|
120 } |
|
121 #else |
|
122 extern TResult *st_discard_11(); |
|
123 #endif /* __cplusplus */ |
|
124 #define ST_BLOCK ((u_long)11) |
|
125 #ifdef __cplusplus |
|
126 extern "C" { |
|
127 extern TResult *st_block_11( int * arg, CLIENT *cl ); |
|
128 } |
|
129 #else |
|
130 extern TResult *st_block_11(); |
|
131 #endif /* __cplusplus */ |
|
132 #define ST_WAIT ((u_long)12) |
|
133 #ifdef __cplusplus |
|
134 extern "C" { |
|
135 extern TResult *st_wait_11( int * arg, CLIENT *cl ); |
|
136 } |
|
137 #else |
|
138 extern TResult *st_wait_11(); |
|
139 #endif /* __cplusplus */ |
|
140 |
|
141 #endif /* __TESTSERVICE_H__ */ |