Adding object ID and tons of minor adjustments for callback support
[iot2.git] / iotjava / iotrmi / C++ / sample / TestClass_Stub.cpp
1 #include <iostream>
2 #include <string>
3 #include "TestClass_Stub.hpp"
4
5 using namespace std;
6
7 int main(int argc, char *argv[])
8 {
9
10         int port = 5010;
11         const char* address = "localhost";
12         int rev = 0;
13         bool bResult = false;
14         vector<int> ports;
15         ports.push_back(12345);
16         //ports.push_back(13234);
17
18         TestClassInterface *tcStub = new TestClass_Stub(port, address, rev, &bResult, ports);
19         cout << "Return value: " << tcStub->setAndGetA(123) << endl;
20         cout << "Return value: " << tcStub->setACAndGetA("string", 123) << endl;
21         vector<string> input;
22         input.push_back("123");
23         input.push_back("456");
24         input.push_back("987");
25         /*vector<int> input;
26         input.push_back(123);
27         input.push_back(456);
28         input.push_back(987);*/
29
30         cout << "Return value: " << tcStub->sumArray(input) << endl;
31
32         delete tcStub;
33
34         return 0;
35 }