int printInt();
void setInt(int _i);
- const static int size = 2;
- const static string methodSignatures[size];
-
private:
IoTRMICall *rmiCall;
};
-const string CallBack_CBStub::methodSignatures[CallBack_CBStub::size] = {
-
- "intprintInt()",
- "voidsetInt(int)"
-};
-
-
// Constructor
CallBack_CBStub::CallBack_CBStub() {
cout << "Got here in printInt()" << endl;
int numParam = 0;
- string sign = "intprintInt()";
+ int methodId = 0;
string retType = "int";
string paramCls[] = { };
void* paramObj[] = { };
int retVal = 0;
void* retObj = &retVal;
- rmiCall->remoteCall(objectId, sign, retType, paramCls, paramObj, numParam, retObj);
- cout << "Return value from printInt(): " << retVal << endl;
+ rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
return retVal;
}
void CallBack_CBStub::setInt(int _i) {
int numParam = 1;
- string sign = "voidsetInt(int)";
+ int methodId = 1;
string retType = "void";
string paramCls[] = { "int" };
void* paramObj[] = { &_i };
void* retObj = NULL;
- rmiCall->remoteCall(objectId, sign, retType, paramCls, paramObj, numParam, retObj);
+ rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
}
#endif