wsp_headers.h

来自「mms client」· C头文件 代码 · 共 101 行

H
101
字号
/* * wsp_headers.h - WSP PDU headers implementation header * * Kalle Marjola <rpr@wapit.com> */#ifndef WSP_HEADERS_H#define WSP_HEADERS_H#include "gwlib/gwlib.h"#define WSP_FIELD_VALUE_NUL_STRING	1#define WSP_FIELD_VALUE_ENCODED 	2#define WSP_FIELD_VALUE_DATA		3#define WSP_FIELD_VALUE_NONE		4 /* secondary_field_value only *//* return an HTTPHeader linked list which must be freed by the caller * (see http.h for details of HTTPHeaders). Cannot fail. * The second argument is true if the headers will have a leading * Content-Type field.  Some WSP PDUs encode Content-Type separately * this way for historical reasons. */List *wsp_headers_unpack(Octstr *headers, int content_type);/* Take a List of headers, encode them according to the WSP spec, * and return the encoded headers as an Octstr.  * The second argument is true if the encoded headers should have * a leading content-type field.  See the note for wsp_headers_unpack. */Octstr *wsp_headers_pack(List *headers, int separate_content_type);/* Make packing/unpacking routines available for the benefit of MMS */long unpack_multi_octet_integer(ParseContext *context, long len);Octstr *unpack_integer_value(ParseContext *context);Octstr *unpack_q_value(ParseContext *context);Octstr *unpack_version_value(long value);int unpack_parameter(ParseContext *context, Octstr *decoded);void unpack_all_parameters(ParseContext *context, Octstr *decoded);void unpack_broken_parameters(ParseContext *context, Octstr *decoded);void unpack_optional_q_value(ParseContext *context, Octstr *decoded);Octstr *unpack_date_value(ParseContext *context);Octstr *unpack_accept_general_form(ParseContext *context);Octstr *unpack_accept_charset_general_form(ParseContext *context);Octstr *unpack_accept_language_general_form(ParseContext *context);Octstr *unpack_credentials(ParseContext *context);Octstr *unpack_challenge(ParseContext *context);Octstr *unpack_content_range(ParseContext *context);Octstr *unpack_field_name(ParseContext *context);Octstr *unpack_cache_directive(ParseContext *context);Octstr *unpack_retry_after(ParseContext *context);Octstr *unpack_disposition(ParseContext *context);Octstr *unpack_range_value(ParseContext *context);Octstr *unpack_warning_value(ParseContext *context);void unpack_app_header(List *unpacked, ParseContext *context);int pack_text(Octstr *packed, Octstr *text);void pack_quoted_string(Octstr *packed, Octstr *text);int pack_qvalue(Octstr *packed, int qvalue);void pack_value(Octstr *packed, Octstr *encoded);void pack_long_integer(Octstr *packed, unsigned long integer);void pack_short_integer(Octstr *packed, unsigned long integer);void pack_integer_value(Octstr *packed, unsigned long integer);int pack_integer_string(Octstr *packed, Octstr *value);void pack_version_value(Octstr *packed, Octstr *version);int pack_constrained_value(Octstr *packed, Octstr *text, long value);/*void pack_parameter(Octstr *packed, Parameter *parm);*/void pack_parameters(Octstr *packed, List *parms);int pack_uri(Octstr *packed, Octstr *value);int pack_md5(Octstr *packed, Octstr *value);int pack_challenge(Octstr *packed, Octstr *value);int pack_credentials(Octstr *packed, Octstr *value);int pack_date(Octstr *packed, Octstr *value);int pack_connection(Octstr *packed, Octstr *value);int pack_encoding(Octstr *packed, Octstr *value);int pack_field_name(Octstr *packed, Octstr *value);int pack_language(Octstr *packed, Octstr *value);int pack_method(Octstr *packed, Octstr *value);int pack_range_unit(Octstr *packed, Octstr *value);int pack_range_value(Octstr *packed, Octstr *value, long pos);int pack_transfer_encoding(Octstr *packed, Octstr *value);int pack_accept(Octstr *packed, Octstr *value);int pack_accept_charset(Octstr *packed, Octstr *value);int pack_accept_encoding(Octstr *packed, Octstr *value);int pack_accept_language(Octstr *packed, Octstr *value);int pack_cache_control(Octstr *packed, Octstr *value);int pack_content_disposition(Octstr *packed, Octstr *value);int pack_content_range(Octstr *packed, Octstr *value);int pack_content_type(Octstr *packed, Octstr *value);int pack_expires(Octstr *packed, Octstr *value);int pack_if_range(Octstr *packed, Octstr *value);int pack_pragma(Octstr *packed, Octstr *value);int pack_range(Octstr *packed, Octstr *value);int pack_retry_after(Octstr *packed, Octstr *value);int pack_warning(Octstr *packed, Octstr *value);void pack_separate_content_type(Octstr *packed, List *headers);int pack_list(Octstr *packed, long fieldnum, List *elements, int i);int pack_known_header(Octstr *packed, long fieldnum, Octstr *value);int field_value(ParseContext *context, int *well_known_value);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?