gnome-bluetooth r330 - trunk/common



Author: hadess
Date: Wed Feb 25 14:39:56 2009
New Revision: 330
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=330&view=rev

Log:
Move filter enums to an exported header

So we don't have to export bluetooth-client.h

Added:
   trunk/common/bluetooth-enums.h
Modified:
   trunk/common/Makefile.am
   trunk/common/bluetooth-client.h
   trunk/common/bluetooth-device-selection.h

Modified: trunk/common/Makefile.am
==============================================================================
--- trunk/common/Makefile.am	(original)
+++ trunk/common/Makefile.am	Wed Feb 25 14:39:56 2009
@@ -7,17 +7,22 @@
 		bluetooth-client.h bluetooth-client.c \
 		bluetooth-agent.h bluetooth-agent.c \
 		obex-agent.h obex-agent.c \
-		helper.c helper.h
+		helper.c helper.h \
+		bluetooth-enums.h
 libcommon_la_LIBADD = $(LIBGNOMEBT_LIBS)
 
 libgnome_bluetooth_1_0_la_SOURCES =			\
+	bluetooth-enums.h				\
 	bluetooth-client.h bluetooth-client.c		\
 	marshal.h marshal.c				\
 	bluetooth-device-selection.c bluetooth-device-selection.h
 libgnome_bluetooth_1_0_la_LIBADD = $(LIBGNOMEBT_LIBS)
 
 gnomebluetoothdir = $(pkgincludedir)
-gnomebluetooth_HEADERS = bluetooth-device-selection.c bluetooth-device-selection.h
+gnomebluetooth_HEADERS =				\
+	bluetooth-device-selection.c			\
+	bluetooth-device-selection.h			\
+	bluetooth-enums.h
 
 AM_CFLAGS = -I$(srcdir) $(LIBGNOMEBT_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
 

Modified: trunk/common/bluetooth-client.h
==============================================================================
--- trunk/common/bluetooth-client.h	(original)
+++ trunk/common/bluetooth-client.h	Wed Feb 25 14:39:56 2009
@@ -27,9 +27,26 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 #include <dbus/dbus-glib.h>
+#include <bluetooth-enums.h>
 
 G_BEGIN_DECLS
 
+enum {
+	BLUETOOTH_COLUMN_PROXY,
+	BLUETOOTH_COLUMN_ADDRESS,
+	BLUETOOTH_COLUMN_ALIAS,
+	BLUETOOTH_COLUMN_NAME,
+	BLUETOOTH_COLUMN_TYPE,
+	BLUETOOTH_COLUMN_ICON,
+	BLUETOOTH_COLUMN_RSSI,
+	BLUETOOTH_COLUMN_DEFAULT,
+	BLUETOOTH_COLUMN_PAIRED,
+	BLUETOOTH_COLUMN_TRUSTED,
+	BLUETOOTH_COLUMN_CONNECTED,
+	BLUETOOTH_COLUMN_DISCOVERING,
+	_BLUETOOTH_NUM_COLUMNS
+};
+
 #define BLUETOOTH_TYPE_CLIENT (bluetooth_client_get_type())
 #define BLUETOOTH_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
 					BLUETOOTH_TYPE_CLIENT, BluetoothClient))
@@ -88,43 +105,6 @@
 				const char *device,
 				BluetoothClientConnectFunc, gpointer data);
 
-enum {
-	BLUETOOTH_COLUMN_PROXY,
-	BLUETOOTH_COLUMN_ADDRESS,
-	BLUETOOTH_COLUMN_ALIAS,
-	BLUETOOTH_COLUMN_NAME,
-	BLUETOOTH_COLUMN_TYPE,
-	BLUETOOTH_COLUMN_ICON,
-	BLUETOOTH_COLUMN_RSSI,
-	BLUETOOTH_COLUMN_DEFAULT,
-	BLUETOOTH_COLUMN_PAIRED,
-	BLUETOOTH_COLUMN_TRUSTED,
-	BLUETOOTH_COLUMN_CONNECTED,
-	BLUETOOTH_COLUMN_DISCOVERING,
-	_BLUETOOTH_NUM_COLUMNS
-};
-
-enum {
-	BLUETOOTH_TYPE_ANY		= 1 << 0,
-	BLUETOOTH_TYPE_PHONE		= 1 << 1,
-	BLUETOOTH_TYPE_MODEM		= 1 << 2,
-	BLUETOOTH_TYPE_COMPUTER		= 1 << 3,
-	BLUETOOTH_TYPE_NETWORK		= 1 << 4,
-	BLUETOOTH_TYPE_HEADSET		= 1 << 5,
-	BLUETOOTH_TYPE_HEADPHONE	= 1 << 6,
-	BLUETOOTH_TYPE_OTHER_AUDIO	= 1 << 7,
-	BLUETOOTH_TYPE_KEYBOARD		= 1 << 8,
-	BLUETOOTH_TYPE_MOUSE		= 1 << 9,
-	BLUETOOTH_TYPE_CAMERA		= 1 << 10,
-	BLUETOOTH_TYPE_PRINTER		= 1 << 11,
-	BLUETOOTH_TYPE_JOYPAD		= 1 << 12,
-	BLUETOOTH_TYPE_TABLET		= 1 << 13,
-};
-
-#define _BLUETOOTH_TYPE_NUM_TYPES 12
-
-#define BLUETOOTH_TYPE_INPUT (BLUETOOTH_TYPE_KEYBOARD | BLUETOOTH_TYPE_MOUSE)
-
 const gchar *bluetooth_type_to_string(guint type);
 
 G_END_DECLS

