[gnome-bluetooth] Fix introspection



commit fd89195dc3173b37e35299b07e673b3ec0253647
Author: Giovanni Campagna <scampa giovanni gmail com>
Date:   Sun Sep 26 17:47:13 2010 +0200

    Fix introspection
    
    Fix generation of .gir files to work with latest gobject-introspection,
    including annotations where necessary.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=626759

 .gitignore                     |    5 ++++
 configure.ac                   |    2 +-
 lib/Makefile.am                |   52 +++++++++++++++++++++++++--------------
 lib/bluetooth-chooser-button.h |    6 +++-
 lib/bluetooth-client.c         |   30 +++++++++++++++++++----
 5 files changed, 68 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 277c4c1..b582429 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,7 @@ applet/test-icon
 properties/bluetooth-properties
 properties/bluetooth-properties.desktop.in
 properties/org.gnome.Bluetooth.gschema.xml
+properties/org.gnome.Bluetooth.gschema.valid
 
 moblin/bluetooth-panel
 moblin/bluetooth-panel.desktop.in
@@ -68,6 +69,7 @@ browse/bluetooth-browse
 
 help/*/.xml2po.mo
 help/*/gnome-bluetooth.xml
+help/*/*.mo
 !help/C/gnome-bluetooth.xml
 help/gnome-bluetooth-*.omf
 
@@ -88,3 +90,6 @@ docs/reference/libgnome-bluetooth/version.xml
 gnome-bluetooth-1.0.pc
 gnome-doc-utils.make
 gtk-doc.make
+.autotools
+.cproject
+.project
diff --git a/configure.ac b/configure.ac
index b67914a..0446d7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -189,7 +189,7 @@ AC_SUBST(DBUS_BINDING_TOOL)
 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
 AC_SUBST(GLIB_GENMARSHAL)
 
-GOBJECT_INTROSPECTION_CHECK([0.6.7])
+GOBJECT_INTROSPECTION_CHECK([0.9.5])
 
 GNOME_COMMON_INIT
 GNOME_DEBUG_CHECK
diff --git a/lib/Makefile.am b/lib/Makefile.am
index bdf6b17..9e610b8 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,7 +1,7 @@
 SUBDIRS = plugins
 
 EXTRA_DIST = 
-BUILT_GIRSOURCES =
+CLEANFILES =
 
 noinst_LTLIBRARIES = libcommon.la
 lib_LTLIBRARIES = libgnome-bluetooth.la
@@ -20,21 +20,31 @@ libcommon_la_SOURCES =						\
 libcommon_la_LIBADD = $(COMMON_LIBS)
 libcommon_la_LDFLAGS = -no-undefined $(AM_LDFLAGS)
 
-libgnome_bluetooth_la_SOURCES =				\
-	bluetooth-enums.h				\
-	bluetooth-client.h bluetooth-client.c		\
-	bluetooth-client-private.h			\
-	marshal.h marshal.c				\
-	gnome-bluetooth-enum-types.h			\
-	gnome-bluetooth-enum-types.c			\
-	bluetooth-chooser.c bluetooth-chooser.h		\
-	bluetooth-chooser-private.h			\
-	bluetooth-filter-widget.c			\
-	bluetooth-filter-widget.h			\
-	bluetooth-chooser-button.c			\
-	bluetooth-chooser-button.h			\
-	bluetooth-chooser-combo.c			\
-	bluetooth-chooser-combo.h
+# will be scanned for introspection annotation, but won't be installed
+libgnome_bluetooth_c_sources = 		\
+	bluetooth-client.c		\
+	bluetooth-agent.c		\
+	bluetooth-killswitch.c		\
+	marshal.c			\
+	gnome-bluetooth-enum-types.c	\
+	bluetooth-chooser.c		\
+	bluetooth-filter-widget.c	\
+	bluetooth-chooser-button.c	\
+	bluetooth-chooser-combo.c
+
+libgnome_bluetooth_private_headers = 	\
+	bluetooth-client-private.h	\
+	bluetooth-agent.h		\
+	bluetooth-killswitch.h		\
+	marshal.h			\
+	gnome-bluetooth-enum-types.h	\
+	bluetooth-chooser-private.h
+EXTRA_DIST += $(libgnome_bluetooth_private_headers)
+
+# public headers don't need to be listed, are handled by _HEADERS
+libgnome_bluetooth_la_SOURCES = 		\
+	$(libgnome_bluetooth_private_headers)	\
+	$(libgnome_bluetooth_c_sources)
 
 libgnome_bluetooth_la_LIBADD = $(LIBGNOMEBT_LIBS)
 
@@ -61,14 +71,16 @@ INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir)
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
 if HAVE_INTROSPECTION
-introspection_sources = $(gnomebluetooth_HEADERS)
+introspection_files =			\
+	$(gnomebluetooth_HEADERS) 		\
+	$(libgnome_bluetooth_c_sources)
 
 GnomeBluetooth-1.0.gir: libgnome-bluetooth.la
 GnomeBluetooth_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 DBusGLib-1.0 GModule-2.0
 GnomeBluetooth_1_0_gir_CFLAGS = -I$(srcdir) $(LIBGNOMEBT_CFLAGS)
 GnomeBluetooth_1_0_gir_LIBS = libgnome-bluetooth.la
 GnomeBluetooth_1_0_gir_SCANNERFLAGS = --strip-prefix=Bluetooth --pkg-export=gnome-bluetooth-1.0
-GnomeBluetooth_1_0_gir_FILES = $(introspection_sources)
+GnomeBluetooth_1_0_gir_FILES = $(introspection_files)
 INTROSPECTION_GIRS += GnomeBluetooth-1.0.gir
 
 girdir = $(INTROSPECTION_GIRDIR)
@@ -77,6 +89,8 @@ gir_DATA = $(INTROSPECTION_GIRS)
 typelibdir = $(INTROSPECTION_TYPELIBDIR)
 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
+CLEANFILES += $(gir_DATA) $(typelibs_DATA)
+
 endif # HAVE_INTROSPECTION
 
 BUILT_SOURCES = marshal.h marshal.c \
@@ -88,7 +102,7 @@ BUILT_SOURCES = marshal.h marshal.c \
 
 nodist_libcommon_la_SOURCES = $(BUILT_SOURCES)
 
-CLEANFILES = $(BUILT_SOURCES) $(gir_DATA) $(typelib_DATA)
+CLEANFILES += $(BUILT_SOURCES)
 
 noinst_PROGRAMS = test-client test-agent test-deviceselection test-plugins test-class
 
diff --git a/lib/bluetooth-chooser-button.h b/lib/bluetooth-chooser-button.h
index a449988..e71f15c 100644
--- a/lib/bluetooth-chooser-button.h
+++ b/lib/bluetooth-chooser-button.h
@@ -31,11 +31,13 @@ G_BEGIN_DECLS
 
 typedef struct _BluetoothChooserButton BluetoothChooserButton;
 
-typedef struct _BluetoothChooserButtonClass {
+typedef struct _BluetoothChooserButtonClass BluetoothChooserButtonClass;
+
+struct _BluetoothChooserButtonClass {
   GtkButtonClass parent_class;
 
   void (*chooser_created) (BluetoothChooserButton *self, GtkWidget *chooser);
-} BluetoothChooserButtonClass;
+};
 
 GType		bluetooth_chooser_button_get_type	(void);
 
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 71f67ea..156ce2f 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1305,7 +1305,7 @@ BluetoothClient *bluetooth_client_new(void)
  *
  * Returns an unfiltered #GtkTreeModel representing the adapter and devices available on the system.
  *
- * Return value: a #GtkTreeModel object.
+ * Return value: (transfer full): a #GtkTreeModel object.
  **/
 GtkTreeModel *bluetooth_client_get_model (BluetoothClient *client)
 {
@@ -1331,7 +1331,7 @@ GtkTreeModel *bluetooth_client_get_model (BluetoothClient *client)
  *
  * Returns a #GtkTreeModel of devices filtered using the @func, @data and @destroy arguments to pass to gtk_tree_model_filter_set_visible_func().
  *
- * Return value: a #GtkTreeModel object.
+ * Return value: (transfer full): a #GtkTreeModel object.
  **/
 GtkTreeModel *bluetooth_client_get_filter_model (BluetoothClient *client,
 						 GtkTreeModelFilterVisibleFunc func,
@@ -1378,7 +1378,7 @@ static gboolean adapter_filter(GtkTreeModel *model,
  *
  * Returns a filtered #GtkTreeModel with only adapters present.
  *
- * Return value: a #GtkTreeModel object.
+ * Return value: (transfer full): a #GtkTreeModel object.
  **/
 GtkTreeModel *bluetooth_client_get_adapter_model (BluetoothClient *client)
 {
@@ -1395,7 +1395,7 @@ GtkTreeModel *bluetooth_client_get_adapter_model (BluetoothClient *client)
  *
  * Returns a filtered #GtkTreeModel with only devices belonging to the selected adapter listed. Note that the model will follow a specific adapter, and will not follow the default-adapter when %NULL is passed.
  *
- * Return value: a #GtkTreeModel object.
+ * Return value: (transfer full): a #GtkTreeModel object.
  **/
 GtkTreeModel *bluetooth_client_get_device_model (BluetoothClient *client,
 						 DBusGProxy *adapter)
@@ -1460,7 +1460,7 @@ GtkTreeModel *bluetooth_client_get_device_model (BluetoothClient *client,
  * Returns a #GtkTreeModel of adapters filtered using the @func, @data and
  * @destroy arguments to pass to gtk_tree_model_filter_set_visible_func().
  *
- * Return value: a #GtkTreeModel object.
+ * Return value: (transfer full): a #GtkTreeModel object.
  **/
 GtkTreeModel *bluetooth_client_get_device_filter_model(BluetoothClient *client,
 		DBusGProxy *adapter, GtkTreeModelFilterVisibleFunc func,
@@ -1795,6 +1795,16 @@ static void connect_callback(DBusGProxy *proxy,
 	g_object_unref(proxy);
 }
 
+/**
+ * bluetooth_client_connect_service:
+ *
+ * @client: a #BluetoothClient
+ * @device: the DBUS path on which to operate
+ * @func: (scope async): a callback to call when the connection is complete
+ * @user_data:
+ *
+ * Returns: TRUE if the operation was started successfully, FALSE otherwise
+ */
 gboolean bluetooth_client_connect_service(BluetoothClient *client,
 					  const char *device,
 					  BluetoothClientConnectFunc func,
@@ -1926,6 +1936,16 @@ rev_sort_services (const char *servicea, const char *serviceb)
 	return 0;
 }
 
+/**
+ * bluetooth_client_disconnect_service:
+ *
+ * @client: a #BluetoothClient
+ * @device: the DBUS path on which to operate
+ * @func: (scope async): a callback to call when the disconnection is complete
+ * @user_data:
+ *
+ * Returns: TRUE if the operation was started successfully, FALSE otherwise
+ */
 gboolean bluetooth_client_disconnect_service (BluetoothClient *client,
 					      const char *device,
 					      BluetoothClientConnectFunc func,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]