1 #ifndef _CALLBACK_STUB_HPP__
2 #define _CALLBACK_STUB_HPP__
5 #include "CallBackInterface.hpp"
6 #include "../IoTRMICall.hpp"
10 class CallBack_Stub : public CallBackInterface {
13 CallBack_Stub(int _port, const char* _address, int _rev, bool* _bResult);
19 const static int size = 2;
20 const static string methodSignatures[size];
26 int objectId = 0; // Default value is 0
30 const string CallBack_Stub::methodSignatures[CallBack_Stub::size] = {
38 CallBack_Stub::CallBack_Stub() {
45 CallBack_Stub::CallBack_Stub(int _port, const char* _address, int _rev, bool* _bResult) {
48 rmiCall = new IoTRMICall(_port, _address, _rev, _bResult);
52 CallBack_Stub::~CallBack_Stub() {
54 if (rmiCall != NULL) {
61 int CallBack_Stub::printInt() {
65 string retType = "int";
66 string paramCls[] = { };
67 void* paramObj[] = { };
69 void* retObj = &retVal;
70 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
75 void CallBack_Stub::setInt(int _i) {
79 string retType = "void";
80 string paramCls[] = { "int" };
81 void* paramObj[] = { &_i };
83 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);