2003-08-15 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / glib / dbus-gproxy.h
1 /* -*- mode: C; c-file-style: "gnu" -*- */
2 /* dbus-gproxy.h convenience routines for calling methods, etc.
3  *
4  * Copyright (C) 2003  Red Hat, Inc.
5  *
6  * Licensed under the Academic Free License version 1.2
7  * 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program 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
16  * GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  *
22  */
23 #ifndef DBUS_GPROXY_H
24 #define DBUS_GPROXY_H
25
26 #if !defined (DBUS_INSIDE_DBUS_GLIB_H) && !defined (DBUS_COMPILATION)
27 #error "Only <dbus/dbus-glib.h> can be included directly, this file may disappear or change contents."
28 #endif
29
30 #include <dbus/dbus.h>
31 #include <glib.h>
32 #include <glib-object.h> /* for GCallback at the moment, we don't link to it */
33
34 G_BEGIN_DECLS
35
36 typedef struct DBusGProxy       DBusGProxy;
37 typedef struct DBusPendingCall DBusPendingCall;
38
39 DBusGProxy*      dbus_gproxy_new_for_service       (DBusConnection      *connection,
40                                                     const char          *service_name,
41                                                     const char          *interface_name);
42 DBusGProxy*      dbus_gproxy_new_for_service_owner (DBusConnection      *connection,
43                                                     const char          *service_name,
44                                                     const char          *interface_name,
45                                                     GError             **error);
46 DBusGProxy*      dbus_gproxy_new_for_object_id     (DBusConnection      *connection,
47                                                     const DBusObjectID  *object_id,
48                                                     const char          *interface_name);
49 DBusGProxy*      dbus_gproxy_new_for_interface     (DBusConnection      *connection,
50                                                     const char          *interface_name);
51 void             dbus_gproxy_ref                   (DBusGProxy          *proxy);
52 void             dbus_gproxy_unref                 (DBusGProxy          *proxy);
53 gboolean         dbus_gproxy_connect_signal        (DBusGProxy          *proxy,
54                                                     const char          *signal_name,
55                                                     GCallback            callback,
56                                                     void                *data,
57                                                     GFreeFunc            free_data_func,
58                                                     GError             **error);
59 DBusPendingCall* dbus_gproxy_begin_call            (DBusGProxy          *proxy,
60                                                     const char          *method,
61                                                     int                  first_arg_type,
62                                                     ...);
63 void             dbus_gproxy_oneway_call           (DBusGProxy          *proxy,
64                                                     const char          *method,
65                                                     int                  first_arg_type,
66                                                     ...);
67 gboolean         dbus_pending_call_is_complete     (DBusPendingCall     *call);
68 void             dbus_pending_call_cancel_and_free (DBusPendingCall     *call);
69 gboolean         dbus_pending_call_block_and_free  (DBusPendingCall     *call,
70                                                     GError             **error,
71                                                     int                  first_arg_type,
72                                                     ...);
73
74
75
76
77 G_END_DECLS
78
79 #endif /* DBUS_GPROXY_H */