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
Diff: cpp/ModMiMicSetting.cpp
- Revision:
- 3:0a94993be1f6
- Child:
- 7:2b33a8d84eb3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/ModMiMicSetting.cpp Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,43 @@
+#include "ModMiMicSetting.h"
+#include "HttpdConnection.h"
+
+namespace MiMic
+{
+ ModMiMicSetting::ModMiMicSetting(const char* i_path)
+ {
+ this->setParam(i_path);
+ }
+ ModMiMicSetting::ModMiMicSetting()
+ {
+ this->_path=NULL;
+ }
+ ModMiMicSetting::~ModMiMicSetting()
+ {
+ if(this->_path!=NULL){
+ free(this->_path);
+ }
+ }
+ void ModMiMicSetting::setParam(const char* i_path)
+ {
+ this->_path=(char*)malloc(strlen(i_path)+1);
+ strcpy(this->_path,i_path);
+ }
+ bool ModMiMicSetting::execute(HttpdConnection& i_connection)
+ {
+ NyLPC_TcModMiMicSetting_t mod;
+
+ //check parametor
+ if(this->_path==NULL){
+ return false;
+ }
+ NyLPC_cModMiMicSetting_initialize(&mod,this->_path);
+ if(NyLPC_cModMiMicSetting_canHandle(&mod,i_connection._ref_inst)){
+ NyLPC_cModMiMicSetting_execute(&mod,i_connection._ref_inst);
+ NyLPC_cModMiMicSetting_finalize(&mod);
+ return true;
+ }
+ NyLPC_cModMiMicSetting_finalize(&mod);
+ return false;
+ }
+
+}
\ No newline at end of file
