Diff for /libaitrpc/inc/aitrpc.h between versions 1.1.1.1.2.10 and 1.1.1.1.2.12

version 1.1.1.1.2.10, 2010/06/24 11:01:46 version 1.1.1.1.2.12, 2010/06/28 15:18:43
Line 28 Line 28
 #define CALL_BLOBSHUTDOWN       "rpcBLOBServerShutdown"  #define CALL_BLOBSHUTDOWN       "rpcBLOBServerShutdown"
 #define CALL_BLOBCLIENTS        "rpcBLOBServerClients"  #define CALL_BLOBCLIENTS        "rpcBLOBServerClients"
 #define CALL_BLOBVARS           "rpcBLOBServerVars"  #define CALL_BLOBVARS           "rpcBLOBServerVars"
   #define CALL_BLOBSTATE          "rpcBLOBServerState"
   
 #define CALL_SRVSHUTDOWN        "rpcServerShutdown"  #define CALL_SRVSHUTDOWN        "rpcServerShutdown"
 #define CALL_SRVCLIENTS         "rpcServerClients"  #define CALL_SRVCLIENTS         "rpcServerClients"
Line 156  typedef struct { Line 157  typedef struct {
                                                         return -1; \                                                          return -1; \
                                                 } \                                                  } \
                                         } while (0)                                          } while (0)
#define RPC_CALLBACK_CHECK_INPUT(s, f)     do { \#define RPC_CALLBACK_CHECK_INPUT(f)      do { \
                                                if (!s || !f) { \                                                if (!f) { \
                                                         rpc_SetErr(22, "Error:: invalid callback parameters ...\n"); \                                                          rpc_SetErr(22, "Error:: invalid callback parameters ...\n"); \
                                                         return -1; \                                                          return -1; \
                                                 } \                                                  } \
Line 185  typedef struct tagRPCFunc { Line 186  typedef struct tagRPCFunc {
         int8_t                  func_args;          int8_t                  func_args;
         rpc_val_t               *func_vals;          rpc_val_t               *func_vals;
   
           void                    *func_parent;
         struct tagRPCFunc       *func_next;          struct tagRPCFunc       *func_next;
 } rpc_func_t;  } rpc_func_t;
   
Line 265  typedef struct { Line 267  typedef struct {
 } rpc_srv_t;  } rpc_srv_t;
   
   
typedef int (*rpc_callback_t)(void * const, rpc_func_t *, int, rpc_val_t *);/* 
  * (*rpc_callback_t)() Callback type definition for RPC call in server process
  * @arg1 = current execution RPC call function
  * @arg2 = number of items in input array from call request
  * @arg3 = input array with values from RPC call execution request
  * return: -1 error or >-1 success execution
  */
 typedef int (*rpc_callback_t)(rpc_func_t *, int, rpc_val_t *);
   
   
 // -----------------------------------------------------------------------  // -----------------------------------------------------------------------
Line 369  rpc_func_t *rpc_srv_getFunc(rpc_srv_t * __restrict srv Line 378  rpc_func_t *rpc_srv_getFunc(rpc_srv_t * __restrict srv
 inline rpc_func_t *rpc_srv_getCall(rpc_srv_t * __restrict srv, uint16_t tag, uint32_t hash);  inline rpc_func_t *rpc_srv_getCall(rpc_srv_t * __restrict srv, uint16_t tag, uint32_t hash);
 /*  /*
  * rpc_srv_execCall() Execute registered call from RPC server   * rpc_srv_execCall() Execute registered call from RPC server
  * @data = RPC const data  
  * @call = Register RPC call   * @call = Register RPC call
  * @rpc = IN RPC call structure   * @rpc = IN RPC call structure
  * @args = IN RPC call array of rpc values   * @args = IN RPC call array of rpc values
  * return: -1 error, !=-1 ok   * return: -1 error, !=-1 ok
  */   */
int rpc_srv_execCall(void * const data, rpc_func_t * __restrict call, int rpc_srv_execCall(rpc_func_t * __restrict call, struct tagRPCCall * __restrict rpc, 
                struct tagRPCCall * __restrict rpc, rpc_val_t * __restrict args);                rpc_val_t * __restrict args);
   
   
 /*  /*
 * rpc_srv_declValsCall() Declare return variables for RPC call * rpc_srv_retValsCall() Declare return variables for RPC call and zeroed values
                                         (for safe handling return values, use this!)
  * @call = RPC function call   * @call = RPC function call
  * @return_vals = Number of return variables   * @return_vals = Number of return variables
    * return: NULL error, !=NULL array with return values for RPC call with return_vals items
    */
   inline rpc_val_t *rpc_srv_retValsCall(rpc_func_t * __restrict call, int return_vals);
   /*
    * rpc_srv_declValsCall() Declare return variables for RPC call, 
                                   if already allocated memory for RPC call return values 
                                   function reallocate used space with return_vals count elements
    * @call = RPC function call
    * @return_vals = Number of return variables
  * return: -1 error, !=-1 ok   * return: -1 error, !=-1 ok
  */   */
 inline int rpc_srv_declValsCall(rpc_func_t * __restrict call, int return_vals);  inline int rpc_srv_declValsCall(rpc_func_t * __restrict call, int return_vals);
Line 400  inline void rpc_srv_freeValsCall(rpc_func_t * __restri Line 418  inline void rpc_srv_freeValsCall(rpc_func_t * __restri
  */   */
 inline int rpc_srv_copyValsCall(rpc_func_t * __restrict call, rpc_val_t ** __restrict newvals);  inline int rpc_srv_copyValsCall(rpc_func_t * __restrict call, rpc_val_t ** __restrict newvals);
 /*  /*
 * rpc_srv_delValsCall() Clean values from return variables of RPC call * rpc_srv_zeroValsCall() Clean values from return variables of RPC call
  * @call = RPC function call   * @call = RPC function call
  * return: -1 error, !=-1 Returned number of cleaned RPC variables   * return: -1 error, !=-1 Returned number of cleaned RPC variables
  */   */
inline int rpc_srv_delValsCall(rpc_func_t * __restrict call);inline int rpc_srv_zeroValsCall(rpc_func_t * __restrict call);
 /*  /*
  * rpc_srv_getValsCall() Get return variables for RPC call   * rpc_srv_getValsCall() Get return variables for RPC call
  * @call = RPC function call   * @call = RPC function call

Removed from v.1.1.1.1.2.10  
changed lines
  Added in v.1.1.1.1.2.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>