dbus-cxx logo

glibmm/dispatcher.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007,2008,2009 by Rick L. Vinyard, Jr.                  *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the dbus-cxx library.                            *
00006  *                                                                         *
00007  *   The dbus-cxx library is free software; you can redistribute it and/or *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The dbus-cxx library is distributed in the hope that it will be       *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #ifndef __DBUSXX_GLIBMM_DISPATCHER_H
00020 #define __DBUSXX_GLIBMM_DISPATCHER_H
00021 
00022 #include <dbus-cxx/dispatcher.h>
00023 #include <glibmm/main.h>
00024 #include <glibmm/dispatcher.h>
00025 
00026 namespace DBus
00027 {
00028   namespace Glib {
00029 
00043     class Dispatcher : public ::DBus::Dispatcher
00044     {
00045       public:
00046 
00047         typedef DBusCxxPointer<Dispatcher> pointer;
00048 
00049         typedef DBusCxxPointer<const Dispatcher> const_pointer;
00050 
00051         Dispatcher(bool is_running=true);
00052         
00053         Dispatcher(bool is_running, const ::Glib::RefPtr< ::Glib::MainContext >& context );
00054 
00055         static pointer create( bool is_running=true );
00056 
00057         static pointer create( bool is_running, const ::Glib::RefPtr< ::Glib::MainContext >& context );
00058 
00059         virtual ~Dispatcher();
00060 
00061       protected:
00062 
00063         ::Glib::Dispatcher m_glibmm_dispatcher;
00064 
00065         virtual void dispatch_thread_main();
00066 
00067         void on_glibmm_dispatch();
00068 
00069         pthread_cond_t m_cond_glibmm_processing;
00070         pthread_mutex_t m_mutex_glibmm_processing;
00071 
00072 
00073     };
00074 
00075   }
00076 }
00077 
00078 #endif

Generated on Mon Sep 21 10:59:27 2009 for dbus-cxx by doxygen 1.6.1