testexecmgmt/ucc/Source/Uccs.v2/ServiceStubs/GenericStub/GenericStub.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 __GENERICSTUB_H__
       
    22 #define __GENERICSTUB_H__
       
    23 #include <rpc/types.h>
       
    24 #include <rpc/rpc.h>
       
    25 
       
    26 #define ERR_NONE                                 0
       
    27 
       
    28 // errors
       
    29 #define ERR_SERVICE_ALREADY_STARTED             -1
       
    30 #define ERR_SERVICE_NOT_RUNNING                 -2
       
    31 #define ERR_ACTIVE_USER_SESSIONS                -3
       
    32 #define ERR_FAILED_TO_REMOVE_ACTIVE_SESSIONS    -4
       
    33 #define ERR_FAILED_TO_CREATE_COMPONENT_MANAGER  -5
       
    34 #define ERR_FAILED_TO_RETRIEVE_KEY              -6
       
    35 #define ERR_INSTANCE_DOES_NOT_EXIST             -7
       
    36 #define ERR_INVALID_METHOD                      -8
       
    37 #define ERR_CANNOT_CREATE_NEW_INSTANCE          -9
       
    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_INVALID_ERROR_CODE                  -16
       
    45 #define ERR_MISSING_PARAMETER                   -17
       
    46 #define ERR_INVALID_CALL                        -18
       
    47 
       
    48 #define ERR_INVALIDARG                          -50
       
    49 #define ERR_INVALIDSTATE                        -51
       
    50 #define ERR_GENERAL                             -52
       
    51 
       
    52 #define INFO_MAXIMUM_OBJECTS 256
       
    53 
       
    54 typedef struct {
       
    55 	u_int TComponentList_len;
       
    56 	int *TComponentList_val;
       
    57 } TComponentList;
       
    58 #ifdef __cplusplus
       
    59 extern "C" {
       
    60 bool_t xdr_GenericStub_TComponentList(...);
       
    61 }
       
    62 #else
       
    63 bool_t xdr_GenericStub_TComponentList();
       
    64 #endif
       
    65 
       
    66 #define MAXPARAMNAMELENGTH 128
       
    67 #define MAXPARAMVALUELENGTH 1024
       
    68 
       
    69 struct TStartupInfo {
       
    70 	int iEmpty;
       
    71 };
       
    72 typedef struct TStartupInfo TStartupInfo;
       
    73 #ifdef __cplusplus
       
    74 extern "C" {
       
    75 bool_t xdr_GenericStub_TStartupInfo(...);
       
    76 }
       
    77 #else
       
    78 bool_t xdr_GenericStub_TStartupInfo();
       
    79 #endif
       
    80 
       
    81 
       
    82 struct TParam {
       
    83 	char iName[MAXPARAMNAMELENGTH];
       
    84 	char iValue[MAXPARAMVALUELENGTH];
       
    85 };
       
    86 typedef struct TParam TParam;
       
    87 #ifdef __cplusplus
       
    88 extern "C" {
       
    89 bool_t xdr_GenericStub_TParam(...);
       
    90 }
       
    91 #else
       
    92 bool_t xdr_GenericStub_TParam();
       
    93 #endif
       
    94 
       
    95 
       
    96 struct TCall {
       
    97 	int iCallID;
       
    98 	struct {
       
    99 		u_int iParams_len;
       
   100 		TParam *iParams_val;
       
   101 	} iParams;
       
   102 };
       
   103 typedef struct TCall TCall;
       
   104 #ifdef __cplusplus
       
   105 extern "C" {
       
   106 bool_t xdr_GenericStub_TCall(...);
       
   107 }
       
   108 #else
       
   109 bool_t xdr_GenericStub_TCall();
       
   110 #endif
       
   111 
       
   112 #define SS_STARTUPRPCSERVICE ((u_long)1)
       
   113 #ifdef __cplusplus
       
   114 extern "C" {
       
   115 extern int *ss_startuprpcservice_11( TStartupInfo * arg, CLIENT *cl );
       
   116 }
       
   117 #else
       
   118 extern int *ss_startuprpcservice_11();
       
   119 #endif /* __cplusplus */
       
   120 #define SC_SHUTDOWNRPCSERVICE ((u_long)2)
       
   121 #ifdef __cplusplus
       
   122 extern "C" {
       
   123 extern int *sc_shutdownrpcservice_11( int * arg, CLIENT *cl );
       
   124 }
       
   125 #else
       
   126 extern int *sc_shutdownrpcservice_11();
       
   127 #endif /* __cplusplus */
       
   128 #define LIST_CONNECTIONS ((u_long)30)
       
   129 #ifdef __cplusplus
       
   130 extern "C" {
       
   131 extern TComponentList *list_connections_11( void * arg, CLIENT *cl );
       
   132 }
       
   133 #else
       
   134 extern TComponentList *list_connections_11();
       
   135 #endif /* __cplusplus */
       
   136 #define CSTR_STARTPROCESS ((u_long)31)
       
   137 #ifdef __cplusplus
       
   138 extern "C" {
       
   139 extern int *cstr_startprocess_11( char ** arg, CLIENT *cl );
       
   140 }
       
   141 #else
       
   142 extern int *cstr_startprocess_11();
       
   143 #endif /* __cplusplus */
       
   144 #define DSTR_REMOVEPROCESS ((u_long)32)
       
   145 #ifdef __cplusplus
       
   146 extern "C" {
       
   147 extern int *dstr_removeprocess_11( int * arg, CLIENT *cl );
       
   148 }
       
   149 #else
       
   150 extern int *dstr_removeprocess_11();
       
   151 #endif /* __cplusplus */
       
   152 #define RUN_COMMAND ((u_long)10)
       
   153 #ifdef __cplusplus
       
   154 extern "C" {
       
   155 extern int *run_command_11( TCall * arg, CLIENT *cl );
       
   156 }
       
   157 #else
       
   158 extern int *run_command_11();
       
   159 #endif /* __cplusplus */
       
   160 
       
   161 #endif /* __GENERICSTUB_H__ */