Split agents
Subsystems (2)
PATCH 1/1 Split agents
Heya,
First draft patch to split the agents away from the main program. Seems to work fine for me.
This is mostly moving functions around though.
Cheers
Index: Makefile.am
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/Makefile.am,v retrieving revision 1.21
Makefile.am +1 -1
@@ -1,7 +1,7 @@ bin_PROGRAMS = bluetooth-applet -bluetooth_applet_SOURCES = main.c +bluetooth_applet_SOURCES = main.c main.h agents.c agents.h bluetooth_applet_LDADD = \ @NOTIFY_LIBS@ @GCONF_LIBS@ \
Index: main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/main.c,v
retrieving revision 1.98
main.c +16 -962
1,066 lines not on this page · raw message
main.h new file +4 -0
@@ -0,0 +1,4 @@ +void show_notification (const gchar *summary,const gchar *message, +const gchar *action,gint timeout,GCallback handler); +void close_notification (void ); +
agents.c new file +1013 -0
1,013 lines not on this page · raw message
agents.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2005-2007 Marcel Holtmann <[email protected]> +* Copyright (C) 2006-2007 Bastien Nocera <[email protected]> +* +* +* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +* +*/ + +int register_agents (void ); +void unregister_agents (void ); +void flush_input (void ); +void setup_agent_dbus (void ); +void set_auto_authorize (gboolean auto_authorize);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Quoted 6 lines · Bastien Nocera
Heya,
First draft patch to split the agents away from the main program. Seems to work fine for me.
This is mostly moving functions around though.
Updated patch following the comments from Marcel.
Cheers
Index: Makefile.am
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/Makefile.am,v retrieving revision 1.21
Makefile.am +1 -1
@@ -1,7 +1,7 @@ bin_PROGRAMS = bluetooth-applet -bluetooth_applet_SOURCES = main.c +bluetooth_applet_SOURCES = main.c agent.c agent.h notifications.c notifications.h bluetooth_applet_LDADD = \ @NOTIFY_LIBS@ @GCONF_LIBS@ \
Index: main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/main.c,v
retrieving revision 1.102
main.c +13 -1015
1,105 lines not on this page · raw message
agent.c new file +1026 -0
1,026 lines not on this page · raw message
agent.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2005-2007 Marcel Holtmann <[email protected]> +* Copyright (C) 2006-2007 Bastien Nocera <[email protected]> +* +* +* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +* +*/ + +int register_agents (GtkStatusIcon *_statusicon); +void unregister_agents (void ); +void flush_input (void ); +void setup_agent_dbus (DBusGConnection *_conn); +void set_auto_authorize (gboolean auto_authorize);
notifications.c new file +91 -0
91 lines not on this page · raw message
notifications.h new file +4 -0
@@ -0,0 +1,4 @@ +void show_notification (const gchar *summary,const gchar *message, +const gchar *action,gint timeout,GCallback handler); +void close_notification (void ); +
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Quoted 9 lines · Bastien Nocera
Quoted 6 lines · Bastien Nocera
Heya,
First draft patch to split the agents away from the main program. Seems to work fine for me.
This is mostly moving functions around though.
Updated patch following the comments from Marcel.
Patch that compiles again.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/Makefile.am,v retrieving revision 1.21
Makefile.am +1 -1
@@ -1,7 +1,7 @@ bin_PROGRAMS = bluetooth-applet -bluetooth_applet_SOURCES = main.c +bluetooth_applet_SOURCES = main.c agent.c agent.h notifications.c notifications.h bluetooth_applet_LDADD = \ @NOTIFY_LIBS@ @GCONF_LIBS@ \
Index: main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/applet/main.c,v
retrieving revision 1.103
main.c +17 -1016
1,117 lines not on this page · raw message
notifications.c new file +101 -0
101 lines not on this page · raw message
notifications.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2005-2008 Marcel Holtmann <[email protected]> +* Copyright (C) 2006-2008 Bastien Nocera <[email protected]> +* +* +* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +* +*/ + +void show_notification (const gchar *summary,const gchar *message, +const gchar *action,gint timeout,GCallback handler); +void close_notification (void ); +void register_notifications (GtkStatusIcon *_statusicon); +void unregister_notifications (void ); +
agent.c new file +1026 -0
1,026 lines not on this page · raw message
agent.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2005-2008 Marcel Holtmann <[email protected]> +* Copyright (C) 2006-2008 Bastien Nocera <[email protected]> +* +* +* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +* +*/ + +int register_agents (GtkStatusIcon *_statusicon); +void unregister_agents (void ); +void flush_input (void ); +void setup_agent_dbus (DBusGConnection *_conn); +void set_auto_authorize (gboolean auto_authorize);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Bastien,
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
First draft patch to split the agents away from the main program. Seems to work fine for me.
This is mostly moving functions around though.
Updated patch following the comments from Marcel.
Patch that compiles again.
I like the split of the notifications. Can we do that first in a separate patch. Looks simple enough and makes the history a lot cleaner compared to a big one.
Three small things with it:
* Please use notify.[ch] as filename. I don't like too long file names.
* No need to include <glib/gi18n.h>. No translations in this file.
* I saw some whitespaces and empty line things mistakes.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Bastien,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
First draft patch to split the agents away from the main program. Seems to work fine for me.
This is mostly moving functions around though.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Updated patch following the comments from Marcel.
Patch that compiles again.
I like the split of the notifications. Can we do that first in a separate patch. Looks simple enough and makes the history a lot cleaner compared to a big one.
actually just did it by myself. Care to update the split agents patch.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Bastien,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
First draft patch to split the agents away from the main program. Seems to work fine for me.
This is mostly moving functions around though.
Updated patch following the comments from Marcel.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Patch that compiles again.
I like the split of the notifications. Can we do that first in a separate patch. Looks simple enough and makes the history a lot cleaner compared to a big one.
actually just did it by myself. Care to update the split agents patch.
and did the agent split by myself, too. Ended up in bluez-gnome-0.18 release. Please test :)
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel