00001 /* 00002 * Copyright (C) 2005 iptelorg GmbH 00003 * 00004 * This file is part of ser, a free SIP server. 00005 * 00006 * ser is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version 00010 * 00011 * For a license to use the ser software under conditions 00012 * other than those described here, or to purchase support for this 00013 * software, please contact iptel.org by e-mail at the following addresses: 00014 * info@iptel.org 00015 * 00016 * ser is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 */ 00025 00026 #ifndef __RESOURCE_LIST_H 00027 #define __RESOURCE_LIST_H 00028 00029 #include <xcap/rls_services_parser.h> 00030 #include <xcap/xcap_client.h> 00031 #include <cds/sstr.h> 00032 /* #include <cds/ptr_vector.h> */ 00033 00034 /* Functions for downloading the service documents with analyzis 00035 * and "flatting" - see draft-ietf-simple-xcap-list-usage */ 00036 00037 typedef struct _flat_list_t { 00038 struct _flat_list_t *next; 00039 char *uri; 00040 SEQUENCE(display_name_t) names; 00041 } flat_list_t; 00042 00043 char *xcap_uri_for_rls_resource(const str_t *xcap_root, const str_t *uri); 00044 void canonicalize_uri(const str_t *uri, str_t *dst); 00045 int get_rls(const str_t *uri, xcap_query_params_t *xcap_params, 00046 const str_t *package, flat_list_t **dst); 00047 int get_rls_from_full_doc(const str_t *uri, 00048 /* const str_t *filename, */ 00049 xcap_query_params_t *xcap_params, 00050 const str_t *package, flat_list_t **dst); 00051 int get_resource_list_from_full_doc(const str_t *xcap_root, const str_t *user, xcap_query_params_t *xcap_params, const char *list_name, flat_list_t **dst); 00052 /* TODO: int get_resource_list(const str_t *xcap_root, const str_t *user, xcap_query_t *xcap_params, const str_t *list_name, flat_list_t **dst); */ 00053 void free_flat_list(flat_list_t *list); 00054 00055 #endif
1.7.1