testexecmgmt/ucc/Source/HostExecuteSimple/hostexecute_xdr.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 "hostexecute.h"
       
    23 
       
    24 
       
    25 bool_t
       
    26 xdr_hostexecute_TComponentList(xdrs, objp)
       
    27 	XDR *xdrs;
       
    28 	TComponentList *objp;
       
    29 {
       
    30 	if (!xdr_array(xdrs, (char **)&objp->TComponentList_val, (u_int *)&objp->TComponentList_len, ~0, sizeof(int), (void*)xdr_int)) {
       
    31 		return (FALSE);
       
    32 	}
       
    33 	return (TRUE);
       
    34 }
       
    35 
       
    36 
       
    37 
       
    38 
       
    39 bool_t
       
    40 xdr_hostexecute_TVarData(xdrs, objp)
       
    41 	XDR *xdrs;
       
    42 	TVarData *objp;
       
    43 {
       
    44 	if (!xdr_bytes(xdrs, (char **)&objp->TVarData_val, (u_int *)&objp->TVarData_len, ~0)) {
       
    45 		return (FALSE);
       
    46 	}
       
    47 	return (TRUE);
       
    48 }
       
    49 
       
    50 
       
    51 
       
    52 
       
    53 bool_t
       
    54 xdr_hostexecute_TStartupInfo(xdrs, objp)
       
    55 	XDR *xdrs;
       
    56 	TStartupInfo *objp;
       
    57 {
       
    58 	if (!xdr_int(xdrs, &objp->iEmpty)) {
       
    59 		return (FALSE);
       
    60 	}
       
    61 	return (TRUE);
       
    62 }
       
    63 
       
    64 
       
    65 
       
    66 
       
    67 bool_t
       
    68 xdr_hostexecute_TExecuteRequest(xdrs, objp)
       
    69 	XDR *xdrs;
       
    70 	TExecuteRequest *objp;
       
    71 {
       
    72 	if (!xdr_vector(xdrs, (char *)objp->iCommandLine, MAXCOMMANDLINE, sizeof(char), (void*)xdr_char)) {
       
    73 		return (FALSE);
       
    74 	}
       
    75 	if (!xdr_int(xdrs, &objp->iRecordStandardOut)) {
       
    76 		return (FALSE);
       
    77 	}
       
    78 	if (!xdr_int(xdrs, &objp->iRecordStandartError)) {
       
    79 		return (FALSE);
       
    80 	}
       
    81 	if (!xdr_int(xdrs, &objp->iTimeout)) {
       
    82 		return (FALSE);
       
    83 	}
       
    84 	return (TRUE);
       
    85 }
       
    86 
       
    87 
       
    88 
       
    89 
       
    90 bool_t
       
    91 xdr_hostexecute_TExecuteResult(xdrs, objp)
       
    92 	XDR *xdrs;
       
    93 	TExecuteResult *objp;
       
    94 {
       
    95 	if (!xdr_int(xdrs, &objp->iResult)) {
       
    96 		return (FALSE);
       
    97 	}
       
    98 	if (!xdr_int(xdrs, &objp->iErrorCode)) {
       
    99 		return (FALSE);
       
   100 	}
       
   101 	if (!xdr_int(xdrs, &objp->iErrorDetail)) {
       
   102 		return (FALSE);
       
   103 	}
       
   104 	if (!xdr_int(xdrs, &objp->iProcessExitReason)) {
       
   105 		return (FALSE);
       
   106 	}
       
   107 	if (!xdr_int(xdrs, &objp->iProcessExitDetail)) {
       
   108 		return (FALSE);
       
   109 	}
       
   110 	if (!xdr_hostexecute_TVarData(xdrs, &objp->iStandardOut)) {
       
   111 		return (FALSE);
       
   112 	}
       
   113 	if (!xdr_hostexecute_TVarData(xdrs, &objp->iStandardError)) {
       
   114 		return (FALSE);
       
   115 	}
       
   116 	return (TRUE);
       
   117 }
       
   118 
       
   119