00001 /* 00002 * $Id$ 00003 * 00004 * Copyright (C) 2011 VoIP Embedded, Inc. 00005 * 00006 * This file is part of Kamailio, a free SIP server. 00007 * 00008 * Kamailio is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version 00012 * 00013 * Kamailio is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * 2011-11-11 initial version (osas) 00023 */ 00024 00025 00026 #ifndef _XHTTP_RPC_H 00027 #define _XHTTP_RPC_H 00028 00029 #include "../../str.h" 00030 #include "../../rpc_lookup.h" 00031 #include "../../parser/msg_parser.h" 00032 00033 00034 #define ERROR_REASON_BUF_LEN 1024 00035 #define PRINT_VALUE_BUF_LEN 256 00036 00037 00038 00039 struct rpc_data_struct { 00040 struct rpc_ctx* ctx; 00041 struct rpc_data_struct* next; 00042 }; 00043 00044 00050 struct xhttp_rpc_reply { 00051 int code; 00052 str reason; 00054 str body; 00055 str buf; 00057 }; 00058 00059 00068 typedef struct rpc_ctx { 00069 sip_msg_t* msg; 00070 struct xhttp_rpc_reply reply; 00071 int reply_sent; 00072 int mod; 00073 int cmd; 00074 int arg_received; 00075 str arg; 00076 str arg2scan; 00077 struct rpc_struct *structs; 00078 struct rpc_data_struct *data_structs; 00079 unsigned int struc_depth; 00080 } rpc_ctx_t; 00081 00082 00083 /* An RPC module representation. 00084 * 00085 * The module is the first substring of the RPC commands (delimited by '.'. 00086 */ 00087 typedef struct xhttp_rpc_mod_cmds_ { 00088 int rpc_e_index; 00089 str mod; 00090 int size; 00091 } xhttp_rpc_mod_cmds_t; 00092 00093 #endif 00094
1.7.1