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 "NyLPC_http.h"
\r
29 #include "../NyLPC_cHttpdConnection.h"
\r
30 #include "NyLPC_cModRomFiles.h"
\r
33 #endif /* __cplusplus */
\r
36 * MiMicの動作設定CGIです。MiMicの設定値をオンチップフラッシュへ保存/読み出しします。
\r
37 * uipServiceはNyLPC_TcNetConfig_tを継承したインスタンスで初期化してください。
\r
39 * JSONAPIとして、以下のAPIを提供します。
\r
40 * ./setup.api?c=[update|get]&p=[:param:]
\r
41 * MiMicの動作設定と取得を行います。
\r
42 * c=get 現在の状態をjson形式で返却する。
\r
44 * application: [:string:],
\r
45 * mac00010203: [:HEX32:],
\r
46 * mac0405xxxx: [:HEX32:],
\r
49 * droute: [:HEX32:],
\r
53 * c=update pパラメタ/hostの内容でFlashをアップデートする。
\r
54 * pパラメタは32bitの16進数文字列。
\r
55 * [ 0] emac_0123 ビックエンディアン48bit値+パディング16bit
\r
57 * [emac4][emac5][x][x]
\r
58 * [ 2] ipv4_flags IPV4設定フラグ
\r
59 * [ 3] ipv4_ip IPアドレス。32bit値。ビックエンディアン
\r
60 * [ 4] ipv4_mask サブネットマスク。32bit値。ビックエンディアン
\r
61 * [ 5] ipv4_deoute defaultrootアドレス。32bit値。ビックエンディアン
\r
63 * See NyLPC_cNetConfig.h
\r
64 * [ 7] http_param HTTPサービスポート番号。2桁のHEX値である。ビックエンディアン。値16bit、パディング16bit
\r
65 * [port_h][port_l][x][x]
\r
67 typedef struct NyLPC_TcModMiMicSetting NyLPC_TcModMiMicSetting_t;
\r
70 struct NyLPC_TcModMiMicSetting
\r
72 NyLPC_TcModRomFiles_t super;
\r
78 void NyLPC_cModMiMicSetting_initialize(NyLPC_TcModMiMicSetting_t* i_inst,const NyLPC_TChar* i_ref_root_path);
\r
79 void NyLPC_cModMiMicSetting_finalize(NyLPC_TcModMiMicSetting_t* i_inst);
\r
82 * モジュールがコネクションをハンドリングできるかを返します。
\r
84 NyLPC_TBool NyLPC_cModMiMicSetting_canHandle(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
\r
89 NyLPC_TBool NyLPC_cModMiMicSetting_execute(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
\r
94 #endif /* __cplusplus */
\r
96 #endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */
\r