presentity.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
00031
00032
00033
00034
00035
00036 #ifndef PRESENTITY_H
00037 #define PRESENTITY_H
00038
00039 #include "../../str.h"
00040 #include "../../parser/msg_parser.h"
00041 #include "event_list.h"
00042
00043
00044 extern char prefix;
00045
00046 typedef struct presentity
00047 {
00048 int presid;
00049 str user;
00050 str domain;
00051 pres_ev_t* event;
00052 str etag;
00053 str* sender;
00054 time_t expires;
00055 time_t received_time;
00056 } presentity_t;
00057
00058
00059 presentity_t* new_presentity( str* domain,str* user,int expires,
00060 pres_ev_t* event, str* etag, str* sender);
00061
00062
00063 int update_presentity(struct sip_msg* msg,presentity_t* p,str* body,int t_new,
00064 int* sent_reply, char* sphere);
00065
00066
00067 void free_presentity(presentity_t* p);
00068
00069 char* generate_ETag(int publ_count);
00070
00071 int pres_htable_restore(void);
00072
00073 char* extract_sphere(str body);
00074
00075 char* get_sphere(str* pres_uri);
00076 typedef char* (*pres_get_sphere_t)(str* pres_uri);
00077
00078
00079 #endif
00080