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_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
33 #endif /* __cplusplus */
\r
38 * ./setup.api?c=[update|get]&p=[:param:]
\r
39 * JSONインタフェイスです。MiMicの動作設定と取得を行います。
\r
40 * c=get 現在の状態をjson形式で返却する。
\r
42 * application: [:string:],
\r
43 * mac00010203: [:HEX32:],
\r
44 * mac0405xxxx: [:HEX32:],
\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
64 typedef struct NyLPC_TcModMiMicSetting NyLPC_TcModMiMicSetting_t;
\r
67 struct NyLPC_TcModMiMicSetting
\r
69 NyLPC_TcModRomFiles_t super;
\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
79 * モジュールがコネクションをハンドリングできるかを返します。
\r
81 NyLPC_TBool NyLPC_cModMiMicSetting_canHandle(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
\r
85 NyLPC_TBool NyLPC_cModMiMicSetting_execute(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
\r
90 #endif /* __cplusplus */
\r
92 #endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */
\r