/*******************************************************************************
 *	Client.cc	HomeNet RPC protocol test client
 *			T.Barnaby,	BEAM Ltd,	9/5/03
 *******************************************************************************
 */
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <BString.h>
#include <TestD.h>
#include <TestC.h>

int main(int argc, char** argv){
	Test::Obj1	client("test");
	BError		err;
	Int32		a1 = 33;
	Test::Data	a2;
	BArray<Int32>	a3(4, 44);
	UInt32		i;

	printf("Test1\n");
	err = client.setData(a1, a2);
	std::cout << "Result: " << err.getString() << "\n";
	err = client.getData(a1, a2);
	std::cout << "Result: " << err.getString() << "\n";


	printf("Test2\n");
	a1 = 33;
	err = client.setData1(a1, a3);
	a1 = 0;
	a3.clear();
	
	err = client.getData1(a1, a3);
	printf("a1: %d\n", a1);
	printf("a3: "); for(i = 0; i < a3.size(); i++) printf("%d, ", a3[i]); printf("\n");
	
	
	return 0;
}
