Commit b5300c18 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Parse results for PROPFIND and REPORT requests

parent a8e6cc90
This diff is collapsed.
......@@ -7511,7 +7511,7 @@ void linphone_core_set_carddav_current_ctag(LinphoneCore *lc, int ctag) {
int linphone_core_get_carddav_last_ctag(LinphoneCore *lc) {
if (lc) {
LpConfig *lpc = linphone_core_get_config(lc);
return lp_config_get_int(lpc, "carddav", "ctag", -1);
return lp_config_get_int(lpc, "carddav", "ctag", 0);
}
return -1;
return 0;
}
\ No newline at end of file
......@@ -1328,6 +1328,7 @@ char * linphone_get_xml_text_content(xmlparsing_context_t *xml_ctx, const char *
const char * linphone_get_xml_attribute_text_content(xmlparsing_context_t *xml_ctx, const char *xpath_expression, const char *attribute_name);
void linphone_free_xml_text_content(const char *text);
xmlXPathObjectPtr linphone_get_xml_xpath_object_for_node_list(xmlparsing_context_t *xml_ctx, const char *xpath_expression);
void linphone_xml_xpath_context_init_carddav_ns(xmlparsing_context_t *xml_ctx);
/*****************************************************************************
* OTHER UTILITY FUNCTIONS *
......
......@@ -123,3 +123,11 @@ void linphone_free_xml_text_content(const char *text) {
xmlXPathObjectPtr linphone_get_xml_xpath_object_for_node_list(xmlparsing_context_t *xml_ctx, const char *xpath_expression) {
return xmlXPathEvalExpression((const xmlChar *)xpath_expression, xml_ctx->xpath_ctx);
}
void linphone_xml_xpath_context_init_carddav_ns(xmlparsing_context_t *xml_ctx) {
if (xml_ctx && xml_ctx->xpath_ctx) {
xmlXPathRegisterNs(xml_ctx->xpath_ctx, (const xmlChar*)"d", (const xmlChar*)"DAV:");
xmlXPathRegisterNs(xml_ctx->xpath_ctx, (const xmlChar*)"card", (const xmlChar*)"urn:ietf:params:xml:ns:carddav");
xmlXPathRegisterNs(xml_ctx->xpath_ctx, (const xmlChar*)"x1", (const xmlChar*)"http://calendarserver.org/ns/");
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment