From 9d1c3a0f8428f4b052899ab12c706961efb003d4 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 13 Aug 2003 22:14:47 +0000 Subject: new file, just fooling around --- glib/dbus-gidl.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 glib/dbus-gidl.h (limited to 'glib/dbus-gidl.h') diff --git a/glib/dbus-gidl.h b/glib/dbus-gidl.h new file mode 100644 index 00000000..a5dc6cb0 --- /dev/null +++ b/glib/dbus-gidl.h @@ -0,0 +1,80 @@ +/* -*- mode: C; c-file-style: "gnu" -*- */ +/* dbus-gidl.h data structure describing an interface, to be generated from IDL + * or something + * + * Copyright (C) 2003 Red Hat, Inc. + * + * Licensed under the Academic Free License version 1.2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef DBUS_GLIB_IDL_H +#define DBUS_GLIB_IDL_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct InterfaceInfo InterfaceInfo; +typedef struct MethodInfo MethodInfo; +typedef struct SignalInfo SignalInfo; +typedef struct ArgInfo ArgInfo; + +typedef enum +{ + ARG_IN, + ARG_OUT +} ArgDirection; + +typedef enum +{ + METHOD_SYNC, + METHOD_ASYNC, + METHOD_CANCELLABLE +} MethodStyle; + +InterfaceInfo* interface_info_new (void); +void interface_info_ref (InterfaceInfo *info); +void interface_info_unref (InterfaceInfo *info); +GSList* interface_info_get_methods (InterfaceInfo *info); +GSList* interface_info_get_signals (InterfaceInfo *info); + +MethodInfo* method_info_new (void); +void method_info_ref (MethodInfo *info); +void method_info_unref (MethodInfo *info); + +const char* method_info_get_name (MethodInfo *info); +GSList* method_info_get_args (MethodInfo *info); +MethodStyle method_info_get_style (MethodInfo *info); + +SignalInfo* signal_info_new (void); +void signal_info_ref (SignalInfo *info); +void signal_info_unref (SignalInfo *info); + +const char* signal_info_get_name (SignalInfo *info); +GSList* signal_info_get_args (SignalInfo *info); + +ArgInfo* arg_info_new (void); +void arg_info_ref (ArgInfo *info); +void arg_info_unref (ArgInfo *info); +const char* arg_info_get_name (ArgInfo *info); +int arg_info_get_type (ArgInfo *info); +ArgDirection arg_info_get_direction (ArgInfo *info); + +G_END_DECLS + +#endif /* DBUS_GLIB_IDL_H */ -- cgit From a6c8a71b1bcba04b63812a61f668e87af0922e5e Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 14 Aug 2003 22:49:13 +0000 Subject: 2003-08-14 Havoc Pennington * dbus/dbus-pending-call.c: start on new object that will replace DBusMessageHandler and ReplyHandlerData for tracking outstanding replies * dbus/dbus-gproxy.c: start on proxy object used to communicate with remote interfaces * dbus/dbus-gidl.c: do the boring boilerplate in here --- glib/dbus-gidl.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'glib/dbus-gidl.h') diff --git a/glib/dbus-gidl.h b/glib/dbus-gidl.h index a5dc6cb0..c3c72d61 100644 --- a/glib/dbus-gidl.h +++ b/glib/dbus-gidl.h @@ -47,28 +47,39 @@ typedef enum METHOD_CANCELLABLE } MethodStyle; -InterfaceInfo* interface_info_new (void); +InterfaceInfo* interface_info_new (const char *name); void interface_info_ref (InterfaceInfo *info); void interface_info_unref (InterfaceInfo *info); GSList* interface_info_get_methods (InterfaceInfo *info); GSList* interface_info_get_signals (InterfaceInfo *info); +void interface_info_add_method (InterfaceInfo *info, + MethodInfo *method); +void interface_info_add_signal (InterfaceInfo *info, + SignalInfo *signal); -MethodInfo* method_info_new (void); +MethodInfo* method_info_new (const char *name, + MethodStyle style); void method_info_ref (MethodInfo *info); void method_info_unref (MethodInfo *info); const char* method_info_get_name (MethodInfo *info); GSList* method_info_get_args (MethodInfo *info); MethodStyle method_info_get_style (MethodInfo *info); +void method_info_add_arg (MethodInfo *info, + ArgInfo *arg); -SignalInfo* signal_info_new (void); +SignalInfo* signal_info_new (const char *name); void signal_info_ref (SignalInfo *info); void signal_info_unref (SignalInfo *info); const char* signal_info_get_name (SignalInfo *info); GSList* signal_info_get_args (SignalInfo *info); +void signal_info_add_arg (SignalInfo *info, + ArgInfo *arg); -ArgInfo* arg_info_new (void); +ArgInfo* arg_info_new (const char *name, + ArgDirection direction, + int type); void arg_info_ref (ArgInfo *info); void arg_info_unref (ArgInfo *info); const char* arg_info_get_name (ArgInfo *info); -- cgit From ce969c6347b69180088c592e9184f05d0d3525c4 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 30 Aug 2003 02:56:12 +0000 Subject: 2003-08-29 Havoc Pennington * dbus/dbus-object-tree.c: modify to allow overlapping paths to be registered (struct DBusObjectSubtree): shrink this a lot, since we may have a lot of them (_dbus_object_tree_free_all_unlocked): implement (_dbus_object_tree_dispatch_and_unlock): implement --- glib/dbus-gidl.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'glib/dbus-gidl.h') diff --git a/glib/dbus-gidl.h b/glib/dbus-gidl.h index c3c72d61..812e1866 100644 --- a/glib/dbus-gidl.h +++ b/glib/dbus-gidl.h @@ -40,13 +40,6 @@ typedef enum ARG_OUT } ArgDirection; -typedef enum -{ - METHOD_SYNC, - METHOD_ASYNC, - METHOD_CANCELLABLE -} MethodStyle; - InterfaceInfo* interface_info_new (const char *name); void interface_info_ref (InterfaceInfo *info); void interface_info_unref (InterfaceInfo *info); @@ -57,8 +50,7 @@ void interface_info_add_method (InterfaceInfo *info, void interface_info_add_signal (InterfaceInfo *info, SignalInfo *signal); -MethodInfo* method_info_new (const char *name, - MethodStyle style); +MethodInfo* method_info_new (const char *name); void method_info_ref (MethodInfo *info); void method_info_unref (MethodInfo *info); -- cgit From 5fd1e389e1c1c12ad4a55c2af6abdc8e7a2f6d41 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 31 Aug 2003 01:51:44 +0000 Subject: 2003-08-30 Havoc Pennington * test/data/valid-config-files/system.d/test.conf: change to root for the user so warnings don't get printed * dbus/dbus-message.c: add dbus_message_get_path, dbus_message_set_path * dbus/dbus-object-tree.c (do_test_dispatch): add test of dispatching to a path * dbus/dbus-string.c (_dbus_string_validate_path): add * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement (_dbus_marshal_object_path): implement * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field to contain the path to the target object (DBUS_HEADER_FIELD_SENDER_SERVICE): rename DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service --- glib/dbus-gidl.h | 1 - 1 file changed, 1 deletion(-) (limited to 'glib/dbus-gidl.h') diff --git a/glib/dbus-gidl.h b/glib/dbus-gidl.h index 812e1866..68649cf3 100644 --- a/glib/dbus-gidl.h +++ b/glib/dbus-gidl.h @@ -56,7 +56,6 @@ void method_info_unref (MethodInfo *info); const char* method_info_get_name (MethodInfo *info); GSList* method_info_get_args (MethodInfo *info); -MethodStyle method_info_get_style (MethodInfo *info); void method_info_add_arg (MethodInfo *info, ArgInfo *arg); -- cgit From d021cfae6695f0f44102edf758abfc42e2f3c093 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 3 Sep 2003 02:08:25 +0000 Subject: 2003-09-01 Havoc Pennington * glib/dbus-gparser.c: implement * glib/dbus-gobject.c: start implementing skeletons support * configure.in: when disabling checks/assert, also define G_DISABLE_ASSERT and G_DISABLE_CHECKS --- glib/dbus-gidl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'glib/dbus-gidl.h') diff --git a/glib/dbus-gidl.h b/glib/dbus-gidl.h index 68649cf3..6e4e207a 100644 --- a/glib/dbus-gidl.h +++ b/glib/dbus-gidl.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS +typedef struct NodeInfo NodeInfo; typedef struct InterfaceInfo InterfaceInfo; typedef struct MethodInfo MethodInfo; typedef struct SignalInfo SignalInfo; @@ -40,9 +41,18 @@ typedef enum ARG_OUT } ArgDirection; +NodeInfo* node_info_new (const char *name); +void node_info_ref (NodeInfo *info); +void node_info_unref (NodeInfo *info); +const char* node_info_get_name (NodeInfo *info); +GSList* node_info_get_interfaces (NodeInfo *info); +void node_info_add_interface (NodeInfo *info, + InterfaceInfo *interface); + InterfaceInfo* interface_info_new (const char *name); void interface_info_ref (InterfaceInfo *info); void interface_info_unref (InterfaceInfo *info); +const char* interface_info_get_name (InterfaceInfo *info); GSList* interface_info_get_methods (InterfaceInfo *info); GSList* interface_info_get_signals (InterfaceInfo *info); void interface_info_add_method (InterfaceInfo *info, -- cgit From 85ab0327d82e4945ad16630e583d8cc68df25a90 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 7 Sep 2003 23:04:54 +0000 Subject: 2003-09-07 Havoc Pennington * Make Doxygen contented. --- glib/dbus-gidl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'glib/dbus-gidl.h') diff --git a/glib/dbus-gidl.h b/glib/dbus-gidl.h index 6e4e207a..7a667240 100644 --- a/glib/dbus-gidl.h +++ b/glib/dbus-gidl.h @@ -24,6 +24,8 @@ #ifndef DBUS_GLIB_IDL_H #define DBUS_GLIB_IDL_H +#ifndef DOXYGEN_SHOULD_SKIP_THIS + #include #include @@ -90,3 +92,5 @@ ArgDirection arg_info_get_direction (ArgInfo *info); G_END_DECLS #endif /* DBUS_GLIB_IDL_H */ + +#endif /* DOXYGEN_SHOULD_SKIP_THIS */ -- cgit From 583994cb3b7f5562fb7b8c37b4cb0d5af78e4ce2 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 17 Sep 2003 03:52:07 +0000 Subject: 2003-09-15 Havoc Pennington * dbus/dbus-pending-call.c: add the get/set object data boilerplate as for DBusConnection, etc. Use generic object data for the notify callback. * glib/dbus-gparser.c (parse_node): parse child nodes * tools/dbus-viewer.c: more hacking on the dbus-viewer * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to contain functions shared between the convenience lib and the installed lib * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add -export-symbols-regex to the GLib library * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock): fix the locking in here, and add a default handler for Introspect() that just returns sub-nodes. 2003-09-14 Havoc Pennington * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo rather than gfoo consistent * glib/dbus-gproxy.h: delete for now, move contents to dbus-glib.h, because the include files don't work right since we aren't in the dbus/ subdir. * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing (dbus_gproxy_end_call): finish (dbus_gproxy_begin_call): finish * glib/dbus-gmain.c (dbus_set_g_error): new * glib/dbus-gobject.c (handle_introspect): include information about child nodes in the introspection * dbus/dbus-connection.c (dbus_connection_list_registered): new function to help in implementation of introspection * dbus/dbus-object-tree.c (_dbus_object_tree_list_registered_and_unlock): new function 2003-09-12 Havoc Pennington * glib/dbus-gidl.h: add common base class for all the foo_info types * tools/dbus-viewer.c: add GTK-based introspection UI thingy similar to kdcop * test/Makefile.am: try test srcdir -ef . in addition to test srcdir = ., one of them should work (yeah lame) * glib/Makefile.am: build the "idl" parser stuff as a convenience library * glib/dbus-gparser.h: make description_load routines return NodeInfo* not Parser* * Makefile.am (SUBDIRS): build test dir after all library dirs * configure.in: add GTK+ detection --- glib/dbus-gidl.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'glib/dbus-gidl.h') diff --git a/glib/dbus-gidl.h b/glib/dbus-gidl.h index 7a667240..f95abfbd 100644 --- a/glib/dbus-gidl.h +++ b/glib/dbus-gidl.h @@ -27,10 +27,11 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS #include -#include +#include G_BEGIN_DECLS +typedef struct BaseInfo BaseInfo; typedef struct NodeInfo NodeInfo; typedef struct InterfaceInfo InterfaceInfo; typedef struct MethodInfo MethodInfo; @@ -43,13 +44,36 @@ typedef enum ARG_OUT } ArgDirection; +typedef enum +{ + INFO_TYPE_NODE, + INFO_TYPE_INTERFACE, + INFO_TYPE_METHOD, + INFO_TYPE_SIGNAL, + INFO_TYPE_ARG + +} InfoType; + +void base_info_ref (BaseInfo *info); +void base_info_unref (BaseInfo *info); +InfoType base_info_get_type (BaseInfo *info); +const char* base_info_get_name (BaseInfo *info); +void base_info_set_name (BaseInfo *info, + const char *name); +GType base_info_get_gtype (void); +#define BASE_INFO_TYPE (base_info_get_gtype ()) + + NodeInfo* node_info_new (const char *name); void node_info_ref (NodeInfo *info); void node_info_unref (NodeInfo *info); const char* node_info_get_name (NodeInfo *info); GSList* node_info_get_interfaces (NodeInfo *info); +GSList* node_info_get_nodes (NodeInfo *info); void node_info_add_interface (NodeInfo *info, InterfaceInfo *interface); +void node_info_add_node (NodeInfo *info, + NodeInfo *child); InterfaceInfo* interface_info_new (const char *name); void interface_info_ref (InterfaceInfo *info); -- cgit