~awe/phablet-extras/ofono-lp1204683

« back to all changes in this revision

Viewing changes to include/dbus.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2009-08-15 15:55:11 UTC
  • Revision ID: james.westby@ubuntu.com-20090815155511-frst06dijguhyfi4
Tags: upstream-0.3
ImportĀ upstreamĀ versionĀ 0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  oFono - Open Telephony stack for Linux
 
4
 *
 
5
 *  Copyright (C) 2008-2009  Intel Corporation. All rights reserved.
 
6
 *
 
7
 *  This program is free software; you can redistribute it and/or modify
 
8
 *  it under the terms of the GNU General Public License version 2 as
 
9
 *  published by the Free Software Foundation.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 *
 
20
 */
 
21
 
 
22
#ifndef __OFONO_DBUS_H
 
23
#define __OFONO_DBUS_H
 
24
 
 
25
#ifdef __cplusplus
 
26
extern "C" {
 
27
#endif
 
28
 
 
29
#include <dbus/dbus.h>
 
30
 
 
31
#define OFONO_SERVICE   "org.ofono"
 
32
#define OFONO_MANAGER_INTERFACE "org.ofono.Manager"
 
33
#define OFONO_MANAGER_PATH "/"
 
34
#define OFONO_MODEM_INTERFACE "org.ofono.Modem"
 
35
 
 
36
/* Essentially a{sv} */
 
37
#define OFONO_PROPERTIES_ARRAY_SIGNATURE DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING \
 
38
                                        DBUS_TYPE_STRING_AS_STRING \
 
39
                                        DBUS_TYPE_VARIANT_AS_STRING \
 
40
                                        DBUS_DICT_ENTRY_END_CHAR_AS_STRING
 
41
 
 
42
DBusConnection *ofono_dbus_get_connection();
 
43
 
 
44
void ofono_dbus_dict_append(DBusMessageIter *dict, const char *key, int type,
 
45
                                void *value);
 
46
 
 
47
void ofono_dbus_dict_append_array(DBusMessageIter *dict, const char *key,
 
48
                                        int type, void *val);
 
49
 
 
50
int ofono_dbus_signal_property_changed(DBusConnection *conn, const char *path,
 
51
                                        const char *interface, const char *name,
 
52
                                        int type, void *value);
 
53
 
 
54
int ofono_dbus_signal_array_property_changed(DBusConnection *conn,
 
55
                                                const char *path,
 
56
                                                const char *interface,
 
57
                                                const char *name, int type,
 
58
                                                void *value);
 
59
 
 
60
#ifdef __cplusplus
 
61
}
 
62
#endif
 
63
 
 
64
#endif /* __OFONO_DBUS_H */