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
cpp/ModRomFiles.cpp@7:2b33a8d84eb3, 2013-04-09 (annotated)
- Committer:
- nyatla
- Date:
- Tue Apr 09 09:32:25 2013 +0000
- Revision:
- 7:2b33a8d84eb3
- Parent:
- 3:0a94993be1f6
add local filesysytem module.; change path rule of module initialization.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nyatla | 3:0a94993be1f6 | 1 | #include "ModRomFiles.h" |
| nyatla | 3:0a94993be1f6 | 2 | #include "HttpdConnection.h" |
| nyatla | 3:0a94993be1f6 | 3 | |
| nyatla | 3:0a94993be1f6 | 4 | namespace MiMic |
| nyatla | 3:0a94993be1f6 | 5 | { |
| nyatla | 7:2b33a8d84eb3 | 6 | ModRomFiles::ModRomFiles(const char* i_path,const NyLPC_TRomFileData* i_ref_fsdata,unsigned short i_num):ModBaseClass(i_path) |
| nyatla | 3:0a94993be1f6 | 7 | { |
| nyatla | 3:0a94993be1f6 | 8 | } |
| nyatla | 7:2b33a8d84eb3 | 9 | ModRomFiles::ModRomFiles():ModBaseClass() |
| nyatla | 3:0a94993be1f6 | 10 | { |
| nyatla | 3:0a94993be1f6 | 11 | } |
| nyatla | 3:0a94993be1f6 | 12 | ModRomFiles::~ModRomFiles() |
| nyatla | 3:0a94993be1f6 | 13 | { |
| nyatla | 3:0a94993be1f6 | 14 | } |
| nyatla | 3:0a94993be1f6 | 15 | void ModRomFiles::setParam(const char* i_path,const NyLPC_TRomFileData* i_ref_fsdata,unsigned short i_num) |
| nyatla | 3:0a94993be1f6 | 16 | { |
| nyatla | 7:2b33a8d84eb3 | 17 | ModBaseClass::setParam(i_path); |
| nyatla | 3:0a94993be1f6 | 18 | this->_ref_fsdata=i_ref_fsdata; |
| nyatla | 3:0a94993be1f6 | 19 | this->_num=i_num; |
| nyatla | 3:0a94993be1f6 | 20 | } |
| nyatla | 3:0a94993be1f6 | 21 | bool ModRomFiles::execute(HttpdConnection& i_connection) |
| nyatla | 3:0a94993be1f6 | 22 | { |
| nyatla | 3:0a94993be1f6 | 23 | NyLPC_TcModRomFiles_t mod; |
| nyatla | 3:0a94993be1f6 | 24 | |
| nyatla | 3:0a94993be1f6 | 25 | //check parametor |
| nyatla | 3:0a94993be1f6 | 26 | if(this->_path==NULL){ |
| nyatla | 3:0a94993be1f6 | 27 | return false; |
| nyatla | 3:0a94993be1f6 | 28 | } |
| nyatla | 3:0a94993be1f6 | 29 | NyLPC_cModRomFiles_initialize(&mod,this->_path,this->_ref_fsdata,this->_num); |
| nyatla | 3:0a94993be1f6 | 30 | if(NyLPC_cModRomFiles_canHandle(&mod,i_connection._ref_inst)){ |
| nyatla | 3:0a94993be1f6 | 31 | NyLPC_cModRomFiles_execute(&mod,i_connection._ref_inst); |
| nyatla | 3:0a94993be1f6 | 32 | NyLPC_cModRomFiles_finalize(&mod); |
| nyatla | 3:0a94993be1f6 | 33 | return true; |
| nyatla | 3:0a94993be1f6 | 34 | } |
| nyatla | 3:0a94993be1f6 | 35 | NyLPC_cModRomFiles_finalize(&mod); |
| nyatla | 3:0a94993be1f6 | 36 | return false; |
| nyatla | 3:0a94993be1f6 | 37 | } |
| nyatla | 3:0a94993be1f6 | 38 | |
| nyatla | 3:0a94993be1f6 | 39 | } |
