Testing enum and callback combination
[iot2.git] / iotjava / iotrmi / C++ / sample / CallBack_CBStub.hpp
index 090b2c4bedb684e1829a2434194f70c42dc63c48..b674efa8c08ff0feda58d894b603061504f93734 100644 (file)
@@ -16,9 +16,6 @@ class CallBack_CBStub : public CallBackInterface {
                int                                             printInt();
                void                                    setInt(int _i);
 
-               const static int                size = 2;
-               const static string     methodSignatures[size];
-
        private:                
 
                IoTRMICall      *rmiCall;
@@ -26,13 +23,6 @@ class CallBack_CBStub : public CallBackInterface {
 };
 
 
-const string CallBack_CBStub::methodSignatures[CallBack_CBStub::size] = {
-
-       "intprintInt()",
-       "voidsetInt(int)"
-};
-
-
 // Constructor
 CallBack_CBStub::CallBack_CBStub() {
 
@@ -60,14 +50,13 @@ int CallBack_CBStub::printInt() {
 
        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;
 }
 
@@ -75,12 +64,12 @@ int CallBack_CBStub::printInt() {
 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