rls/notify.h

Go to the documentation of this file.
00001 /*
00002  * $Id: notify.c 2230 2007-06-06 07:13:20Z anca_vamanu $
00003  *
00004  * rls module - resource list server
00005  *
00006  * Copyright (C) 2007 Voice Sistem S.R.L.
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * Kamailio is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License 
00021  * along with this program; if not, write to the Free Software 
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  * History:
00025  * --------
00026  *  2007-09-11  initial version (anca)
00027  *
00028  */
00029 
00030 #ifndef _RLS_NOTIFY_H
00031 #define _RLS_NOTIFY_H
00032 
00033 #include <libxml/parser.h>
00034 #include "../../str.h"
00035 #include "../presence/subscribe.h"
00036 
00037 #define BOUNDARY_STRING_LEN    24
00038 #define BUF_REALLOC_SIZE       2048
00039 #define MAX_HEADERS_LENGTH     (104+ 255+ 1)
00040 #define RLS_HDR_LEN      1024
00041 #define MAX_FORWARD 70
00042 
00043 #define REALLOC_BUF\
00044       size+= BUF_REALLOC_SIZE;\
00045       buf= (char*)realloc(buf, size);\
00046       if(buf== NULL) \
00047       {  ERR_MEM("constr_multipart_body");}
00048 
00049 #define COMPUTE_ANTET_LEN(boundary_string) (strlen( boundary_string)+ MAX_HEADERS_LENGTH + 6)
00050 int send_full_notify(subs_t* subs, xmlNodePtr rl_node, 
00051       int version, str* rl_uri, unsigned int hash_code);
00052 
00053 typedef int (*list_func_t)(char* uri, void* param); 
00054 
00055 int process_list_and_exec(xmlNodePtr list, list_func_t function, void* param);
00056 char* generate_string(int seed, int length);
00057 char* generate_cid(char* uri, int uri_len);
00058 char* get_auth_string(int flag);
00059 int agg_body_sendn_update(str* rl_uri, char* boundary_string, str* rlmi_body,
00060       str* multipart_body, subs_t* subs, unsigned int hash_code);
00061 int rls_send_notify(subs_t* subs,str* body,char* start_cid,char* boundary_string);
00062 
00063 #endif

Generated on Thu May 24 10:00:28 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6