OSDN Git Service

backup
[mimic/MiMicSDK.git] / lib / src / api / NyLPC_cModShortUrl.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_CMODSHORTURL_H_\r
27 #define NYLPC_CMODSHORTURL_H_\r
28 \r
29 #ifdef __cplusplus\r
30 extern "C" {\r
31 #endif /* __cplusplus */\r
32 #include "../http/NyLPC_cHttpBasicHeaderParser.h"\r
33 #include "NyLPC_cHttpdConnection.h"\r
34 \r
35 /**\r
36  * URLが最大31文字までの、短いHttpリクエストを処理します。\r
37  * このクラスは、NyLPC_TBasicHttpHeader_tにキャストできます。\r
38  */\r
39 typedef struct NyLPC_TcModShortUrl NyLPC_TcModShortUrl_t;\r
40 \r
41 \r
42 struct NyLPC_TcModShortUrl\r
43 {\r
44         struct NyLPC_THttpShortRequestHeader _header;\r
45 };\r
46 \r
47 /**\r
48  * コンストラクタ。\r
49  */\r
50 void NyLPC_cModShortUrl_initialize(NyLPC_TcModShortUrl_t* i_inst);\r
51 void NyLPC_cModShortUrl_finalize(NyLPC_TcModShortUrl_t* i_inst);\r
52 \r
53 NyLPC_TBool NyLPC_cModShortUrl_parse(NyLPC_TcModShortUrl_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);\r
54 \r
55 /**\r
56  * basicヘッダオブジェクトを返します。\r
57  */\r
58 const struct NyLPC_THttpBasicHeader* NyLPC_cModShortUrl_getHeader(const NyLPC_TcModShortUrl_t* i_inst);\r
59 /**\r
60  * URLを返します。URL長は最大32文字です。\r
61  */\r
62 const NyLPC_TChar* NyLPC_cModShortUrl_getPath(const NyLPC_TcModShortUrl_t* i_inst);\r
63 /**\r
64  * URLが一致しているかを返します。\r
65  */\r
66 NyLPC_TBool NyLPC_cModShortUrl_isEqualPath(const NyLPC_TcModShortUrl_t* i_inst,const NyLPC_TChar* i_path);\r
67 \r
68 /**\r
69  * Methodタイプを返します。\r
70  */\r
71 NyLPC_THttpMethodType NyLPC_cModShortUrl_getMethod(const NyLPC_TcModShortUrl_t* i_inst);\r
72 \r
73 \r
74 \r
75 \r
76 \r
77 \r
78 #ifdef __cplusplus\r
79 }\r
80 #endif /* __cplusplus */\r
81 \r
82 #endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */\r