ANNOUNCE: libmbca and mobile-broadband-provider-info

2008-08-19 Thread Antti Kaijanmäki
Hello,

I'm proud to announce the first releases of libmbca and
mobile-broadband-provider-info. Releases are available from GNOME SVN.


libmbca 0.0.1:
http://svn.gnome.org/viewvc/libmbca/tags/

mobile-broadband-provider-info 20080814:
http://svn.gnome.org/viewvc/mobile-broadband-provider-info/tags/



What is mobile-broadband-provider-info
===
The module contains mobile broadband settings for different service
providers in different countries. The package contains only
informational files so it's safe for distributions to grab updates even
during feature freeze and maintenance stages.

Service provider specific information is stored in a XML file. XML is
not the most optimized format for a database, but it's easy to read,
understand and edit.

The database is released under Creative Commons Public Domain (CC-PD).

for more info, see:
http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders



What is libmbca
===
libmbca provides Mobile Broadband Configuration Assistant which is a
GObject and GtkAssistant based utility that splits the configuration of
a new mobile broadband connection into small easy steps. In the simplest
form libmbca offers an frontend for mobile-broadband-provider-info.

libmbca is released under the GNU General Public License version 3.



More information

These modules are resulting from Kesäkoodi (Summercode Finland) project
Mobile Broadband Configuration Assistant for NetworkManager. For more
information, see:

http://www.coss.fi/kesakoodi
http://www.kaijanmaki.net/blog
http://live.gnome.org/NetworkManager/MobileBroadband



signature.asc
Description: Digitaalisesti allekirjoitettu viestin osa
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] Change to ustar for filenames 99 length

2008-08-19 Thread Robert Piasek

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Michael Biebl wrote:
| Robert Buchholz wrote:
| On Monday 18 August 2008, Michael Biebl wrote:
| I'd update the AM_INIT_AUTOMAKE macro to specifiy the minimum
| required version:
|
| AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar])
|
| This way, people using autoreconf (instead of ./autogen.sh) won't be
| bitten.
Hi Michael.

I just tried autoreconf instead of ./autogen.sh and it failed 
(autogen.sh works fine).



rob4300 NetworkManager-0.7 # autoreconf
/usr/share/aclocal/dotconf.m4:5: warning: underquoted definition of 
AM_PATH_DOTCONF

/usr/share/aclocal/dotconf.m4:5:   run info '(automake)Extending aclocal'
/usr/share/aclocal/dotconf.m4:5:   or see 
http://sources.redhat.com/automake/automake.html#Extending-aclocal

callouts/Makefile.am:72: `%'-style pattern rules are a GNU make extension
automake-1.10: cannot open  gtk-doc.make: No such file or directory
autoreconf-2.62: automake failed with exit status: 1

rob4300 NetworkManager-0.7 # locate gtk-doc.make
/usr/share/gtk-doc/data/gtk-doc.make

rob4300 NetworkManager-0.7 # grep -R gtk-doc.make *
docs/libnm-glib/Makefile.am:include $(top_srcdir)/gtk-doc.make


Cheers,
Rob

| You are right, I did not think about that. I hope someone with the
| necessary privileges can make that change.
|
| Committed as r3984.
|
| Cheers,
| Michael
|
|
|
| -
|
| ___
| NetworkManager-list mailing list
| NetworkManager-list@gnome.org
| http://mail.gnome.org/mailman/listinfo/networkmanager-list

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJIqpU0AAoJELvLB8ABrzqYt/kP/RBQX6rClYuFX0c6zQ4mrjBf
67Az0ebbLqJcmQ5cpwEJi7T+Ha7ZuuTQ7GI6Ck14G70IYxWuN7Tav93gHJpyao6o
l+lR5VoaCTfeS5NAG+22p5TyQtyJFM7wRXJ7t+P2mUMtii1VLfe/gfMTQhjTd6UR
7UPLsqq8erV3e2E9ZqGZWbHaDowl26fcSxa1MhvIw9VIyp5ywLVMz6onlMAduP11
eN/O8/4TFtVc83yHuR5zIZa/qFEkIGsAiXZlCDLjQvktSsmE5Tr9mpeBkaCg+XIZ
x8Fou8yUer3mWZva4ir49lENuHIFL4QZ2cORpCAG/bBw2TfU53r5tFPiM+s5hww9
xJxVGE+elUphyekq0B1+It78oOAPP9BhuzXGznnmQuwY6wRGIXOSiCzRQVbc7MMG
Q1d/2vtt5g5XUqPqDc1Eu+qYzRXr1MKosvRcQ3yWLfCZ6eCFMJPoZ8JLLpslkK70
7Uva8G27sV3hZAtFekU81KvtGqunGYgRBdlNgKfJ2nmBttgJYg9dIzWkDJTgtAAZ
e+z/QGysqDHFc4b7/stql6PoQ2/TI6KZUSAxTYodVt+b2t5WoMZ9PMoCh/tUkpDv
xlBBq1kzh9XGnDzY5VZKb9/lg9kGgobMr45ljtBJEzT4WGgE4RJCuPebLLtnHHnQ
+TqaEBjq28Krkm6Wi7JT
=+tt+
-END PGP SIGNATURE-



smime.p7s
Description: S/MIME Cryptographic Signature
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] Change to ustar for filenames 99 length

2008-08-19 Thread Robert Piasek

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert Piasek wrote:
| Michael Biebl wrote:
| | Robert Buchholz wrote:
| | On Monday 18 August 2008, Michael Biebl wrote:
| | I'd update the AM_INIT_AUTOMAKE macro to specifiy the minimum
| | required version:
| |
| | AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar])
| |
| | This way, people using autoreconf (instead of ./autogen.sh) won't be
| | bitten.
| Hi Michael.
|
| I just tried autoreconf instead of ./autogen.sh and it failed 
(autogen.sh works fine).

|
|
| rob4300 NetworkManager-0.7 # autoreconf
| /usr/share/aclocal/dotconf.m4:5: warning: underquoted definition of 
AM_PATH_DOTCONF

| /usr/share/aclocal/dotconf.m4:5:   run info '(automake)Extending aclocal'
| /usr/share/aclocal/dotconf.m4:5:   or see 
http://sources.redhat.com/automake/automake.html#Extending-aclocal

| callouts/Makefile.am:72: `%'-style pattern rules are a GNU make extension
| automake-1.10: cannot open  gtk-doc.make: No such file or directory
| autoreconf-2.62: automake failed with exit status: 1
|
| rob4300 NetworkManager-0.7 # locate gtk-doc.make
| /usr/share/gtk-doc/data/gtk-doc.make
|
| rob4300 NetworkManager-0.7 # grep -R gtk-doc.make *
| docs/libnm-glib/Makefile.am:include $(top_srcdir)/gtk-doc.make
|
|
| Cheers,
| Rob
|

