OSDN Git Service

git-svn-id: http://svn.osdn.jp/svnroot/mimic/trunk@198 47198e57-cb75-475f-84c4-a814cd...
[mimic/MiMicSDK.git] / lib / src / net / httpd / NyLPC_cHttpRequestPrefixParser.h
1 /*********************************************************************************\r
2  * PROJECT: MiMic\r
3  * --------------------------------------------------------------------------------\r
4  *\r
5  * This file is part of MiMic\r
6  * Copyright (C)2011 Ryo Iizuka\r
7  *\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
12  *\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
17  *\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
20  *\r
21  * For further information please contact.\r
22  *      http://nyatla.jp/\r
23  *      <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>\r
24  *\r
25  *********************************************************************************/\r
26 #ifndef NYLPC_cHttpRequestPrefixParser_H_\r
27 #define NYLPC_cHttpRequestPrefixParser_H_\r
28 \r
29 #include "NyLPC_httpService.h"\r
30 \r
31 \r
32 typedef struct NyLPC_TcHttpRequestPrefixParser NyLPC_TcHttpRequestPrefixParser_t;\r
33 \r
34 #define NyLPC_TcHttpRequestPrefixParser_MAX_URL_LEN 24\r
35 /**\r
36  * Httpリクエストの先頭部分を取り出します。\r
37  */\r
38 struct NyLPC_TcHttpRequestPrefixParser\r
39 {\r
40         NyLPC_THttpMethodType method;\r
41         NyLPC_TChar _url[NyLPC_TcHttpRequestPrefixParser_MAX_URL_LEN];\r
42 };\r
43 \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
46 \r
47 /**\r
48  * THttpHeaderPrefix._urlに最大TcHttpRequestPrefixParser_MAX_URL_LEN文字のPath文字列を取得する。\r
49  * 最大文字数よりも少なければ全てのPath文字列を蓄積し、多ければ先頭だけを蓄積する。\r
50  * @return\r
51  */\r
52 NyLPC_TBool NyLPC_cHttpRequestPrefixParser_parse(NyLPC_TcHttpRequestPrefixParser_t* i_inst,NyLPC_TcHttpStream_t* i_stream);\r
53 \r
54 const NyLPC_TChar* NyLPC_cHttpRequestPrefixParser_getUrlPrefix(const NyLPC_TcHttpRequestPrefixParser_t* i_inst);\r
55 \r
56 #endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */\r