📄 http_tag.h
字号:
/* * This file is part of the Sofia-SIP package * * Copyright (C) 2005 Nokia Corporation. * * Contact: Pekka Pessi <pekka.pessi@nokia.com> * * This library is free software; you can redistribute it and/or * 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 * */#ifndef HTTP_TAG_H /** Defined when http_tag.h has been included. */#define HTTP_TAG_H/**@file http_tag.h * @brief Tag class for HTTP headers * * This file is automatically generated from <http.h> by msg_parser.awk. * * @author Pekka Pessi <Pekka.Pessi@nokia.com> * */#ifndef SU_TAG_H#include <sofia-sip/su_tag.h>#endif#ifndef SU_TAG_CLASS_H#include <sofia-sip/su_tag_class.h>#endif#ifndef SU_TAG_CLASS_H#include <sofia-sip/su_tag_class.h>#endif#ifndef HTTP_H#include <sofia-sip/http.h>#endifSOFIA_BEGIN_DECLS#define HTTPTAG(c, x) httptag_##c, httptag_##c##_v(x)#define HTTPTAG_REF(c, x) httptag_##c##_ref, httptag_##c##_vr(&(x))#define HTTPTAG_STR(c, s) httptag_##c##_str, tag_str_v(s)#define HTTPTAG_STR_REF(c, s) httptag_##c##_str_ref, tag_str_vr(&(s))/** Test if tag type marks a http_t structure. @HIDE */#define HTTPTAG_P(tt) ((tt)->tt_class == httphdrtag_class)/** Test if tag type marks a HTTP header string. @HIDE */#define HTTPTAG_STR_P(tt) ((tt)->tt_class == httpstrtag_class)/** Test if tag type marks a HTTP header structure. @HIDE */#define HTTPTAG_HTTP_P(tt) ((tt)->tt_class == httpmsgtag_class)/** Test if tag item contains http_t structure. @HIDE */#define HTTPTAGI_P(t) (HTTPTAG_P((t)->t_tag))/** Test if tag item contains a HTTP header string. @HIDE */#define HTTPTAGI_STR_P(t) (HTTPTAG_STR_P((t)->t_tag))/** Test if tag item contains a HTTP header structure. @HIDE */#define HTTPTAGI_HTTP_P(t) (HTTPTAG_HTTP_P((t)->t_tag))HTTP_DLL extern tag_class_t httphdrtag_class[1];HTTP_DLL extern tag_class_t httpstrtag_class[1];HTTP_DLL extern tag_class_t httpmsgtag_class[1];/** Filter tag matching any http tag. */#define HTTPTAG_ANY() httptag_any, ((tag_value_t)0)HTTP_DLL extern tag_typedef_t httptag_any;/**Tag list item for @c http_t object. * * The HTTPTAG_HTTP() macro is used to include a tag item for a http_t object * in the tag list. * * @param x pointer to a http_t message object, or NULL. * * @HIDE */#define HTTPTAG_HTTP(x) httptag_http, httptag_http_v((x))/** Tag for @c http_t */HTTP_DLL extern tag_typedef_t httptag_http;#define HTTPTAG_HTTP_REF(x) httptag_http_ref, httptag_http_vr(&(x))HTTP_DLL extern tag_typedef_t httptag_http_ref;#if HAVE_INLINEstatic inlinetag_value_t httptag_http_v(http_t const *v) { return (tag_value_t)v; }static inline tag_value_t httptag_http_vr(http_t const **vp) { return (tag_value_t)vp; }#else#define httptag_http_v(v) (tag_value_t)(v)#define httptag_http_vr(vp) (tag_value_t)(vp)#endif/**Tag list item for http protocol version. * * The HTTPTAG_VERSION() macro is used to include a tag item for a HTTP * protocol version in the tag list. * * @param x pointer to a http_t message object, or NULL. */#define HTTPTAG_VERSION(x) httptag_http, (tag_value_t)xextern tag_typedef_t httptag_version;/** Reference to HTTPTAG_VERSION */#define HTTPTAG_VERSION_REF(x) httptag_http_ref, (tag_value_t)&(x)extern tag_typedef_t httptag_version_ref;/**Tag list item for header string. * * The HTTPTAG_HEADER() macro is used to include a tag item containing an * unknown HTTP header in the tag list, e.g., * @code * http_header_t *hdr; * * HTTPTAG_HEADER(hdr). * @endcode * * @param x pointer to a header structure, or NULL. * * @HIDE */#define HTTPTAG_HEADER(x) httptag_header, httptag_header_v((x))/** Tag for header string */HTTP_DLL extern tag_typedef_t httptag_header;#define HTTPTAG_HEADER_REF(x) httptag_header_ref, httptag_header_vr(&(x))HTTP_DLL extern tag_typedef_t httptag_header_ref;#if HAVE_INLINEstatic inline tag_value_thttptag_header_v(http_header_t const *v){ return (tag_value_t)v; }static inline tag_value_thttptag_header_vr(http_header_t const **vp){ return (tag_value_t)vp; }#else#define httptag_header_v(v) (tag_value_t)(v)#define httptag_header_vr(vp) (tag_value_t)(vp)#endif/**Tag list item for header string. * * The HTTPTAG_HEADER_STR() macro is used to include a tag item containing a * header string in the tag list. * * @param x pointer to a string, or NULL. * * @HIDE */#define HTTPTAG_HEADER_STR(x) httptag_header_str, tag_str_v((x))/** Tag for header string */HTTP_DLL extern tag_typedef_t httptag_header_str;#define HTTPTAG_HEADER_STR_REF(x) httptag_header_str_ref, tag_str_vr(&(x))HTTP_DLL extern tag_typedef_t httptag_header_str_ref;/**@ingroup http_request * * Tag list item for pointer to a request line object. * * The HTTPTAG_REQUEST() macro is used to include a tag item with a * pointer to a http_request_t object in a tag list. * * @param x pointer to a http_request_t header structure, or NULL. * * @HIDE */#define HTTPTAG_REQUEST(x) HTTPTAG(request, x)HTTP_DLL extern tag_typedef_t httptag_request;/**@ingroup http_request * * Tag list item for string with request line value. * * The HTTPTAG_REQUEST_STR() macro is used to include a tag item with a * string containing value of a http_request_t header in a tag list. * * @param s pointer to a string containing http_request_t value, or NULL. * * The HTTPTAG_REQUEST_STR string can be converted to a * http_request_t header structure by giving the string @a s has * second argument to function http_request_make(). * * @HIDE */#define HTTPTAG_REQUEST_STR(s) HTTPTAG_STR(request, s)HTTP_DLL extern tag_typedef_t httptag_request_str;#define HTTPTAG_REQUEST_REF(x) HTTPTAG_REF(request, x)HTTP_DLL extern tag_typedef_t httptag_request_ref;#define HTTPTAG_REQUEST_STR_REF(x) HTTPTAG_STR_REF(request, x)HTTP_DLL extern tag_typedef_t httptag_request_str_ref;#if HAVE_INLINEstatic inline tag_value_thttptag_request_v(http_request_t const *v){ return (tag_value_t)v; }static inline tag_value_thttptag_request_vr(http_request_t const **vp){ return (tag_value_t)vp; }#else#define httptag_request_v(v) (tag_value_t)(v)#define httptag_request_vr(vp) (tag_value_t)(vp)#endif/**@ingroup http_status * * Tag list item for pointer to a status line object. * * The HTTPTAG_STATUS() macro is used to include a tag item with a * pointer to a http_status_t object in a tag list. * * @param x pointer to a http_status_t header structure, or NULL. * * @HIDE */#define HTTPTAG_STATUS(x) HTTPTAG(status, x)HTTP_DLL extern tag_typedef_t httptag_status;/**@ingroup http_status * * Tag list item for string with status line value. * * The HTTPTAG_STATUS_STR() macro is used to include a tag item with a * string containing value of a http_status_t header in a tag list. * * @param s pointer to a string containing http_status_t value, or NULL. * * The HTTPTAG_STATUS_STR string can be converted to a * http_status_t header structure by giving the string @a s has * second argument to function http_status_make(). * * @HIDE */#define HTTPTAG_STATUS_STR(s) HTTPTAG_STR(status, s)HTTP_DLL extern tag_typedef_t httptag_status_str;#define HTTPTAG_STATUS_REF(x) HTTPTAG_REF(status, x)HTTP_DLL extern tag_typedef_t httptag_status_ref;#define HTTPTAG_STATUS_STR_REF(x) HTTPTAG_STR_REF(status, x)HTTP_DLL extern tag_typedef_t httptag_status_str_ref;#if HAVE_INLINEstatic inline tag_value_thttptag_status_v(http_status_t const *v){ return (tag_value_t)v; }static inline tag_value_thttptag_status_vr(http_status_t const **vp){ return (tag_value_t)vp; }#else#define httptag_status_v(v) (tag_value_t)(v)#define httptag_status_vr(vp) (tag_value_t)(vp)#endif/**@ingroup http_accept * * Tag list item for pointer to a Accept header object. * * The HTTPTAG_ACCEPT() macro is used to include a tag item with a * pointer to a http_accept_t object in a tag list. * * @param x pointer to a http_accept_t header structure, or NULL. * * @HIDE */#define HTTPTAG_ACCEPT(x) HTTPTAG(accept, x)HTTP_DLL extern tag_typedef_t httptag_accept;/**@ingroup http_accept * * Tag list item for string with Accept header value. * * The HTTPTAG_ACCEPT_STR() macro is used to include a tag item with a * string containing value of a http_accept_t header in a tag list. * * @param s pointer to a string containing http_accept_t value, or NULL. * * The HTTPTAG_ACCEPT_STR string can be converted to a * http_accept_t header structure by giving the string @a s has * second argument to function http_accept_make(). * * @HIDE */#define HTTPTAG_ACCEPT_STR(s) HTTPTAG_STR(accept, s)HTTP_DLL extern tag_typedef_t httptag_accept_str;#define HTTPTAG_ACCEPT_REF(x) HTTPTAG_REF(accept, x)HTTP_DLL extern tag_typedef_t httptag_accept_ref;#define HTTPTAG_ACCEPT_STR_REF(x) HTTPTAG_STR_REF(accept, x)HTTP_DLL extern tag_typedef_t httptag_accept_str_ref;#if HAVE_INLINEstatic inline tag_value_thttptag_accept_v(http_accept_t const *v){ return (tag_value_t)v; }static inline tag_value_thttptag_accept_vr(http_accept_t const **vp){ return (tag_value_t)vp; }#else#define httptag_accept_v(v) (tag_value_t)(v)#define httptag_accept_vr(vp) (tag_value_t)(vp)#endif/**@ingroup http_accept_charset * * Tag list item for pointer to a Accept-Charset header object. * * The HTTPTAG_ACCEPT_CHARSET() macro is used to include a tag item with a * pointer to a http_accept_charset_t object in a tag list. * * @param x pointer to a http_accept_charset_t header structure, or NULL. * * @HIDE */#define HTTPTAG_ACCEPT_CHARSET(x) HTTPTAG(accept_charset, x)HTTP_DLL extern tag_typedef_t httptag_accept_charset;/**@ingroup http_accept_charset * * Tag list item for string with Accept-Charset header value. * * The HTTPTAG_ACCEPT_CHARSET_STR() macro is used to include a tag item with a * string containing value of a http_accept_charset_t header in a tag list. * * @param s pointer to a string containing http_accept_charset_t value, or NULL. * * The HTTPTAG_ACCEPT_CHARSET_STR string can be converted to a * http_accept_charset_t header structure by giving the string @a s has * second argument to function http_accept_charset_make(). * * @HIDE */#define HTTPTAG_ACCEPT_CHARSET_STR(s) HTTPTAG_STR(accept_charset, s)HTTP_DLL extern tag_typedef_t httptag_accept_charset_str;#define HTTPTAG_ACCEPT_CHARSET_REF(x) HTTPTAG_REF(accept_charset, x)HTTP_DLL extern tag_typedef_t httptag_accept_charset_ref;#define HTTPTAG_ACCEPT_CHARSET_STR_REF(x) HTTPTAG_STR_REF(accept_charset, x)HTTP_DLL extern tag_typedef_t httptag_accept_charset_str_ref;#if HAVE_INLINEstatic inline tag_value_thttptag_accept_charset_v(http_accept_charset_t const *v){ return (tag_value_t)v; }static inline tag_value_thttptag_accept_charset_vr(http_accept_charset_t const **vp){ return (tag_value_t)vp; }#else#define httptag_accept_charset_v(v) (tag_value_t)(v)#define httptag_accept_charset_vr(vp) (tag_value_t)(vp)#endif/**@ingroup http_accept_encoding * * Tag list item for pointer to a Accept-Encoding header object. * * The HTTPTAG_ACCEPT_ENCODING() macro is used to include a tag item with a * pointer to a http_accept_encoding_t object in a tag list. * * @param x pointer to a http_accept_encoding_t header structure, or NULL. * * @HIDE */#define HTTPTAG_ACCEPT_ENCODING(x) HTTPTAG(accept_encoding, x)HTTP_DLL extern tag_typedef_t httptag_accept_encoding;/**@ingroup http_accept_encoding * * Tag list item for string with Accept-Encoding header value. * * The HTTPTAG_ACCEPT_ENCODING_STR() macro is used to include a tag item with a * string containing value of a http_accept_encoding_t header in a tag list. * * @param s pointer to a string containing http_accept_encoding_t value, or NULL. * * The HTTPTAG_ACCEPT_ENCODING_STR string can be converted to a * http_accept_encoding_t header structure by giving the string @a s has * second argument to function http_accept_encoding_make(). * * @HIDE */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -