xcap_client: removed unused api function get_elem()
authorDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 24 Jul 2017 10:15:55 +0000 (12:15 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 24 Jul 2017 10:15:55 +0000 (12:15 +0200)
src/modules/xcap_client/xcap_functions.c
src/modules/xcap_client/xcap_functions.h

index 1b2e6b4..6b875b1 100644 (file)
@@ -50,7 +50,6 @@ int bind_xcap(xcap_api_t* api)
                LM_ERR("Invalid parameter value\n");
                return -1;
        }
-       api->get_elem= xcapGetElem;
        api->int_node_sel= xcapInitNodeSel;
        api->add_step= xcapNodeSelAddStep;
        api->add_terminal= xcapNodeSelAddTerminal;
@@ -455,39 +454,6 @@ error:
        return NULL;
 }
 
-/* xcap_root must be a NULL terminated string */
-
-char* xcapGetElem(xcap_get_req_t req, char** etag)
-{
-       char* path= NULL;
-       char* stream= NULL;
-
-       path= get_xcap_path(req);
-       if(path== NULL)
-       {
-               LM_ERR("while constructing xcap path\n");
-               return NULL;
-       }
-
-       stream= send_http_get(path, req.port, req.etag, req.match_type, etag);
-       if(stream== NULL)
-       {
-               LM_DBG("the serched element was not found\n");
-       }
-
-       if(etag== NULL)
-       {
-               LM_ERR("no etag found\n");
-               pkg_free(stream);
-               stream= NULL;
-       }
-
-       if(path)
-               pkg_free(path);
-
-       return stream;
-}
-
 size_t get_xcap_etag( void *ptr, size_t size, size_t nmemb, void *stream)
 {
        int len= 0;
index 8750aea..44ae635 100644 (file)
@@ -103,11 +103,6 @@ xcap_node_sel_t* xcapNodeSelAddTerminal(xcap_node_sel_t* curr_sel,
 typedef xcap_node_sel_t* (*xcap_nodeSel_add_terminal_t)(xcap_node_sel_t* curr_sel,
                char* attr_sel, char* namespace_sel, char* extra_sel );
 
-/* generical function to get an element from an xcap server */
-char* xcapGetElem(xcap_get_req_t req, char** etag);
-
-typedef char* (*xcap_get_elem_t)(xcap_get_req_t req, char** etag);
-
 void xcapFreeNodeSel(xcap_node_sel_t* node);
 
 typedef void (*xcap_nodeSel_free_t)(xcap_node_sel_t* node);
@@ -118,7 +113,6 @@ char* xcapGetNewDoc(xcap_get_req_t req, str user, str domain);
 typedef char* (*xcapGetNewDoc_t)(xcap_get_req_t req, str user, str domain);
 
 typedef struct xcap_api {
-       xcap_get_elem_t get_elem;
        xcap_nodeSel_init_t int_node_sel;
        xcap_nodeSel_add_step_t add_step;
        xcap_nodeSel_add_terminal_t add_terminal;