rls/notify.h
Go to the documentation of this file.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*)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