1 #ifndef _CALLBACK_CBSKELETON_HPP__
2 #define _CALLBACK_CBSKELETON_HPP__
5 #include "CallBackInterface.hpp"
6 #include "../IoTRMIObject.hpp"
11 class CallBack_CBSkeleton : public CallBackInterface {
13 CallBack_CBSkeleton(CallBackInterface* _cb, int _objectId);
14 ~CallBack_CBSkeleton();
16 void invokeMethod(IoTRMIObject* rmiObj);
20 void ___printInt(IoTRMIObject* rmiObj);
21 void ___setInt(IoTRMIObject* rmiObj);
23 const static int size = 2;
24 const static string methodSignatures[size];
27 CallBackInterface *cb;
32 const string CallBack_CBSkeleton::methodSignatures[CallBack_CBSkeleton::size] = {
40 CallBack_CBSkeleton::CallBack_CBSkeleton(CallBackInterface* _cb, int _objectId) {
47 CallBack_CBSkeleton::~CallBack_CBSkeleton() {
52 int CallBack_CBSkeleton::printInt() {
54 return cb->printInt();
58 void CallBack_CBSkeleton::___printInt(IoTRMIObject* rmiObj) {
60 string paramCls[] = { };
62 void* paramObj[] = { };
63 rmiObj->getMethodParams(paramCls, numParam, paramObj);
64 int retVal = printInt();
65 void* retObj = &retVal;
66 rmiObj->sendReturnObj(retObj, "int");
70 void CallBack_CBSkeleton::setInt(int _i) {
76 void CallBack_CBSkeleton::___setInt(IoTRMIObject* rmiObj) {
78 string paramCls[] = { "int" };
81 void* paramObj[] = { ¶m1 };
82 rmiObj->getMethodParams(paramCls, numParam, paramObj);
87 void CallBack_CBSkeleton::invokeMethod(IoTRMIObject* rmiObj) {
89 int methodId = rmiObj->getMethodId();
92 case 0 : ___printInt(rmiObj); break;
93 case 1 : ___setInt(rmiObj); break;
95 string error = "Method Id not recognized!";