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
34namespace DBus
35{
36
37namespace Ecore
38{
39
40class BusDispatcher;
41
43{
44private:
45
46 BusTimeout(Timeout::Internal *);
47
49
50 void toggle();
51
52 static Eina_Bool timeout_handler(void *);
53
54 void _enable();
55
56 void _disable();
57
58private:
59 Ecore_Timer *_etimer;
60
61 friend class BusDispatcher;
62};
63
64class DXXAPI BusWatch : public Watch
65{
66private:
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
84private:
85 Ecore_Fd_Handler *fd_handler;
87
88 friend class BusDispatcher;
89};
90
92{
93public:
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
111private:
112};
113
114} /* namespace Ecore */
115
116} /* namespace DBus */
117
118#endif//__DBUSXX_ECORE_INTEGRATION_H
#define DXXAPI
Definition api.h:36
static Eina_Bool check(void *data, Ecore_Fd_Handler *fdh)
static Eina_Bool dispatch(void *data, Ecore_Fd_Handler *fdh)
BusTimeout(Timeout::Internal *)
static Eina_Bool timeout_handler(void *)
static Eina_Bool watch_prepare(void *data, Ecore_Fd_Handler *fdh)
void data(Ecore::BusDispatcher *bd)
Ecore::BusDispatcher * _bd
BusWatch(Watch::Internal *)
static Eina_Bool watch_check(void *data, Ecore_Fd_Handler *fdh)
Ecore_Fd_Handler * fd_handler
Timeout(Internal *i)
Watch(Internal *i)
static gboolean watch_dispatch(GSource *source, GSourceFunc callback, gpointer data)