sigx++  2.0.1
glib_dispatcher.h
Go to the documentation of this file.
1 #ifndef _SIGX_GLIB_DISPATCHER_HPP
2 #define _SIGX_GLIB_DISPATCHER_HPP
3 
4 /*
5  * Copyright 2005 Tim Mayberry and Klaus Triendl
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the Free
19  * Software Foundation, 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #include <glibmm/dispatcher.h>
24 #include <glibmm/main.h>
25 #include <sigxconfig.h>
26 #include <sigx/fwddecl.h>
27 #include <sigx/dispatcher.h>
28 
29 
30 namespace sigx
31 {
32 
39 {
40 public:
41  glib_dispatcher(const Glib::RefPtr<Glib::MainContext>& context = Glib::MainContext::get_default());
42 
47 
48  // virtuals from dispatcher
49  virtual void send(tunnel_context_base* tcb);
50 
51 private:
52  void do_work();
53 
55  Glib::Dispatcher m_disp;
56 };
57 
58 
59 } // namespace sigx
60 
61 
62 #endif // _SIGX_GLIB_DISPATCHER_HPP
the base class for all tunnel_context classes.
Definition: tunnel_context_base.h:42
virtual void send(tunnel_context_base *tcb)
puts the tunnel context into the list of messages to dispatch
Definition: glib_dispatcher.cpp:47
Definition: fwddecl.h:37
a dispatcher on top of Glib::dispatcher.
Definition: glib_dispatcher.h:38
Definition: auto_dispatchable.h:27
~glib_dispatcher()
Definition: glib_dispatcher.cpp:35
glib_dispatcher(const Glib::RefPtr< Glib::MainContext > &context=Glib::MainContext::get_default())
Definition: glib_dispatcher.cpp:28
base class denoting the ability to dispatch messages between threads.
Definition: dispatcher.h:140