changeset 2871:455e6e37feae

removed the warnings
author Paula Stanciu <paula.stanciu@gmail.com>
date Thu, 07 Aug 2008 13:36:41 +0300
parents c3df7556d85a
children 469f7e596a20 07bbc6cae113 a9917a9cde99
files src/bluetooth/agent.c src/bluetooth/bluetooth.c src/bluetooth/gui.c src/bluetooth/scan_gui.c
diffstat 4 files changed, 22 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/bluetooth/agent.c	Thu Aug 07 12:33:57 2008 +0300
+++ b/src/bluetooth/agent.c	Thu Aug 07 13:36:41 2008 +0300
@@ -40,7 +40,7 @@
 static GtkWidget *passkey_entry = NULL;
 static GtkWidget *ok_button = NULL;
 static GtkWidget *cancel_button = NULL;
-static char* passkey;
+static const char* passkey;
 static GList *adapter_list = NULL;
 DBusGProxy *pair_obj = NULL;
 
@@ -206,7 +206,7 @@
     input_free(input);
 }
 
-static void confirm_callback(gint response, gpointer user_data)
+/*static void confirm_callback(gint response, gpointer user_data)
 {
     struct input_data *input = user_data;
 
@@ -220,12 +220,11 @@
 
     input_free(input);
 }
-
+*/
+/*
 static void set_trusted(struct input_data *input)
 {
     DBusGProxy *object;
-    gboolean active;
-
     //aways set trusted -- we dont have yet an active button -
     //maybe I'll add one	
     object = dbus_g_proxy_new_for_name(connection, "org.bluez",
@@ -235,13 +234,11 @@
             G_TYPE_STRING, input->address, G_TYPE_INVALID,
             G_TYPE_INVALID);
 }
-
+*/
+/*
 static void auth_callback(gint response, gpointer user_data)
 {
 
-    /* I must call this function with the alway allow option and 
-     * don't boder to aks the user - to many questions 
-     */
     struct input_data *input = user_data;
 
     if (response == GTK_RESPONSE_YES) {
@@ -256,7 +253,7 @@
 
     input_free(input);
 }
-
+*/
 
 static void passkey_dialog(const char *path, const char *address,
         const gchar *device, DBusGMethodInvocation *context)
@@ -887,7 +884,7 @@
 
 	set_new_mode(adapter, mode);
 }
-
+/*
 static void adapter_free(gpointer data, gpointer user_data)
 {
 	struct adapter_data *adapter = data;
@@ -905,6 +902,7 @@
 
 	adapter->attached = 0;
 }
+*/
 
 static gint adapter_compare(gconstpointer a, gconstpointer b)
 {
@@ -913,7 +911,7 @@
 
 	return g_ascii_strcasecmp(adapter->path, path);
 }
-
+/*
 static void adapter_count(gpointer data, gpointer user_data)
 {
 	struct adapter_data *adapter = data;
@@ -923,7 +921,7 @@
 		(*count)++;
 }
 
-
+*/
 
 
 void add_bonding(){
--- a/src/bluetooth/bluetooth.c	Thu Aug 07 12:33:57 2008 +0300
+++ b/src/bluetooth/bluetooth.c	Thu Aug 07 13:36:41 2008 +0300
@@ -26,7 +26,6 @@
 #include "agent.h"
 #include <audacious/plugin.h>
 #define DEBUG 1
-static gboolean plugin_active = FALSE,exiting=FALSE;
 GList * current_device = NULL;
 gint config = 0;
 gint devices_no = 0;
@@ -44,7 +43,7 @@
 static void discovery_completed(DBusGProxy *object, gpointer user_data);
 void discover_devices(void);
 void disconnect_dbus_signals(void);
-static void show_restart_dialog(void);
+/*static void show_restart_dialog(void); */
 static void remove_bonding();
 GeneralPlugin bluetooth_gp =
 {
@@ -155,7 +154,7 @@
     dbus_g_object_register_marshaller(marshal_VOID__STRING_UINT_INT, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INVALID);
     run_agents();
     dbus_g_proxy_call(obj,"CreateBonding",NULL,G_TYPE_STRING,current_address,G_TYPE_INVALID,G_TYPE_INVALID); 
-
+    return NULL;
 }
 void connect_call(void)
 {
@@ -174,11 +173,10 @@
     FILE *temp_file;
     gint prev=0;
     char line[128];
-    gchar *home;
+    const gchar *home;
     gchar *device_line;
     gchar *file_name="";
     gchar *temp_file_name;
-    int ret = EOF+1;
     home = g_get_home_dir();
     file_name = g_strconcat(home,"/.asoundrc",NULL);
     temp_file_name = g_strconcat(home,"/temp_bt",NULL);
@@ -229,7 +227,7 @@
 
 
 }
-static void show_restart_dialog()
+/*static void show_restart_dialog()
 {
     static GtkWidget *window = NULL;
     GtkWidget *dialog;
@@ -241,7 +239,7 @@
     gtk_dialog_run (GTK_DIALOG (dialog));
     gtk_widget_destroy (dialog);
 }
-
+*/
 static void remote_device_found(DBusGProxy *object, char *address, const unsigned int class, const int rssi, gpointer user_data)
 {
     int found_in_list=FALSE; 
--- a/src/bluetooth/gui.c	Thu Aug 07 12:33:57 2008 +0300
+++ b/src/bluetooth/gui.c	Thu Aug 07 13:36:41 2008 +0300
@@ -84,8 +84,7 @@
     GtkTreeIter iter;
     gint dev_no=0;
     GList *dev;
-    gchar *temp;
-    if(!window) 
+      if(!window) 
         return NULL;
     /* create list store */
     store = gtk_list_store_new(NUM_COLUMNS,
@@ -118,12 +117,12 @@
                 ((DeviceData*)(dev->data))-> name,-1);
         dev = g_list_next(dev);
     }
-    //set the labels
-    //   temp = g_strdup_printf("0x%x",((DeviceData*)(dev->data))->class);
+    /*set the labels */
+    /*   temp = g_strdup_printf("0x%x",((DeviceData*)(dev->data))->class); */
     gtk_label_set_text(GTK_LABEL(label_prod),((DeviceData*)(dev->data))->name);
-    //    gtk_label_set_text(GTK_LABEL(label_class),temp);
+    /*    gtk_label_set_text(GTK_LABEL(label_class),temp); */
     gtk_label_set_text(GTK_LABEL(label_address),((DeviceData*)(dev->data))->address);
-    g_free(temp);
+   /* g_free(temp); */
     return GTK_TREE_MODEL(store);          
 
 }
--- a/src/bluetooth/scan_gui.c	Thu Aug 07 12:33:57 2008 +0300
+++ b/src/bluetooth/scan_gui.c	Thu Aug 07 13:36:41 2008 +0300
@@ -30,7 +30,7 @@
 static GtkWidget *rescan_buttton;
 static GtkWidget *close_button;
 static gint usage=0;
-
+void show_pairing_ok(void);
 gpointer progress()
 {