OSDN Git Service

backup
[mimic/MiMicSDK.git] / lib / src / net / httpd / mod / NyLPC_cModMiMicSetting.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_CMODMIMICSETTING_H_\r
27 #define NYLPC_CMODMIMICSETTING_H_\r
28 #include "../http/NyLPC_cHttpBasicHeaderParser.h"\r
29 #include "../NyLPC_cHttpdConnection.h"\r
30 #include "NyLPC_cModRomFiles.h"\r
31 #ifdef __cplusplus\r
32 extern "C" {\r
33 #endif /* __cplusplus */\r
34 \r
35 /**\r
36  * MiMicの動作設定CGIです。\r
37  * 以下のAPIを提供します。\r
38  * ./setup.api?c=[update|get]&p=[:param:]\r
39  * JSONインタフェイスです。MiMicの動作設定と取得を行います。\r
40  * c=get 現在の状態をjson形式で返却する。\r
41  * {\r
42  *              application: [:string:],\r
43  *              mac00010203: [:HEX32:],\r
44  *              mac0405xxxx: [:HEX32:],\r
45  *              ip: [:HEX32:],\r
46  *              mask: [:HEX32:],\r
47  *              droute: [:HEX32:]\r
48  *              port: [:HEX16:]\r
49  *              access\":%u}",\r
50  * c=update pパラメタの内容でFlashをアップデートする。\r
51  *              [:param:]=[:emac:][:hostaddr:][:subnetmask:][:defaultroot:][:port:]\r
52  *              ROMパラメータ。固定長のHEX文字列である。\r
53  *              [:emac:]=[[:HEX32:]{2}}\r
54  *              ビックエンディアン48bit値+パディング16bit\r
55  *              [:hostaddr:]=[:HEX32:]\r
56  *              IPアドレス。32bit値。ビックエンディアン\r
57  *              [:subnetmask:]=[:HEX32:]\r
58  *              サブネットマスク。32bit値。ビックエンディアン\r
59  *              [:defaultroot:]=[:HEX32:]\r
60  *              defaultrootアドレス。32bit値。ビックエンディアン\r
61  *              [:port:]=[:HEX32:]\r
62  *              ポート番号。2桁のHEX値である。ビックエンディアン。値16bit、パディング16bit\r
63  */\r
64 typedef struct NyLPC_TcModMiMicSetting NyLPC_TcModMiMicSetting_t;\r
65 \r
66 \r
67 struct NyLPC_TcModMiMicSetting\r
68 {\r
69         NyLPC_TcModRomFiles_t super;\r
70 };\r
71 \r
72 /**\r
73  * コンストラクタ。\r
74  */\r
75 void NyLPC_cModMiMicSetting_initialize(NyLPC_TcModMiMicSetting_t* i_inst,const NyLPC_TChar* i_ref_root_path);\r
76 void NyLPC_cModMiMicSetting_finalize(NyLPC_TcModMiMicSetting_t* i_inst);\r
77 \r
78 /**\r
79  * モジュールがコネクションをハンドリングできるかを返します。\r
80  */\r
81 NyLPC_TBool NyLPC_cModMiMicSetting_canHandle(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);\r
82 /**\r
83  * モジュールを実行します。\r
84  */\r
85 NyLPC_TBool NyLPC_cModMiMicSetting_execute(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);\r
86 \r
87 \r
88 #ifdef __cplusplus\r
89 }\r
90 #endif /* __cplusplus */\r
91 \r
92 #endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */\r