00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
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*)pkg_realloc(buf, size);\
00046 if(buf== NULL) \
00047 { ERR_MEM("constr_multipart_body");}
00048
00049 int send_full_notify(subs_t* subs, xmlNodePtr rl_node,
00050 str* rl_uri, unsigned int hash_code);
00051
00052 typedef int (*list_func_t)(char* uri, void* param);
00053
00054 int process_list_and_exec(xmlNodePtr list, str username, str domain,
00055 list_func_t function, void* param);
00056 char* generate_string(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 int create_empty_rlmi_doc(xmlDocPtr *rlmi_doc, xmlNodePtr *list_node, str *uri, int version, int full_state);
00063
00064 extern char *instance_id;
00065 #endif