Ignore my previous email. Forgot to run gtkdocize. Silly mistake ^^

Rob


| | You are right, I did not think about that. I hope someone with the
| | necessary privileges can make that change.
| |
| | Committed as r3984.
| |
| | Cheers,
| | Michael
| |
| |
| |
| | -
| |
| | ___
| | NetworkManager-list mailing list
| | NetworkManager-list@gnome.org
| | http://mail.gnome.org/mailman/listinfo/networkmanager-list
|

- -

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJIqpY5AAoJELvLB8ABrzqY/ckP/jCVu/C7ATbq8Rq93G/4BEWY
t/IdEABFz8LBeI9z5lZEEwz5WNw9yjIL57XEwiB/e9RKZrkVf/q8X7ol5/f5ggq3
mKuTNSwnrRAhTg6ElRa/StX5BKfevOHmmD4zz2t6IJ845u9O6mAwcs9La5CqFc27
TzxBcOjtTWe/giSTSNYCJJN5q23t2WHWdRX8gYp77pemM0AQfEFnQ9nTcWSLt+Y1
/DIHo/qlHfMNTZgsRZUP9SBwUQufnjjox03JRs5UvUauUoAIVURba9Fj1F0xeaIu
VgmAxHjfYzAfkhH6D21Q7unP4LqmuhLcjSPE2qCEgUtm+Pw/XHwX/WLCvSmy4nK8
fI3xxcN2/Lx6sujPO9Kwn/MEJGKk9sT2MLERUvaiaj6PsDeLABL+kWlf92woaOUO
FZ9jL+2OINB63QheUdqt5kEfvvFA0XTR72txvQOJTaxePz3/SW215qEYTk8fztw5
swrhMvGtCOmKbZZDNOdKCLbyxqMorXACPHJnOgv4WxH62nLzP/mR7MXQ/lIZcxfH
GxI3n5j7Vn6NeGdUggal5hAuK+vDd6v6YMKPu9b4W3aDzGCRCblfTBvvf3FHj+/O
rq51npxQGzb7JE7YEUbKvmSNohlLoJV3jRU9g1IfHD0y+/VKXQAwsdjrPmMHq10G
xx47qnWa37q8lpLkJLEi
=saDL
-END PGP SIGNATURE-



smime.p7s
Description: S/MIME Cryptographic Signature
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] add libmbca support

2008-08-19 Thread Antti Kaijanmäki
Hi,

here's a patch to add libmbca support to network-manager-applet. Support
has to be enabled by --with-mbca configure flag, so the support (and
dependency) is not mandatory. I've tested the patch against the latest
trunk (r859).

If the support gets compiled in, libmbca does not have to be present on
the users system as the library is dynamically loaded at runtime.

There's one change that has unconditional effect. I've added IPv4 tab to
mobile broadband connection editor, because it's needed with certain
service providers.

comments appreciated!
Br,
Antti

Index: src/applet-device-gsm.c
===
--- src/applet-device-gsm.c	(revision 859)
+++ src/applet-device-gsm.c	(working copy)
@@ -36,6 +36,13 @@
 #include nm-setting-ppp.h
 #include nm-gsm-device.h
 
+#ifdef WITH_MBCA
+#include netinet/in.h
+#include arpa/inet.h
+#include nm-setting-ip4-config.h
+#include nm-utils.h
+#endif
+
 #include applet.h
 #include applet-device-gsm.h
 #include utils.h
