sip_tag.c.in 2.31 KB
Newer Older
1 2 3 4 5 6 7
/**@IFILE sip_tag.c.in
 *
 * Template for <sip_tag.c>.
 *
 * @date Created: Wed Feb 21 11:01:45 2001 ppessi
 */

Pekka Pessi's avatar
Pekka Pessi committed
8 9 10 11 12 13 14
/*
 * This file is part of the Sofia-SIP package
 *
 * Copyright (C) 2005 Nokia Corporation.
 *
 * Contact: Pekka Pessi <pekka.pessi@nokia.com>
 *
15
 * This library is free software; you can redistribute it and/or
Pekka Pessi's avatar
Pekka Pessi committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

/**@CFILE sip_tag.c  SIP Tags.
 *
 * #AUTO#
 *
 * @author Pekka Pessi <Pekka.Pessi@nokia.com>.
 *
 * @date Created: Fri Feb 23 12:46:42 2001 ppessi
 */

#include "config.h"

#include <assert.h>
#include <stddef.h>
#include <string.h>

47
#include <sofia-sip/su.h>
Pekka Pessi's avatar
Pekka Pessi committed
48 49 50

#define TAG_NAMESPACE "sip"

51 52
#include "sofia-sip/sip_parser.h"
#include <sofia-sip/sip_tag.h>
Pekka Pessi's avatar
Pekka Pessi committed
53

54 55 56
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/su_tag_inline.h>
#include <sofia-sip/sip_tag_class.h>
Pekka Pessi's avatar
Pekka Pessi committed
57

58
#include <sofia-sip/su_tagarg.h>
Pekka Pessi's avatar
Pekka Pessi committed
59

60 61
tag_typedef_t siptag_any = NSTAG_TYPEDEF(*);

Pekka Pessi's avatar
Pekka Pessi committed
62 63 64 65 66 67
tag_typedef_t siptag_sip = SIPMSGTAG_TYPEDEF(sip);

tag_typedef_t siptag_header = {{ "sip", "header", siphdrtag_class, 0 }};

tag_typedef_t siptag_header_str = STRTAG_TYPEDEF(header_str);

68 69
tag_typedef_t siptag_end = TAG_TYPEDEF(tag_end, end);

Pekka Pessi's avatar
Pekka Pessi committed
70

71 72
extern msg_hclass_t sip_#xxxxxx#_class[];

Pekka Pessi's avatar
Pekka Pessi committed
73
/**@ingroup sip_#xxxxxx#
74
 * Tag for @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" object.
Pekka Pessi's avatar
Pekka Pessi committed
75 76 77
 */
tag_typedef_t siptag_#xxxxxx# = SIPHDRTAG_TYPEDEF(#xxxxxx#);
/**@ingroup sip_#xxxxxx#
78
 * Tag for string with @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" value.
Pekka Pessi's avatar
Pekka Pessi committed
79 80 81
 */
tag_typedef_t siptag_#xxxxxx#_str = SIPSTRTAG_TYPEDEF(#xxxxxx#);

82 83 84 85 86 87 88 89
/** List of all tags for SIP headers */
tag_type_t sip_tag_list[] =
{
  siptag_#xxxxxx#,
  NULL
};

/** List of all string tags for SIP headers  */
90
tag_type_t sip_tag_str_list[] =
91 92 93 94
{
  siptag_#xxxxxx#_str,
  NULL
};