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_CMODUPNPDEVICE_H_
\r
27 #define NYLPC_CMODUPNPDEVICE_H_
\r
29 #include "../../upnp/NyLPC_cUPnP.h"
\r
30 #include "NyLPC_cModRomFiles.h"
\r
32 #include "NyLPC_stdlib.h"
\r
33 #include "NyLPC_http.h"
\r
38 #endif /* __cplusplus */
\r
40 * NyLPC_cUPnPクラスと協調して、UPnPDeviceのHTTP接続を処理します。
\r
43 * <li>DeviceDescription - /[:i_path:]/ddesc</li>
\r
44 * <li>CONTROL - /[:i_path:]/control/[:serviceIndex:]</li>
\r
45 * <li>EVENT - /[:i_path:]/control/[:serviceIndex:]</li>
\r
47 * [:serviceIndex:]はdeviceDescriptionを直列化して生成する通し番号です。
\r
48 * サービスを示す一意のIDです。16BITのHEX値です。
\r
49 * 上位8bitがデバイスインデックス、下位8bitがサービスインデックスです。
\r
50 * 例えば以下の構造のデバイスでは、サービス番号は以下のようになります。
\r
52 * dev:a 0x1n (0<=n<=0xf)
\r
53 * +-dev:b 0x2n (0<=n<=0xf)
\r
54 * |+-dev:c 0x3n (0<=n<=0xf)
\r
55 * +-dev:d 0x4n (0<=n<=0xf)
\r
58 typedef struct NyLPC_TcModUPnPDevice NyLPC_TcModUPnPDevice_t;
\r
60 struct NyLPC_TcModUPnPDevice
\r
62 NyLPC_TcModRomFiles_t super;
\r
63 const NyLPC_TcUPnP_t* _ref_upnp;
\r
71 * 参照するUPnPデバイスインスタンス
\r
74 void NyLPC_cModUPnPDevice_initialize(NyLPC_TcModUPnPDevice_t* i_inst,const NyLPC_TcUPnP_t* i_ref_upnp);
\r
79 void NyLPC_cModUPnPDevice_finalize(NyLPC_TcModUPnPDevice_t* i_inst);
\r
82 * モジュールがコネクションをハンドリングできるかを返します。
\r
84 NyLPC_TBool NyLPC_cModUPnPDevice_canHandle(NyLPC_TcModUPnPDevice_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
\r
91 NyLPC_TBool NyLPC_cModUPnPDevice_execute(NyLPC_TcModUPnPDevice_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
\r
95 #endif /* __cplusplus */
\r