X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fclient.hxx;h=c639bb1da30fb52e3688fa2851db4da8c3d9cf3a;hp=293f548591d870666daef8aec8113231bb7b1d88;hb=91730468439e21dcf8d275d0f70d803c20ccaa7c;hpb=9424729586fdb0aabb671d2f1266bdb07e0bed38 diff --git a/src/client.hxx b/src/client.hxx index 293f548..c639bb1 100644 --- a/src/client.hxx +++ b/src/client.hxx @@ -20,6 +20,10 @@ #define __LIBT2N_CLIENT #include +#include +#include + +#include #include "connection.hxx" #include "types.hxx" @@ -31,10 +35,28 @@ namespace libt2n */ class client_connection : public connection { + private: + log_level_values log_level; + std::ostream *logstream; + + /// vector initialized for all callback-types, all elements in each list will be called + std::vector > > callbacks; + + protected: + void do_callbacks(callback_event_type event); + public: - client_connection() - : connection() - { } + client_connection(); + + virtual ~client_connection(); + + void close(); + + void set_logging(std::ostream *_logstream, log_level_values _log_level); + + std::ostream* get_logstream(log_level_values level); + + void add_callback(callback_event_type event, const boost::function& func); }; }