3 * Authors (alphabetical) :
4 * mrmoku (Klaus Kurzmann, mok@fluxnetz.de)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Public License as published by
8 * the Free Software Foundation; version 2 of the license.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser Public License for more details.
19 #include <dbus/dbus-glib.h>
20 #include <dbus/dbus-glib-bindings.h>
21 #include "frameworkd-glib-opimd-dbus.h"
22 #include "frameworkd-glib-opimd-contacts.h"
23 #include "frameworkd-glib-opimd-messages.h"
24 #include "frameworkd-glib-opimd-sources.h"
25 #include "frameworkd-glib-opimd-calls.h"
26 #include "frameworkd-glib-opimd-fields.h"
27 #include "frameworkd-glib-opimd-types.h"
28 #include "frameworkd-glib-opimd-tasks.h"
31 dbus_connect_to_opimd_types(void)
33 if (opimdTypesBus
== NULL
) {
35 dbus_connect_to_interface(OPIMD_BUS
, TYPES_BUS_PATH
,
42 dbus_connect_to_opimd_fields(const char *domain
)
44 return (dbus_connect_to_interface(OPIMD_BUS
, domain
,
50 dbus_connect_to_opimd_contacts(void)
52 if (opimdContactsBus
== NULL
)
54 dbus_connect_to_interface(OPIMD_BUS
, CONTACTS_BUS_PATH
,
60 dbus_connect_to_opimd_contact(const char *contact_path
)
62 return (dbus_connect_to_interface
63 (OPIMD_BUS
, contact_path
, CONTACT_INTERFACE
, "PIM.Contact"));
67 dbus_connect_to_opimd_contact_query(const char *query_path
)
69 return (dbus_connect_to_interface
70 (OPIMD_BUS
, query_path
, CONTACT_QUERY_INTERFACE
,
76 dbus_connect_to_opimd_messages(void)
78 if (opimdMessagesBus
== NULL
)
80 dbus_connect_to_interface(OPIMD_BUS
, MESSAGES_BUS_PATH
,
86 dbus_connect_to_opimd_message(const char *message_path
)
88 return (dbus_connect_to_interface
89 (OPIMD_BUS
, message_path
, MESSAGE_INTERFACE
, "PIM.Message"));
93 dbus_connect_to_opimd_message_query(const char *query_path
)
95 return (dbus_connect_to_interface
96 (OPIMD_BUS
, query_path
, MESSAGE_QUERY_INTERFACE
,
101 dbus_connect_to_opimd_message_folder(const char *folder_path
)
103 return (dbus_connect_to_interface
104 (OPIMD_BUS
, folder_path
, MESSAGE_FOLDER_INTERFACE
,
105 "PIM.MessageFolder"));
111 dbus_connect_to_opimd_sources(void)
113 if (opimdSourcesBus
== NULL
)
115 dbus_connect_to_interface(OPIMD_BUS
, SOURCES_BUS_PATH
,
122 dbus_connect_to_opimd_source(const char *source_path
)
124 return (dbus_connect_to_interface
125 (OPIMD_BUS
, source_path
, SOURCE_INTERFACE
, "PIM.Source"));
128 void dbus_connect_to_opimd_calls(void)
130 if (opimdCallsBus
== NULL
)
132 dbus_connect_to_interface(OPIMD_BUS
, CALLS_BUS_PATH
,
138 dbus_connect_to_opimd_call(const char *call_path
)
140 return (dbus_connect_to_interface
141 (OPIMD_BUS
, call_path
, PIM_CALL_INTERFACE
, "PIM.Call"));
145 dbus_connect_to_opimd_call_query(const char *query_path
)
147 return (dbus_connect_to_interface
148 (OPIMD_BUS
, query_path
, CALL_QUERY_INTERFACE
, "PIM.CallQuery"));
153 dbus_connect_to_opimd_tasks()
155 if (opimdTasksBus
== NULL
) {
156 opimdTasksBus
= dbus_connect_to_interface(OPIMD_BUS
,