@@ -52,6 +59,149 @@
 	g_slice_free (GSMMenuItemInfo, data);
 }
 
+#ifdef WITH_MBCA
+
+static void
+assistant_state_changed_cb (MBCAAssistant* assistant,
+	   MBCAAssistantState state,
+	   gpointer data)
+{
+	NMApplet *applet = data;
+	GSList* iter;
+
+	NMAGConfConnection *exported;
+	
+	NMConnection *connection;
+	NMSettingGsm *s_gsm;
+	NMSettingSerial *s_serial;
+	NMSettingPPP *s_ppp;
+	NMSettingConnection *s_con;
+
+	NMSettingIP4Config* ipv4conf;
+	gboolean ignore_auto_dns = FALSE;
+	GArray *dns_servers = FALSE;
+	const char *method;	
+	
+	MBCAConfiguration* conf;
+	
+	if (!applet_open_mbca (applet))
+		g_return_if_reached (); /* this cb should not be called without 
+			* libmbca */
+	
+	switch (state)
+	{
+		case MBCA_STATE_READY:
+		case MBCA_STATE_RUNNING:
+		{
+			break;
+		}
+		case MBCA_STATE_DONE:
+		{
+			conf = applet-mbca_assistant_get_configuration_func (assistant);
+			connection = nm_connection_new ();
+
+			s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
+			nm_connection_add_setting (connection, NM_SETTING (s_con));	
+
+			ipv4conf = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ());
+			nm_connection_add_setting (connection, NM_SETTING (ipv4conf));
+			
+			s_con-id = g_strdup (conf-name);
+			s_con-type = g_strdup (NM_SETTING_GSM_SETTING_NAME);
+			s_con-autoconnect = FALSE;
+			
+			/* Serial setting */
+			s_serial = (NMSettingSerial *) nm_setting_serial_new ();
+			s_serial-baud = 115200;
+			s_serial-bits = 8;
+			s_serial-parity = 'n';
+			s_serial-stopbits = 1;
+			nm_connection_add_setting (connection, NM_SETTING (s_serial));
+			
+			method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
+			
+			s_gsm = NM_SETTING_GSM (nm_setting_gsm_new ());
+			s_gsm-number = g_strdup (*99***1#);
+	
+			s_gsm-apn = g_strdup (conf-provider-gsm.apn);
+	
+			s_gsm-username = g_strdup (conf-provider-username);
+			s_gsm-password = g_strdup (conf-provider-password);
+			
+			if (conf-provider-dns1) {
+struct in_addr tmp_addr;
+ignore_auto_dns = TRUE;
+dns_servers = g_array_new (FALSE, FALSE, sizeof (guint));
+
+inet_aton (conf-provider-dns1, tmp_addr);
+g_array_append_val (dns_servers, tmp_addr.s_addr);
+
+if (conf-provider-dns2) {
+	inet_aton (conf-provider-dns2, tmp_addr);
+	g_array_append_val (dns_servers, tmp_addr.s_addr);
+}
+			}
+			
+			/* TODO: gateway */
+
+			g_object_set (ipv4conf,
+	NM_SETTING_IP4_CONFIG_METHOD, method,
+	NM_SETTING_IP4_CONFIG_DNS, dns_servers,
+	NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS, ignore_auto_dns,
+	NULL);
+			
+			nm_connection_add_setting (connection, NM_SETTING (s_gsm));
+			
+			s_ppp = (NMSettingPPP *) nm_setting_ppp_new ();
+			nm_connection_add_setting (connection, NM_SETTING (s_ppp));
+			
+			
+			applet-mbca_free_configuration_func (conf);
+			if (dns_servers)
+g_array_free (dns_servers, TRUE);	
+			
+			exported = nma_gconf_settings_add_connection (applet-gconf_settings, connection);
+			if (!exported) {
+g_object_unref (connection);
+g_return_if_reached ();
+			}
+			g_object_unref (connection);
+
+			applet_do_notify (applet, NOTIFY_URGENCY_LOW,
+		   _(New Configuration Created),
+		   _(You can activate the connection by clicking this icon.\n
+			\n
+			Use connection editor to add new and to change settings if necessary),
+		   nm-device-wwan, NULL, NULL, NULL, NULL);			
+			
+			/* FALLTHROUGH */
+		}
+		case MBCA_STATE_ABORTED:
+		{
+			for (iter = applet-mbca_assistants; iter; iter = iter-next){
+if ((MBCAAssistant*)(iter-data) == assistant) {
+	UdiAssistant* ua = iter-data;
+	g_object_unref (G_OBJECT (ua-assistant));
+	g_free (ua-udi);
+	applet-mbca_assistants = g_slist_remove_all (applet-mbca_assistants,
+		 ua);
+	
+	g_free (ua); 
+
+}
+			}
+			break;
+		}
+		default:
+		{
+			g_return_if_reached ();
+		}
+	}
+
+}
+#endif
+
+
 #define DEFAULT_GSM_NAME _(Auto