xcap_misc.h

00001 
00025 #ifndef _XCAP_MISC_H_
00026 #define _XCAP_MISC_H_
00027 
00028 #include "../../str.h"
00029 #include "../../sr_module.h"
00030 #include "../../pvar.h"
00031 
00032 #define XCAP_MAX_URI_SIZE       255
00033 /* Node Selector Separator */
00034 #define XCAP_NSS        "~~"
00035 
00036 typedef struct xcap_uri {
00037         char buf[XCAP_MAX_URI_SIZE+1];
00038         str uri;
00039         str root;
00040         str auid;
00041         int type;
00042         str tree;
00043         str xuid;
00044         str file;
00045         str adoc;
00046         str rdoc;
00047         char *nss;
00048         str node;
00049         str target;
00050         str domain;
00051 } xcap_uri_t;
00052 
00053 int xcap_parse_uri(str *huri, str *xroot, xcap_uri_t *xuri);
00054 int xcaps_xpath_set(str *inbuf, str *xpaths, str *val, str *outbuf);
00055 int xcaps_xpath_get(str *inbuf, str *xpaths, str *outbuf);
00056 int xcaps_check_doc_validity(str *doc);
00057 
00058 int pv_get_xcap_uri(struct sip_msg *msg,  pv_param_t *param,
00059                 pv_value_t *res);
00060 int pv_set_xcap_uri(struct sip_msg* msg, pv_param_t *param,
00061                 int op, pv_value_t *val);
00062 int pv_parse_xcap_uri_name(pv_spec_p sp, str *in);
00063 
00064 #endif