Jun Furutani / libMiMic

Fork of libMiMic by Ryo Iizuka

Revision:
85:416f8bbbdf54
Parent:
81:e5e4f2264d24
--- a/mbed/mod/ModJsonRpc.h	Fri Jul 04 02:10:40 2014 +0000
+++ b/mbed/mod/ModJsonRpc.h	Fri Jul 04 14:28:46 2014 +0000
@@ -3,7 +3,7 @@
 #include "HttpdConnection.h"
 #include "Httpd.h"
 #include "Net.h"
-#include <vector>
+
 
 namespace MiMic
 {
@@ -21,6 +21,11 @@
     class ModJsonRpc:ModBaseClass
     {
     public:
+        typedef struct TcJsonRpcEx{
+            NyLPC_TcModJsonRpc_t super;
+            ModJsonRpc* cppmod_ptr;
+        }TcJsonRpcEx_t;
+    public:
         class BasicRpcObject
         {
         public:
@@ -50,7 +55,7 @@
         BasicRpcObject** _objects;
         const struct NyLPC_TJsonRpcClassDef** _rpc_table;
     protected:
-        NyLPC_TcModJsonRpc_t* _mod;    
+        TcJsonRpcEx_t* _mod;
     public:
         ModJsonRpc();
         /**
@@ -72,7 +77,10 @@
     public:
         //for development
         int addObject(BasicRpcObject* i_object);
-        void* getObject(int i_oid);        
+        bool removeObject(int i_id);
+
+        void* getObject(int i_oid);
+        bool putResult(unsigned int i_id);
         bool putResult(unsigned int i_id,const char* i_params_fmt,...);
         bool putError(unsigned int i_id,int i_code);
     };