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.
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
ModUPnPDevice.cpp
00001 #include <ModUPnPDevice.h> 00002 #include <NyLPC_net.h> 00003 #include <stdio.h> 00004 #include "mbed.h" 00005 #include "../NyLPC_cHttpdConnection_protected.h" 00006 00007 namespace MiMic 00008 { 00009 ModUPnPDevice::ModUPnPDevice():ModBaseClass(Net::UPNP_ROOT_PATH) 00010 { 00011 this->_ref_net=NULL; 00012 } 00013 ModUPnPDevice::~ModUPnPDevice() 00014 { 00015 } 00016 void ModUPnPDevice::setParam(const Net& i_ref_net) 00017 { 00018 this->_ref_net=&i_ref_net; 00019 ModBaseClass::setParam(Net::UPNP_ROOT_PATH); 00020 } 00021 bool ModUPnPDevice::execute(HttpdConnection& i_connection) 00022 { 00023 NyLPC_TcModUPnPDevice_t mod; 00024 00025 //check Net has UPnP Instance 00026 const NyLPC_TcUPnP_t* upnp=this->_ref_net->refUPnPInstance(); 00027 if(upnp==NULL || this->_path==NULL){ 00028 return false; 00029 } 00030 // 00031 NyLPC_cModUPnPDevice_initialize(&mod,upnp); 00032 if(NyLPC_cModUPnPDevice_canHandle(&mod,i_connection._ref_inst)){ 00033 NyLPC_cModUPnPDevice_execute(&mod,i_connection._ref_inst); 00034 NyLPC_cModUPnPDevice_finalize(&mod); 00035 return true; 00036 } 00037 NyLPC_cModUPnPDevice_finalize(&mod); 00038 return false; 00039 } 00040 00041 00042 00043 00044 }
Generated on Tue Jul 12 2022 15:46:15 by
1.7.2
MiMic Webservice library