resource_list.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) 2005 iptelorg GmbH
  3. *
  4. * This file is part of ser, a free SIP server.
  5. *
  6. * ser is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version
  10. *
  11. * For a license to use the ser software under conditions
  12. * other than those described here, or to purchase support for this
  13. * software, please contact iptel.org by e-mail at the following addresses:
  14. * [email protected]
  15. *
  16. * ser is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  24. */
  25. #ifndef __RESOURCE_LIST_H
  26. #define __RESOURCE_LIST_H
  27. #include <xcap/rls_services_parser.h>
  28. #include <xcap/xcap_client.h>
  29. #include <cds/sstr.h>
  30. /* #include <cds/ptr_vector.h> */
  31. /* Functions for downloading the service documents with analyzis
  32. * and "flatting" - see draft-ietf-simple-xcap-list-usage */
  33. typedef struct _flat_list_t {
  34. struct _flat_list_t *next;
  35. char *uri;
  36. SEQUENCE(display_name_t) names;
  37. } flat_list_t;
  38. char *xcap_uri_for_rls_resource(const str_t *xcap_root, const str_t *uri);
  39. void canonicalize_uri(const str_t *uri, str_t *dst);
  40. int get_rls(const str_t *uri, xcap_query_params_t *xcap_params,
  41. const str_t *package, flat_list_t **dst);
  42. int get_rls_from_full_doc(const str_t *uri,
  43. /* const str_t *filename, */
  44. xcap_query_params_t *xcap_params,
  45. const str_t *package, flat_list_t **dst);
  46. 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);
  47. /* 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); */
  48. void free_flat_list(flat_list_t *list);
  49. #endif