0
|
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 __HOSTEXECUTE_H__
|
|
22 |
#define __HOSTEXECUTE_H__
|
|
23 |
#include <rpc/types.h>
|
|
24 |
#include <rpc/rpc.h>
|
|
25 |
|
|
26 |
#define ERR_NONE 0
|
|
27 |
#define ERR_SERVICE_ALREADY_STARTED -1
|
|
28 |
#define ERR_SERVICE_NOT_RUNNING -2
|
|
29 |
#define ERR_ACTIVE_USER_SESSIONS -3
|
|
30 |
#define ERR_FAILED_TO_REMOVE_ACTIVE_SESSIONS -4
|
|
31 |
#define ERR_FAILED_TO_CREATE_COMPONENT_MANAGER -5
|
|
32 |
#define ERR_FAILED_TO_RETRIEVE_KEY -6
|
|
33 |
#define ERR_INSTANCE_DOES_NOT_EXIST -7
|
|
34 |
#define ERR_INVALID_METHOD -8
|
|
35 |
#define ERR_CANNOT_CREATE_NEW_INSTANCE -9
|
|
36 |
#define ERR_STUB_ALREADY_CONNECTED -10
|
|
37 |
#define ERR_FAILED_TO_CONNECT -11
|
|
38 |
#define ERR_STUB_NOT_CONNECTED -12
|
|
39 |
#define ERR_INVALID_RV_POINTER -13
|
|
40 |
#define ERR_RPC_ERROR -14
|
|
41 |
#define ERR_INVALIDARG -50
|
|
42 |
#define ERR_INVALIDSTATE -51
|
|
43 |
#define ERR_GENERAL -52
|
|
44 |
#define INFO_MAXIMUM_OBJECTS 256
|
|
45 |
|
|
46 |
typedef struct {
|
|
47 |
u_int TComponentList_len;
|
|
48 |
int *TComponentList_val;
|
|
49 |
} TComponentList;
|
|
50 |
#ifdef __cplusplus
|
|
51 |
extern "C" {
|
|
52 |
bool_t xdr_hostexecute_TComponentList(...);
|
|
53 |
}
|
|
54 |
#else
|
|
55 |
bool_t xdr_hostexecute_TComponentList();
|
|
56 |
#endif
|
|
57 |
|
|
58 |
#define MAXCOMMANDLINE 1024
|
|
59 |
#define ERR_WAIT_PROCESS_ERROR -103
|
|
60 |
#define ERR_START_PROCESS_ERROR -105
|
|
61 |
#define ERR_STOP_PROCESS_ERROR -106
|
|
62 |
#define ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE -111
|
|
63 |
#define ERR_SET_SIGNAL_ERROR -120
|
|
64 |
#define ERR_EXECUTE_PROCESS_ERROR -122
|
|
65 |
|
|
66 |
typedef struct {
|
|
67 |
u_int TVarData_len;
|
|
68 |
char *TVarData_val;
|
|
69 |
} TVarData;
|
|
70 |
#ifdef __cplusplus
|
|
71 |
extern "C" {
|
|
72 |
bool_t xdr_hostexecute_TVarData(...);
|
|
73 |
}
|
|
74 |
#else
|
|
75 |
bool_t xdr_hostexecute_TVarData();
|
|
76 |
#endif
|
|
77 |
|
|
78 |
|
|
79 |
struct TStartupInfo {
|
|
80 |
int iEmpty;
|
|
81 |
};
|
|
82 |
typedef struct TStartupInfo TStartupInfo;
|
|
83 |
#ifdef __cplusplus
|
|
84 |
extern "C" {
|
|
85 |
bool_t xdr_hostexecute_TStartupInfo(...);
|
|
86 |
}
|
|
87 |
#else
|
|
88 |
bool_t xdr_hostexecute_TStartupInfo();
|
|
89 |
#endif
|
|
90 |
|
|
91 |
|
|
92 |
struct TExecuteRequest {
|
|
93 |
char iCommandLine[MAXCOMMANDLINE];
|
|
94 |
int iRecordStandardOut;
|
|
95 |
int iRecordStandartError;
|
|
96 |
int iTimeout;
|
|
97 |
};
|
|
98 |
typedef struct TExecuteRequest TExecuteRequest;
|
|
99 |
#ifdef __cplusplus
|
|
100 |
extern "C" {
|
|
101 |
bool_t xdr_hostexecute_TExecuteRequest(...);
|
|
102 |
}
|
|
103 |
#else
|
|
104 |
bool_t xdr_hostexecute_TExecuteRequest();
|
|
105 |
#endif
|
|
106 |
|
|
107 |
|
|
108 |
struct TExecuteResult {
|
|
109 |
int iResult;
|
|
110 |
int iErrorCode;
|
|
111 |
int iErrorDetail;
|
|
112 |
int iProcessExitReason;
|
|
113 |
int iProcessExitDetail;
|
|
114 |
TVarData iStandardOut;
|
|
115 |
TVarData iStandardError;
|
|
116 |
};
|
|
117 |
typedef struct TExecuteResult TExecuteResult;
|
|
118 |
#ifdef __cplusplus
|
|
119 |
extern "C" {
|
|
120 |
bool_t xdr_hostexecute_TExecuteResult(...);
|
|
121 |
}
|
|
122 |
#else
|
|
123 |
bool_t xdr_hostexecute_TExecuteResult();
|
|
124 |
#endif
|
|
125 |
|
|
126 |
|
|
127 |
#define HOSTEXECUTE ((u_long)0x34630203)
|
|
128 |
#define HOSTEXECUTE_VERSION ((u_long)3)
|
|
129 |
#define SS_STARTUPRPCSERVICE ((u_long)1)
|
|
130 |
#ifdef __cplusplus
|
|
131 |
extern "C" {
|
|
132 |
extern int *ss_startuprpcservice_3( TStartupInfo * arg, CLIENT *cl );
|
|
133 |
}
|
|
134 |
#else
|
|
135 |
extern int *ss_startuprpcservice_3();
|
|
136 |
#endif /* __cplusplus */
|
|
137 |
#define SC_SHUTDOWNRPCSERVICE ((u_long)2)
|
|
138 |
#ifdef __cplusplus
|
|
139 |
extern "C" {
|
|
140 |
extern int *sc_shutdownrpcservice_3( int * arg, CLIENT *cl );
|
|
141 |
}
|
|
142 |
#else
|
|
143 |
extern int *sc_shutdownrpcservice_3();
|
|
144 |
#endif /* __cplusplus */
|
|
145 |
#define LIST_DEVICES ((u_long)30)
|
|
146 |
#ifdef __cplusplus
|
|
147 |
extern "C" {
|
|
148 |
extern TComponentList *list_devices_3( void * arg, CLIENT *cl );
|
|
149 |
}
|
|
150 |
#else
|
|
151 |
extern TComponentList *list_devices_3();
|
|
152 |
#endif /* __cplusplus */
|
|
153 |
#define ST_EXECUTECOMMAND ((u_long)3)
|
|
154 |
#ifdef __cplusplus
|
|
155 |
extern "C" {
|
|
156 |
extern TExecuteResult *st_executecommand_3( TExecuteRequest * arg, CLIENT *cl );
|
|
157 |
}
|
|
158 |
#else
|
|
159 |
extern TExecuteResult *st_executecommand_3();
|
|
160 |
#endif /* __cplusplus */
|
|
161 |
|
|
162 |
#endif /* __HOSTEXECUTE_H__ */
|