1 /*********************************************************************************
\r
3 * --------------------------------------------------------------------------------
\r
5 * This file is part of MiMic
\r
6 * Copyright (C)2011 Ryo Iizuka
\r
8 * MiMic is free software: you can redistribute it and/or modify
\r
9 * it under the terms of the GNU Lesser General Public License as published
\r
10 * by the Free Software Foundation, either version 3 of the License, or
\r
11 * (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU Lesser General Public License
\r
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
21 * For further information please contact.
\r
23 * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
\r
25 *********************************************************************************/
\r
26 #ifndef NYLPC_cHttpRequestPrefixParser_H_
\r
27 #define NYLPC_cHttpRequestPrefixParser_H_
\r
29 #include "NyLPC_httpService.h"
\r
32 typedef struct NyLPC_TcHttpRequestPrefixParser NyLPC_TcHttpRequestPrefixParser_t;
\r
34 #define NyLPC_TcHttpRequestPrefixParser_MAX_URL_LEN 24
\r
36 * Httpリクエストの先頭部分を取り出します。
\r
38 struct NyLPC_TcHttpRequestPrefixParser
\r
40 NyLPC_THttpMethodType method;
\r
41 NyLPC_TChar _url[NyLPC_TcHttpRequestPrefixParser_MAX_URL_LEN];
\r
44 void NyLPC_cHttpRequestPrefixParser_initialize(NyLPC_TcHttpRequestPrefixParser_t* i_inst);
\r
45 #define NyLPC_cHttpRequestPrefixParser_finalize(i_inst) NyLPC_cHttpBasicHeaderParser_finalize(i_inst)
\r
48 * THttpHeaderPrefix._urlに最大TcHttpRequestPrefixParser_MAX_URL_LEN文字のPath文字列を取得する。
\r
49 * 最大文字数よりも少なければ全てのPath文字列を蓄積し、多ければ先頭だけを蓄積する。
\r
52 NyLPC_TBool NyLPC_cHttpRequestPrefixParser_parse(NyLPC_TcHttpRequestPrefixParser_t* i_inst,NyLPC_TcHttpStream_t* i_stream);
\r
54 const NyLPC_TChar* NyLPC_cHttpRequestPrefixParser_getUrlPrefix(const NyLPC_TcHttpRequestPrefixParser_t* i_inst);
\r
56 #endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */
\r