attr.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * $Id: attr.h 4518 2008-07-28 15:39:28Z henningw $
  3. *
  4. * Copyright (C) 2006 Voice Sistem SRL
  5. *
  6. * This file is part of Kamailio, a free SIP server.
  7. *
  8. * Kamailio is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * Kamailio is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  21. *
  22. *
  23. * History:
  24. * ---------
  25. * 2006-09-08 first version (bogdan)
  26. */
  27. /*!
  28. * \file
  29. * \brief MI :: Attributes
  30. * \ingroup mi
  31. */
  32. #ifndef _MI_ATTR_H
  33. #define _MI_ATTR_H
  34. #include <stdarg.h>
  35. #include "../../str.h"
  36. #include "tree.h"
  37. struct mi_attr{
  38. str name;
  39. str value;
  40. struct mi_attr *next;
  41. };
  42. struct mi_attr *add_mi_attr(struct mi_node *node, int flags,
  43. char *name, int name_len, char *value, int value_len);
  44. struct mi_attr *addf_mi_attr(struct mi_node *node, int flags,
  45. char *name, int name_len, char *fmt_val, ...);
  46. struct mi_attr *get_mi_attr_by_name(struct mi_node *node,
  47. char *name, int len);
  48. void del_mi_attr_list(struct mi_node *node);
  49. #endif