libt2n: (gerd) adapt codegen to new command_client interface, fix codegen-examples
authorGerd v. Egidy <gerd.von.egidy@intra2net.com>
Wed, 27 Aug 2008 13:58:48 +0000 (13:58 +0000)
committerGerd v. Egidy <gerd.von.egidy@intra2net.com>
Wed, 27 Aug 2008 13:58:48 +0000 (13:58 +0000)
codegen/main.cpp
examples-codegen/example1-client/client.cpp
examples-codegen/example1/server.cpp
examples-codegen/example2-client/client.cpp
examples-codegen/example2/client.cpp
examples-codegen/example2/server.cpp

index 7df215a..2e377ec 100644 (file)
@@ -492,7 +492,7 @@ void output_client_hpp(std::ostream &o, const std::string &group, const std::lis
     o << "class " << groupClass(group) << "_client : public libt2n::command_client\n"
     << "{\n"
     << "public:\n"
-    << groupClass(group) << "_client(libt2n::client_connection &_c,\n"
+    << groupClass(group) << "_client(libt2n::client_connection *_c,\n"
     << " long long _command_timeout_usec=command_timeout_usec_default,\n"
     << " long long _hello_timeout_usec=hello_timeout_usec_default)\n"
     << " : libt2n::command_client(_c,_command_timeout_usec,_hello_timeout_usec)\n"
index d0a5ebe..cc71bb0 100644 (file)
@@ -10,7 +10,7 @@ int main(int argc, char** argv)
     // if you want to connect to a tcp/ip server you pass the port and server name to the constructor
     libt2n::socket_client_connection sc("./socket");
     // this generated class has a method for each of our exported procedures
-    cmd_group_t2nexample_client cc(sc);
+    cmd_group_t2nexample_client cc(&sc);
 
     bool throwok=false;
 
index 528eabc..e636173 100644 (file)
@@ -1,3 +1,5 @@
+#include <signal.h> 
+
 #include <socket_server.hxx>
 #include <command_server.hxx> // for group_command_server
 
index bba7e07..861af9c 100644 (file)
@@ -1,6 +1,6 @@
 /*
-    Copyright (C) 2006                                                    
-    intra2net.com                                                         
+    Copyright (C) 2006
+    intra2net.com
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
 int main(int argc, char** argv)
 {
   libt2n::socket_client_connection sc("./socket");
-  cmd_group_default_client cc(sc);
+  cmd_group_default_client cc(&sc);
 
   bool throwok=false;
   try
index 1ed845b..dfddf83 100644 (file)
@@ -1,6 +1,6 @@
 /*
-    Copyright (C) 2006                                                    
-    intra2net.com                                                         
+    Copyright (C) 2006
+    intra2net.com
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -33,8 +33,8 @@ int main(int argc, char** argv)
 {
   libt2n::socket_client_connection sc("./socket");
   libt2n::socket_client_connection sc_other("./socket_other");
-  cmd_group_default_client cc(sc);
-  cmd_group_other_client cc_other(sc_other);
+  cmd_group_default_client cc(&sc);
+  cmd_group_other_client cc_other(&sc_other);
 
   bool throwok=false;
   try
index f7ce0f7..267e823 100644 (file)
@@ -16,6 +16,8 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+#include <signal.h>
+
 #include <socket_server.hxx>
 #include <command_server.hxx>