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
00039
00040
00041 #ifndef CONTACT_OPS_H
00042 #define CONTACT_OPS_H
00043
00044
00045
00046
00047
00048 #include "../../parser/msg_parser.h"
00049
00050 #define ENCODE_ALL_CONTACTS 1
00051 #define DECODE_ALL_CONTACTS 1
00052
00053 #define DEFAULT_SEPARATOR "*"
00054
00055
00056 char *contact_flds_separator;
00057
00058
00059 struct uri_format
00060 {
00061 str username;
00062 str password;
00063 str ip;
00064 str port;
00065 str protocol;
00066 int first;
00067 int second;
00068 };
00069
00070 typedef struct uri_format contact_fields_t;
00071
00072
00073 int encode_contact (struct sip_msg *msg, char *encoding_prefix,char *public_ip);
00074 int decode_contact (struct sip_msg *msg, char *unused1,char *unused2);
00075 int decode_contact_header (struct sip_msg *msg, char *unused1,char *unused2);
00076
00077 int encode2format (str uri, struct uri_format *format);
00078 int decode2format (str uri, char separator, struct uri_format *format);
00079
00080 int encode_uri (str uri, char *encoding_prefix, char *public_ip,char separator, str * result);
00081 int decode_uri (str uri, char separator, str * result);
00082
00083
00084
00085
00086
00087 #endif