# DBus-C++

## Desktop Communication Bus System

libdbus-c-- Documentation 0.9.0

- Files
- Data Structures
- Globals
- Main Page

ecore-integration.h
Go to the documentation of this file.
1/*
2 *
3 * D-Bus++ - C++ bindings for D-Bus
4 *
5 * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
6 *
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24
25#ifndef __DBUSXX_ECORE_INTEGRATION_H
26#define __DBUSXX_ECORE_INTEGRATION_H
27
28#include <Ecore.h>
29
30#include "api.h"
31#include "dispatcher.h"
32#include "Ecore.h"
33
34 namespace DBus
35{
36
37 namespace Ecore
38{
39
40 class BusDispatcher;
41
42 class DXXAPI BusTimeout : public Timeout
43{
44 private:
45
46 BusTimeout(Timeout::Internal *);
47
48 ~BusTimeout();
49
50 void toggle();
51
52 static Eina_Bool timeout_handler(void *);
53
54 void _enable();
55
56 void _disable();
57
58 private:
59 Ecore_Timer *_etimer;
60
61 friend class BusDispatcher;
62};
63
64 class DXXAPI BusWatch : public Watch
65{
66 private:
67
68 BusWatch(Watch::Internal *);
69
70 ~BusWatch();
71
72 void toggle();
73
74 static Eina_Bool watch_check(void *data, Ecore_Fd_Handler *fdh);
75 static Eina_Bool watch_prepare(void *data, Ecore_Fd_Handler *fdh);
76 static Eina_Bool watch_dispatch(void *data, Ecore_Fd_Handler *fdh);
77
78 void _enable();
79
80 void _disable();
81
82 void data(Ecore::BusDispatcher *bd);
83
84 private:
85 Ecore_Fd_Handler *fd_handler;
86 Ecore::BusDispatcher *_bd;
87
88 friend class BusDispatcher;
89};
90
91 class DXXAPI BusDispatcher : public Dispatcher
92{
93 public:
94 BusDispatcher();
95
96 void enter() {}
97
98 void leave() {}
99
100 Timeout *add_timeout(Timeout::Internal *);
101
102 void rem_timeout(Timeout *);
103
104 Watch *add_watch(Watch::Internal *);
105
106 void rem_watch(Watch *);
107
108 static Eina_Bool dispatch(void *data, Ecore_Fd_Handler *fdh);
109 static Eina_Bool check(void *data, Ecore_Fd_Handler *fdh);
110
111 private:
112};
113
114} /* namespace Ecore */
115
116} /* namespace DBus */
117
118#endif//__DBUSXX_ECORE_INTEGRATION_H
api.h
DXXAPI
#define DXXAPI
Definition api.h:36
DBus::Dispatcher
Definition dispatcher.h:152
DBus::Ecore::BusDispatcher
Definition ecore-integration.h:92
DBus::Ecore::BusDispatcher::check
static Eina_Bool check(void *data, Ecore_Fd_Handler *fdh)
Definition ecore-integration.cpp:158
DBus::Ecore::BusDispatcher::dispatch
static Eina_Bool dispatch(void *data, Ecore_Fd_Handler *fdh)
DBus::Ecore::BusDispatcher::enter
void enter()
Definition ecore-integration.h:96
DBus::Ecore::BusDispatcher::BusDispatcher
BusDispatcher()
Definition ecore-integration.cpp:154
DBus::Ecore::BusDispatcher::leave
void leave()
Definition ecore-integration.h:98
DBus::Ecore::BusTimeout::_disable
void _disable()
Definition ecore-integration.cpp:82
DBus::Ecore::BusTimeout::toggle
void toggle()
Definition ecore-integration.cpp:50
DBus::Ecore::BusTimeout::BusTimeout
BusTimeout(Timeout::Internal *)
Definition ecore-integration.cpp:36
DBus::Ecore::BusTimeout::_etimer
Ecore_Timer * _etimer
Definition ecore-integration.h:59
DBus::Ecore::BusTimeout::_enable
void _enable()
Definition ecore-integration.cpp:75
DBus::Ecore::BusTimeout::BusDispatcher
friend class BusDispatcher
Definition ecore-integration.h:61
DBus::Ecore::BusTimeout::timeout_handler
static Eina_Bool timeout_handler(void *)
Definition ecore-integration.cpp:64
DBus::Ecore::BusWatch::watch_prepare
static Eina_Bool watch_prepare(void *data, Ecore_Fd_Handler *fdh)
DBus::Ecore::BusWatch::toggle
void toggle()
Definition ecore-integration.cpp:103
DBus::Ecore::BusWatch::data
void data(Ecore::BusDispatcher *bd)
Definition ecore-integration.cpp:149
DBus::Ecore::BusWatch::_bd
Ecore::BusDispatcher * _bd
Definition ecore-integration.h:86
DBus::Ecore::BusWatch::BusWatch
BusWatch(Watch::Internal *)
Definition ecore-integration.cpp:89
DBus::Ecore::BusWatch::_enable
void _enable()
Definition ecore-integration.cpp:130
DBus::Ecore::BusWatch::watch_check
static Eina_Bool watch_check(void *data, Ecore_Fd_Handler *fdh)
DBus::Ecore::BusWatch::_disable
void _disable()
Definition ecore-integration.cpp:140
DBus::Ecore::BusWatch::fd_handler
Ecore_Fd_Handler * fd_handler
Definition ecore-integration.h:85
DBus::Ecore::BusWatch::BusDispatcher
friend class BusDispatcher
Definition ecore-integration.h:88
DBus::Timeout
Definition dispatcher.h:36
DBus::Timeout::Timeout
Timeout(Internal *i)
DBus::Watch
Definition dispatcher.h:87
DBus::Watch::Watch
Watch(Internal *i)
dispatcher.h
watch_dispatch
static gboolean watch_dispatch(GSource *source, GSourceFunc callback, gpointer data)
Definition glib-integration.cpp:104
DBus::Ecore
Definition ecore-integration.h:38
DBus
Definition connection_p.h:42