testexecmgmt/ucc/Source/Uccs.v2/ServiceStubs/GPSSimulator/APICommandHandler_clnt.c
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 #include <rpc/rpc.h>
       
    22 #include "APICommandHandler.h"
       
    23 
       
    24 /* Default timeout can be changed using clnt_control() */
       
    25 static struct timeval TIMEOUT = { 25, 0 };
       
    26 
       
    27 int *
       
    28 ss_startuprpcservice_10(argp, clnt)
       
    29 	TStartupInfo *argp;
       
    30 	CLIENT *clnt;
       
    31 {
       
    32 	static int res;
       
    33 
       
    34 	bzero((char *)&res, sizeof(res));
       
    35 	clnt_call(clnt, SS_STARTUPRPCSERVICE, xdr_APICommandHandler_TStartupInfo, argp, xdr_int, &res, TIMEOUT);
       
    36 	return (&res);
       
    37 }
       
    38 
       
    39 
       
    40 int *
       
    41 sc_shutdownrpcservice_10(argp, clnt)
       
    42 	int *argp;
       
    43 	CLIENT *clnt;
       
    44 {
       
    45 	static int res;
       
    46 
       
    47 	bzero((char *)&res, sizeof(res));
       
    48 	clnt_call(clnt, SC_SHUTDOWNRPCSERVICE, xdr_int, argp, xdr_int, &res, TIMEOUT);
       
    49 	return (&res);
       
    50 }
       
    51 
       
    52 
       
    53 TComponentList *
       
    54 list_connections_1(argp, clnt)
       
    55 	void *argp;
       
    56 	CLIENT *clnt;
       
    57 {
       
    58 	static TComponentList res;
       
    59 
       
    60 	bzero((char *)&res, sizeof(res));
       
    61 	clnt_call(clnt, LIST_CONNECTIONS, xdr_void, argp, xdr_APICommandHandler_TComponentList, &res, TIMEOUT);
       
    62 	return (&res);
       
    63 }
       
    64 
       
    65 
       
    66 int *
       
    67 cstr_startprocess_1(argp, clnt)
       
    68 	char **argp;
       
    69 	CLIENT *clnt;
       
    70 {
       
    71 	static int res;
       
    72 
       
    73 	bzero((char *)&res, sizeof(res));
       
    74 	clnt_call(clnt, CSTR_STARTPROCESS, xdr_wrapstring, argp, xdr_int, &res, TIMEOUT);
       
    75 	return (&res);
       
    76 }
       
    77 
       
    78 
       
    79 int *
       
    80 dstr_removeprocess_1(argp, clnt)
       
    81 	int *argp;
       
    82 	CLIENT *clnt;
       
    83 {
       
    84 	static int res;
       
    85 
       
    86 	bzero((char *)&res, sizeof(res));
       
    87 	clnt_call(clnt, DSTR_REMOVEPROCESS, xdr_int, argp, xdr_int, &res, TIMEOUT);
       
    88 	return (&res);
       
    89 }
       
    90 
       
    91 
       
    92 int *
       
    93 startsimulator_1(argp, clnt)
       
    94 	void *argp;
       
    95 	CLIENT *clnt;
       
    96 {
       
    97 	static int res;
       
    98 
       
    99 	bzero((char *)&res, sizeof(res));
       
   100 	clnt_call(clnt, STARTSIMULATOR, xdr_void, argp, xdr_int, &res, TIMEOUT);
       
   101 	return (&res);
       
   102 }
       
   103 
       
   104 
       
   105 int *
       
   106 stopsimulator_1(argp, clnt)
       
   107 	void *argp;
       
   108 	CLIENT *clnt;
       
   109 {
       
   110 	static int res;
       
   111 
       
   112 	bzero((char *)&res, sizeof(res));
       
   113 	clnt_call(clnt, STOPSIMULATOR, xdr_void, argp, xdr_int, &res, TIMEOUT);
       
   114 	return (&res);
       
   115 }
       
   116 
       
   117 
       
   118 int *
       
   119 setfielddefault_1(argp, clnt)
       
   120 	TField *argp;
       
   121 	CLIENT *clnt;
       
   122 {
       
   123 	static int res;
       
   124 
       
   125 	bzero((char *)&res, sizeof(res));
       
   126 	clnt_call(clnt, SETFIELDDEFAULT, xdr_APICommandHandler_TField, argp, xdr_int, &res, TIMEOUT);
       
   127 	return (&res);
       
   128 }
       
   129 
       
   130 
       
   131 int *
       
   132 setsatellitedefault_1(argp, clnt)
       
   133 	TSatellite *argp;
       
   134 	CLIENT *clnt;
       
   135 {
       
   136 	static int res;
       
   137 
       
   138 	bzero((char *)&res, sizeof(res));
       
   139 	clnt_call(clnt, SETSATELLITEDEFAULT, xdr_APICommandHandler_TSatellite, argp, xdr_int, &res, TIMEOUT);
       
   140 	return (&res);
       
   141 }
       
   142 
       
   143 
       
   144 int *
       
   145 positionset_1(argp, clnt)
       
   146 	TPositionInfo *argp;
       
   147 	CLIENT *clnt;
       
   148 {
       
   149 	static int res;
       
   150 
       
   151 	bzero((char *)&res, sizeof(res));
       
   152 	clnt_call(clnt, POSITIONSET, xdr_APICommandHandler_TPositionInfo, argp, xdr_int, &res, TIMEOUT);
       
   153 	return (&res);
       
   154 }
       
   155 
       
   156 
       
   157 int *
       
   158 courseset_1(argp, clnt)
       
   159 	TCourse *argp;
       
   160 	CLIENT *clnt;
       
   161 {
       
   162 	static int res;
       
   163 
       
   164 	bzero((char *)&res, sizeof(res));
       
   165 	clnt_call(clnt, COURSESET, xdr_APICommandHandler_TCourse, argp, xdr_int, &res, TIMEOUT);
       
   166 	return (&res);
       
   167 }
       
   168 
       
   169 
       
   170 int *
       
   171 accuracyset_1(argp, clnt)
       
   172 	TAccuracy *argp;
       
   173 	CLIENT *clnt;
       
   174 {
       
   175 	static int res;
       
   176 
       
   177 	bzero((char *)&res, sizeof(res));
       
   178 	clnt_call(clnt, ACCURACYSET, xdr_APICommandHandler_TAccuracy, argp, xdr_int, &res, TIMEOUT);
       
   179 	return (&res);
       
   180 }
       
   181 
       
   182 
       
   183 int *
       
   184 satelliteset_1(argp, clnt)
       
   185 	TSatellite *argp;
       
   186 	CLIENT *clnt;
       
   187 {
       
   188 	static int res;
       
   189 
       
   190 	bzero((char *)&res, sizeof(res));
       
   191 	clnt_call(clnt, SATELLITESET, xdr_APICommandHandler_TSatellite, argp, xdr_int, &res, TIMEOUT);
       
   192 	return (&res);
       
   193 }
       
   194 
       
   195 
       
   196 int *
       
   197 batchappendsentence_1(argp, clnt)
       
   198 	TAppendSentence *argp;
       
   199 	CLIENT *clnt;
       
   200 {
       
   201 	static int res;
       
   202 
       
   203 	bzero((char *)&res, sizeof(res));
       
   204 	clnt_call(clnt, BATCHAPPENDSENTENCE, xdr_APICommandHandler_TAppendSentence, argp, xdr_int, &res, TIMEOUT);
       
   205 	return (&res);
       
   206 }
       
   207 
       
   208 
       
   209 int *
       
   210 batchappendusersentence_1(argp, clnt)
       
   211 	TAppendUserSentence *argp;
       
   212 	CLIENT *clnt;
       
   213 {
       
   214 	static int res;
       
   215 
       
   216 	bzero((char *)&res, sizeof(res));
       
   217 	clnt_call(clnt, BATCHAPPENDUSERSENTENCE, xdr_APICommandHandler_TAppendUserSentence, argp, xdr_int, &res, TIMEOUT);
       
   218 	return (&res);
       
   219 }
       
   220 
       
   221 
       
   222 int *
       
   223 batchsetdelay_1(argp, clnt)
       
   224 	int *argp;
       
   225 	CLIENT *clnt;
       
   226 {
       
   227 	static int res;
       
   228 
       
   229 	bzero((char *)&res, sizeof(res));
       
   230 	clnt_call(clnt, BATCHSETDELAY, xdr_int, argp, xdr_int, &res, TIMEOUT);
       
   231 	return (&res);
       
   232 }
       
   233 
       
   234 
       
   235 int *
       
   236 batchreset_1(argp, clnt)
       
   237 	void *argp;
       
   238 	CLIENT *clnt;
       
   239 {
       
   240 	static int res;
       
   241 
       
   242 	bzero((char *)&res, sizeof(res));
       
   243 	clnt_call(clnt, BATCHRESET, xdr_void, argp, xdr_int, &res, TIMEOUT);
       
   244 	return (&res);
       
   245 }
       
   246 
       
   247 
       
   248 int *
       
   249 setcomport_1(argp, clnt)
       
   250 	char **argp;
       
   251 	CLIENT *clnt;
       
   252 {
       
   253 	static int res;
       
   254 
       
   255 	bzero((char *)&res, sizeof(res));
       
   256 	clnt_call(clnt, SETCOMPORT, xdr_wrapstring, argp, xdr_int, &res, TIMEOUT);
       
   257 	return (&res);
       
   258 }
       
   259 
       
   260 
       
   261 int *
       
   262 setchunkmode_1(argp, clnt)
       
   263 	bool_t *argp;
       
   264 	CLIENT *clnt;
       
   265 {
       
   266 	static int res;
       
   267 
       
   268 	bzero((char *)&res, sizeof(res));
       
   269 	clnt_call(clnt, SETCHUNKMODE, xdr_bool, argp, xdr_int, &res, TIMEOUT);
       
   270 	return (&res);
       
   271 }
       
   272 
       
   273 
       
   274 int *
       
   275 setchunksize_1(argp, clnt)
       
   276 	int *argp;
       
   277 	CLIENT *clnt;
       
   278 {
       
   279 	static int res;
       
   280 
       
   281 	bzero((char *)&res, sizeof(res));
       
   282 	clnt_call(clnt, SETCHUNKSIZE, xdr_int, argp, xdr_int, &res, TIMEOUT);
       
   283 	return (&res);
       
   284 }
       
   285 
       
   286 
       
   287 int *
       
   288 setchunkdelay_1(argp, clnt)
       
   289 	int *argp;
       
   290 	CLIENT *clnt;
       
   291 {
       
   292 	static int res;
       
   293 
       
   294 	bzero((char *)&res, sizeof(res));
       
   295 	clnt_call(clnt, SETCHUNKDELAY, xdr_int, argp, xdr_int, &res, TIMEOUT);
       
   296 	return (&res);
       
   297 }
       
   298 
       
   299 
       
   300 int *
       
   301 startcomms_1(argp, clnt)
       
   302 	void *argp;
       
   303 	CLIENT *clnt;
       
   304 {
       
   305 	static int res;
       
   306 
       
   307 	bzero((char *)&res, sizeof(res));
       
   308 	clnt_call(clnt, STARTCOMMS, xdr_void, argp, xdr_int, &res, TIMEOUT);
       
   309 	return (&res);
       
   310 }
       
   311 
       
   312 
       
   313 int *
       
   314 stopcomms_1(argp, clnt)
       
   315 	void *argp;
       
   316 	CLIENT *clnt;
       
   317 {
       
   318 	static int res;
       
   319 
       
   320 	bzero((char *)&res, sizeof(res));
       
   321 	clnt_call(clnt, STOPCOMMS, xdr_void, argp, xdr_int, &res, TIMEOUT);
       
   322 	return (&res);
       
   323 }
       
   324 
       
   325 
       
   326 int *
       
   327 batchappenduserstring_1(argp, clnt)
       
   328 	TAppendString *argp;
       
   329 	CLIENT *clnt;
       
   330 {
       
   331 	static int res;
       
   332 
       
   333 	bzero((char *)&res, sizeof(res));
       
   334 	clnt_call(clnt, BATCHAPPENDUSERSTRING, xdr_APICommandHandler_TAppendString, argp, xdr_int, &res, TIMEOUT);
       
   335 	return (&res);
       
   336 }
       
   337