Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
NyLPC_cModUPnPDevice.h
00001 /********************************************************************************* 00002 * PROJECT: MiMic 00003 * -------------------------------------------------------------------------------- 00004 * 00005 * This file is part of MiMic 00006 * Copyright (C)2011 Ryo Iizuka 00007 * 00008 * MiMic is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published 00010 * by the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * 00021 * For further information please contact. 00022 * http://nyatla.jp/ 00023 * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp> 00024 * 00025 *********************************************************************************/ 00026 #ifndef NYLPC_CMODUPNPDEVICE_H_ 00027 #define NYLPC_CMODUPNPDEVICE_H_ 00028 00029 #include "../../upnp/NyLPC_cUPnP.h" 00030 #include "NyLPC_cModRomFiles.h" 00031 00032 #include "NyLPC_stdlib.h" 00033 #include "NyLPC_http.h" 00034 00035 00036 #ifdef __cplusplus 00037 extern "C" { 00038 #endif /* __cplusplus */ 00039 /** 00040 * NyLPC_cUPnPクラスと協調して、UPnPDeviceのHTTP接続を処理します。 00041 * 提供するサービスは以下の通りです。 00042 * <ul> 00043 * <li>DeviceDescription - /[:i_path:]/ddesc</li> 00044 * <li>CONTROL - /[:i_path:]/control/[:serviceIndex:]</li> 00045 * <li>EVENT - /[:i_path:]/control/[:serviceIndex:]</li> 00046 * </ul> 00047 * [:serviceIndex:]はdeviceDescriptionを直列化して生成する通し番号です。 00048 * サービスを示す一意のIDです。16BITのHEX値です。 00049 * 上位8bitがデバイスインデックス、下位8bitがサービスインデックスです。 00050 * 例えば以下の構造のデバイスでは、サービス番号は以下のようになります。 00051 * <pre> 00052 * dev:a 0x1n (0<=n<=0xf) 00053 * +-dev:b 0x2n (0<=n<=0xf) 00054 * |+-dev:c 0x3n (0<=n<=0xf) 00055 * +-dev:d 0x4n (0<=n<=0xf) 00056 * </pre> 00057 */ 00058 typedef struct NyLPC_TcModUPnPDevice NyLPC_TcModUPnPDevice_t; 00059 00060 struct NyLPC_TcModUPnPDevice 00061 { 00062 NyLPC_TcModRomFiles_t super; 00063 const NyLPC_TcUPnP_t* _ref_upnp; 00064 }; 00065 00066 /** 00067 * コンストラクタ 00068 * @param i_inst 00069 * 初期化するインスタンスのポインタ 00070 * @param i_ref_upnp 00071 * 参照するUPnPデバイスインスタンス 00072 * 00073 */ 00074 void NyLPC_cModUPnPDevice_initialize(NyLPC_TcModUPnPDevice_t* i_inst,const NyLPC_TcUPnP_t* i_ref_upnp); 00075 00076 /** 00077 * 00078 */ 00079 void NyLPC_cModUPnPDevice_finalize(NyLPC_TcModUPnPDevice_t* i_inst); 00080 00081 /** 00082 * モジュールがコネクションをハンドリングできるかを返します。 00083 */ 00084 NyLPC_TBool NyLPC_cModUPnPDevice_canHandle(NyLPC_TcModUPnPDevice_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection); 00085 00086 00087 00088 /** 00089 * モジュールを実行します。 00090 */ 00091 NyLPC_TBool NyLPC_cModUPnPDevice_execute(NyLPC_TcModUPnPDevice_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection); 00092 00093 #ifdef __cplusplus 00094 } 00095 #endif /* __cplusplus */ 00096 #endif
Generated on Tue Jul 12 2022 16:22:58 by
