added some comments. remove .pc files on make clean
[libt2n] / examples / minimalistic-client-stub.cpp
1 #include "minimalistic-client-stub.hxx"
2 #include "minimalistic-stub.hxx"
3
4 // fake
5 libt2n::result* testfunc_cmd::operator()()
6 {
7   return NULL;
8 }
9
10 std::string cmd_group_example_client::testfunc(const std::string& str)
11 {
12     libt2n::result_container rc;
13     send_command(new testfunc_cmd(str),rc);
14
15     testfunc_res* res=dynamic_cast<testfunc_res*>(rc.get_result());
16     if (!res)
17       // TODO: another exception and details
18       throw libt2n::t2n_communication_error("result object of wrong type");
19     return res->get_data();
20 }
21
22 // include in this compilation unit to ensure the compilation unit is used
23 // see also:
24 // http://www.google.de/search?q=g%2B%2B+static+initializer+in+static+library
25 #include "minimalistic-stub.cpp"