1 /* tp-props-iface.h |
|
2 * |
|
3 * |
|
4 * Copyright (C) 2006 Collabora Ltd. |
|
5 * |
|
6 * |
|
7 * This library is free software; you can redistribute it and/or |
|
8 * modify it under the terms of the GNU Lesser General Public |
|
9 * License as published by the Free Software Foundation; either |
|
10 * version 2.1 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 * Lesser General Public License for more details. |
|
16 * |
|
17 * You should have received a copy of the GNU Lesser General Public |
|
18 * License along with this library; if not, write to the Free Software |
|
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 * |
|
21 */ |
|
22 |
|
23 #ifndef TP_PROPS_IFACE_H |
|
24 #define TP_PROPS_IFACE_H |
|
25 |
|
26 #ifndef DBUS_API_SUBJECT_TO_CHANGE |
|
27 #define DBUS_API_SUBJECT_TO_CHANGE |
|
28 #endif |
|
29 |
|
30 #include <dbus/dbus-glib.h> |
|
31 |
|
32 #include "tp-constants.h" |
|
33 #include "tp-props-iface-gen.h" |
|
34 |
|
35 #define TELEPATHY_PROPS_IFACE_QUARK (tp_get_props_interface()) |
|
36 |
|
37 typedef struct _TpPropsIface TpPropsIface; |
|
38 typedef struct _TpPropsIfaceClass TpPropsIfaceClass; |
|
39 |
|
40 struct _TpPropsIface |
|
41 { |
|
42 DBusGProxy parent; |
|
43 gpointer priv; |
|
44 }; |
|
45 |
|
46 struct _TpPropsIfaceClass |
|
47 { |
|
48 DBusGProxyClass parent_class; |
|
49 }; |
|
50 |
|
51 #ifdef __cplusplus |
|
52 extern "C" |
|
53 { |
|
54 #endif |
|
55 #ifdef SYMBIAN |
|
56 IMPORT_C |
|
57 #endif |
|
58 GType tp_props_iface_get_type (void); |
|
59 #ifdef __cplusplus |
|
60 } |
|
61 #endif |
|
62 |
|
63 #define TELEPATHY_PROPS_IFACE_TYPE (tp_props_iface_get_type ()) |
|
64 |
|
65 #define TELEPATHY_PROPS_IFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST \ |
|
66 ((obj), TELEPATHY_PROPS_IFACE_TYPE, \ |
|
67 TpPropsIface)) |
|
68 |
|
69 #define TELEPATHY_PROPS_IFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \ |
|
70 ((klass), TELEPATHY_PROPS_IFACE_TYPE, \ |
|
71 TpPropsIfaceClass)) |
|
72 |
|
73 #define TELEPATHY_IS_PROPS_IFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE \ |
|
74 ((obj), TELEPATHY_PROPS_IFACE_TYPE)) |
|
75 |
|
76 #define TELEPATHY_IS_PROPS_IFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE \ |
|
77 ((klass), TELEPATHY_PROPS_IFACE_TYPE)) |
|
78 |
|
79 #define TELEPATHY_PROPS_IFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \ |
|
80 ((obj), TELEPATHY_PROPS_IFACE_TYPE, \ |
|
81 TpPropsIfaceClass)) |
|
82 |
|
83 /** |
|
84 * TpPropsChangedFlags: |
|
85 * @TP_PROPS_CHANGED_VALUE: The value of the property changed. |
|
86 * @TP_PROPS_CHANGED_FLAGS: The flags of the property changed. |
|
87 */ |
|
88 typedef enum |
|
89 { |
|
90 TP_PROPS_CHANGED_VALUE = 0x01, |
|
91 TP_PROPS_CHANGED_FLAGS = 0x02 |
|
92 } TpPropsChanged; |
|
93 |
|
94 TpPropsIface * tp_props_iface_new (DBusGConnection *connection, |
|
95 const char *name, |
|
96 const char *path_name); |
|
97 |
|
98 void tp_props_iface_set_mapping (TpPropsIface *iface, |
|
99 const gchar *first_name, ...); |
|
100 gboolean tp_props_iface_get_value (TpPropsIface* iface, guint prop_id, |
|
101 GValue *return_value); |
|
102 |
|
103 gboolean tp_props_iface_set_value (TpPropsIface* iface, guint prop_id, |
|
104 const GValue *value); |
|
105 |
|
106 TelepathyPropertyFlags tp_props_iface_property_flags (TpPropsIface* iface, guint prop_id); |
|
107 |
|
108 #ifdef __cplusplus |
|
109 extern "C" |
|
110 { |
|
111 #endif |
|
112 #ifdef SYMBIAN |
|
113 IMPORT_C |
|
114 #endif |
|
115 GQuark tp_get_props_interface(void); |
|
116 #ifdef __cplusplus |
|
117 } |
|
118 #endif |
|
119 |
|
120 void tp_props_interface_set_signatures (DBusGProxy *proxy); |
|
121 #endif |
|