Modified: trunk/common/bluetooth-device-selection.h
==============================================================================
--- trunk/common/bluetooth-device-selection.h	(original)
+++ trunk/common/bluetooth-device-selection.h	Wed Feb 25 14:39:56 2009
@@ -26,6 +26,7 @@
 #define __BLUETOOTH_DEVICE_SELECTION_H
 
 #include <gtk/gtkvbox.h>
+#include <bluetooth-enums.h>
 
 G_BEGIN_DECLS
 
@@ -41,13 +42,6 @@
 #define BLUETOOTH_GET_DEVICE_SELECTION_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
 				BLUETOOTH_TYPE_DEVICE_SELECTION, BluetoothDeviceSelectionClass))
 
-enum {
-	BLUETOOTH_CATEGORY_ALL,
-	BLUETOOTH_CATEGORY_PAIRED,
-	BLUETOOTH_CATEGORY_TRUSTED,
-	BLUETOOTH_CATEGORY_NUM_CATEGORIES
-};
-
 typedef struct _BluetoothDeviceSelection BluetoothDeviceSelection;
 typedef struct _BluetoothDeviceSelectionClass BluetoothDeviceSelectionClass;
 

Added: trunk/common/bluetooth-enums.h
==============================================================================
--- (empty file)
+++ trunk/common/bluetooth-enums.h	Wed Feb 25 14:39:56 2009
@@ -0,0 +1,59 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2005-2008  Marcel Holtmann <marcel holtmann org>
+ *
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library 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
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef __BLUETOOTH_ENUMS_H
+#define __BLUETOOTH_ENUMS_H
+
+G_BEGIN_DECLS
+
+enum {
+	BLUETOOTH_CATEGORY_ALL,
+	BLUETOOTH_CATEGORY_PAIRED,
+	BLUETOOTH_CATEGORY_TRUSTED,
+	BLUETOOTH_CATEGORY_NUM_CATEGORIES
+};
+
+enum {
+	BLUETOOTH_TYPE_ANY		= 1 << 0,
+	BLUETOOTH_TYPE_PHONE		= 1 << 1,
+	BLUETOOTH_TYPE_MODEM		= 1 << 2,
+	BLUETOOTH_TYPE_COMPUTER		= 1 << 3,
+	BLUETOOTH_TYPE_NETWORK		= 1 << 4,
+	BLUETOOTH_TYPE_HEADSET		= 1 << 5,
+	BLUETOOTH_TYPE_HEADPHONE	= 1 << 6,
+	BLUETOOTH_TYPE_OTHER_AUDIO	= 1 << 7,
+	BLUETOOTH_TYPE_KEYBOARD		= 1 << 8,
+	BLUETOOTH_TYPE_MOUSE		= 1 << 9,
+	BLUETOOTH_TYPE_CAMERA		= 1 << 10,
+	BLUETOOTH_TYPE_PRINTER		= 1 << 11,
+	BLUETOOTH_TYPE_JOYPAD		= 1 << 12,
+	BLUETOOTH_TYPE_TABLET		= 1 << 13,
+};
+
+#define _BLUETOOTH_TYPE_NUM_TYPES 12
+
+#define BLUETOOTH_TYPE_INPUT (BLUETOOTH_TYPE_KEYBOARD | BLUETOOTH_TYPE_MOUSE)
+
+G_END_DECLS
+
+#endif /* __BLUETOOTH_ENUMS_H */



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