testexecmgmt/ucc/Source/Uccs.v2/ServiceStubs/HostExecute/hostexecute.h
changeset 0 3da2a79470a7
equal deleted inserted replaced
-1:000000000000 0:3da2a79470a7
       
     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_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_hostexecute_TComponentList(...);
       
    56 }
       
    57 #else
       
    58 bool_t xdr_hostexecute_TComponentList();
       
    59 #endif
       
    60 
       
    61 #define MAXCOMMANDLINE 1024
       
    62 #define ERR_WAIT_PROCESS_ERROR -103
       
    63 #define ERR_START_PROCESS_ERROR -105
       
    64 #define ERR_STOP_PROCESS_ERROR -106
       
    65 #define ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE -111
       
    66 #define ERR_SET_SIGNAL_ERROR -120
       
    67 #define ERR_EXECUTE_PROCESS_ERROR -122
       
    68 
       
    69 typedef struct {
       
    70 	u_int TVarData_len;
       
    71 	char *TVarData_val;
       
    72 } TVarData;
       
    73 #ifdef __cplusplus
       
    74 extern "C" {
       
    75 bool_t xdr_hostexecute_TVarData(...);
       
    76 }
       
    77 #else
       
    78 bool_t xdr_hostexecute_TVarData();
       
    79 #endif
       
    80 
       
    81 
       
    82 struct TStartupInfo {
       
    83 	int iEmpty;
       
    84 };
       
    85 typedef struct TStartupInfo TStartupInfo;
       
    86 #ifdef __cplusplus
       
    87 extern "C" {
       
    88 bool_t xdr_hostexecute_TStartupInfo(...);
       
    89 }
       
    90 #else
       
    91 bool_t xdr_hostexecute_TStartupInfo();
       
    92 #endif
       
    93 
       
    94 
       
    95 struct TExecuteRequest {
       
    96 	char iCommandLine[MAXCOMMANDLINE];
       
    97 	int iRecordStandardOut;
       
    98 	int iRecordStandartError;
       
    99 	int iTimeout;
       
   100 };
       
   101 typedef struct TExecuteRequest TExecuteRequest;
       
   102 #ifdef __cplusplus
       
   103 extern "C" {
       
   104 bool_t xdr_hostexecute_TExecuteRequest(...);
       
   105 }
       
   106 #else
       
   107 bool_t xdr_hostexecute_TExecuteRequest();
       
   108 #endif
       
   109 
       
   110 
       
   111 struct TExecuteResult {
       
   112 	int iResult;
       
   113 	int iErrorCode;
       
   114 	int iErrorDetail;
       
   115 	int iProcessExitReason;
       
   116 	int iProcessExitDetail;
       
   117 	TVarData iStandardOut;
       
   118 	TVarData iStandardError;
       
   119 };
       
   120 typedef struct TExecuteResult TExecuteResult;
       
   121 #ifdef __cplusplus
       
   122 extern "C" {
       
   123 bool_t xdr_hostexecute_TExecuteResult(...);
       
   124 }
       
   125 #else
       
   126 bool_t xdr_hostexecute_TExecuteResult();
       
   127 #endif
       
   128 
       
   129 
       
   130 #define HOSTEXECUTE ((u_long)0x34630203)
       
   131 #define HOSTEXECUTE_VERSION ((u_long)3)
       
   132 #define SS_STARTUPRPCSERVICE ((u_long)1)
       
   133 #ifdef __cplusplus
       
   134 extern "C" {
       
   135 extern int *ss_startuprpcservice_3( TStartupInfo * arg, CLIENT *cl );
       
   136 }
       
   137 #else
       
   138 extern int *ss_startuprpcservice_3();
       
   139 #endif /* __cplusplus */
       
   140 #define SC_SHUTDOWNRPCSERVICE ((u_long)2)
       
   141 #ifdef __cplusplus
       
   142 extern "C" {
       
   143 extern int *sc_shutdownrpcservice_3( int * arg, CLIENT *cl );
       
   144 }
       
   145 #else
       
   146 extern int *sc_shutdownrpcservice_3();
       
   147 #endif /* __cplusplus */
       
   148 #define LIST_DEVICES ((u_long)30)
       
   149 #ifdef __cplusplus
       
   150 extern "C" {
       
   151 extern TComponentList *list_devices_3( void * arg, CLIENT *cl );
       
   152 }
       
   153 #else
       
   154 extern TComponentList *list_devices_3();
       
   155 #endif /* __cplusplus */
       
   156 #define ST_EXECUTECOMMAND ((u_long)3)
       
   157 #ifdef __cplusplus
       
   158 extern "C" {
       
   159 extern TExecuteResult *st_executecommand_3( TExecuteRequest * arg, CLIENT *cl );
       
   160 }
       
   161 #else
       
   162 extern TExecuteResult *st_executecommand_3();
       
   163 #endif /* __cplusplus */
       
   164 
       
   165 #endif /* __HOSTEXECUTE_H__ */