2 #include "CallBackInterface.hpp"
3 #include "../IoTRMICall.hpp"
7 class CallBack_Stub : public CallBackInterface {
10 CallBack_Stub(int _port, const char* _address, int _rev, bool* _bResult);
16 const static int size = 2;
17 const static string methodSignatures[size];
23 int objectId = 0; // Default value is 0
27 const string CallBack_Stub::methodSignatures[CallBack_Stub::size] = {
35 CallBack_Stub::CallBack_Stub() {
42 CallBack_Stub::CallBack_Stub(int _port, const char* _address, int _rev, bool* _bResult) {
45 rmiCall = new IoTRMICall(_port, _address, _rev, _bResult, methodSignatures, size);
49 CallBack_Stub::~CallBack_Stub() {
51 if (rmiCall != NULL) {
58 int CallBack_Stub::printInt() {
61 string sign = "intprintInt()";
62 string retType = "int";
63 string paramCls[] = { };
64 void* paramObj[] = { };
66 void* retObj = &retVal;
67 rmiCall->remoteCall(objectId, sign, retType, paramCls, paramObj, numParam, retObj);
72 void CallBack_Stub::setInt(int _i) {
75 string sign = "voidsetInt(int)";
76 string retType = "void";
77 string paramCls[] = { "int" };
78 void* paramObj[] = { &_i };
80 rmiCall->remoteCall(objectId, sign, retType, paramCls, paramObj, numParam, retObj);