Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

dbus-glib.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */ 00002 /* dbus-glib.h GLib integration 00003 * 00004 * Copyright (C) 2002, 2003 CodeFactory AB 00005 * Copyright (C) 2003, 2004 Red Hat, Inc. 00006 * 00007 * Licensed under the Academic Free License version 2.1 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 * 00023 */ 00024 #ifndef DBUS_GLIB_H 00025 #define DBUS_GLIB_H 00026 00027 #include <glib-object.h> 00028 #include <dbus/dbus-protocol.h> 00029 #include <dbus/dbus-shared.h> 00030 00031 G_BEGIN_DECLS 00032 00033 #define DBUS_INSIDE_DBUS_GLIB_H 1 00034 00035 00039 typedef struct DBusGConnection DBusGConnection; 00043 typedef struct DBusGMessage DBusGMessage; 00047 typedef struct DBusGPendingCall DBusGPendingCall; 00048 00049 void dbus_g_connection_flush (DBusGConnection *connection); 00050 00051 GQuark dbus_g_error_quark (void); 00052 #define DBUS_GERROR dbus_g_error_quark () 00053 00054 typedef enum 00055 { 00056 #include <dbus/dbus-glib-error-enum.h> 00057 } DBusGError; 00058 00059 void dbus_g_thread_init (void); 00060 DBusGConnection* dbus_g_bus_get (DBusBusType type, 00061 GError **error); 00062 00063 typedef struct DBusGObjectInfo DBusGObjectInfo; 00064 typedef struct DBusGMethodInfo DBusGMethodInfo; 00065 00066 typedef DBusHandlerResult (* DBusGMethodMarshaller) (DBusGConnection *connection, 00067 DBusGMessage *message, 00068 void *user_data); 00069 00075 struct DBusGMethodInfo 00076 { 00077 GCallback function; 00078 DBusGMethodMarshaller marshaller; 00079 int data_offset; 00080 }; 00081 00086 struct DBusGObjectInfo 00087 { 00088 int format_version; 00091 const DBusGMethodInfo *infos; 00092 const unsigned char *data; 00093 }; 00094 00095 void dbus_g_object_class_install_info (GObjectClass *object_class, 00096 const DBusGObjectInfo *info); 00097 void dbus_g_connection_register_g_object (DBusGConnection *connection, 00098 const char *at_path, 00099 GObject *object); 00100 00101 00102 typedef struct DBusGProxy DBusGProxy; 00103 typedef struct DBusGProxyClass DBusGProxyClass; 00104 00105 #define DBUS_TYPE_G_PROXY (dbus_g_proxy_get_type ()) 00106 #define DBUS_G_PROXY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), DBUS_TYPE_G_PROXY, DBusGProxy)) 00107 #define DBUS_G_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUS_TYPE_G_PROXY, DBusGProxyClass)) 00108 #define DBUS_IS_G_PROXY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), DBUS_TYPE_G_PROXY)) 00109 #define DBUS_IS_G_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUS_TYPE_G_PROXY)) 00110 #define DBUS_G_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUS_TYPE_G_PROXY, DBusGProxyClass)) 00111 00112 00113 GType dbus_g_proxy_get_type (void) G_GNUC_CONST; 00114 DBusGProxy* dbus_g_proxy_new_for_service (DBusGConnection *connection, 00115 const char *service_name, 00116 const char *path_name, 00117 const char *interface_name); 00118 DBusGProxy* dbus_g_proxy_new_for_service_owner (DBusGConnection *connection, 00119 const char *service_name, 00120 const char *path_name, 00121 const char *interface_name, 00122 GError **error); 00123 DBusGProxy* dbus_g_proxy_new_for_peer (DBusGConnection *connection, 00124 const char *path_name, 00125 const char *interface_name); 00126 void dbus_g_proxy_connect_signal (DBusGProxy *proxy, 00127 const char *signal_name, 00128 GCallback handler, 00129 void *data, 00130 GClosureNotify free_data_func); 00131 void dbus_g_proxy_disconnect_signal (DBusGProxy *proxy, 00132 const char *signal_name, 00133 GCallback handler, 00134 void *data); 00135 DBusGPendingCall* dbus_g_proxy_begin_call (DBusGProxy *proxy, 00136 const char *method, 00137 int first_arg_type, 00138 ...); 00139 gboolean dbus_g_proxy_end_call (DBusGProxy *proxy, 00140 DBusGPendingCall *pending, 00141 GError **error, 00142 int first_arg_type, 00143 ...); 00144 void dbus_g_proxy_call_no_reply (DBusGProxy *proxy, 00145 const char *method, 00146 int first_arg_type, 00147 ...); 00148 00149 00150 #undef DBUS_INSIDE_DBUS_GLIB_H 00151 00152 G_END_DECLS 00153 00154 #endif /* DBUS_GLIB_H */ 00155 00156 00157

Generated on Tue Oct 12 02:07:52 2004 for D-BUS by doxygen 1.3.7