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