Commit Graph
37 Commits
Author SHA1 Message Date
Aleksander Morgado 0ff904b3c5 bearer: set state as DISCONNECTING as soon as we cancel the connection sequence
Just when we request to cancel the connection we need to set the bearer as
being disconnected, so that we do not end up overwriting connection cancellation
requests.

Reported by: Thieu Le <thieule@chromium.org>
2012-07-31 09:18:45 +02:00
Aleksander Morgado caeeae2721 bearer: simplify handling of the bearer configuration
The base MMBearer object will receive the MMBearerProperties configuration,
which contains every generic and plugin-specific set up. Not every configuration
parameter will be used by every implementation (e.g. not every bearer needs
user/password).

The Bearer object will expose every configuration parameter received in its
`Properties' property in the interface, even if it's not really used.
2012-05-06 17:12:36 +02:00
Aleksander Morgado d379b9ea2a bearer: allow subclasses to report disconnection
The new `mm_bearer_report_disconnection()' allows subclasses to notify about
being disconnected, so that every layer of inheritance can chain its own code
to reset the connection status.

This commit partially disables the logic included in commit 981222. Now
subclasses (actually, no one) are not allowed to g_object_set() the
MM_BEARER_STATUS property.
2012-04-10 23:27:25 +02:00
Aleksander Morgado 9812225d93 bearer: always reset interface state when going into disconnected status
Custom bearer implementations in Plugins are allowed to g_object_set() the
MM_BEARER_STATUS property to DISCONNECTED in order to notify that the bearer got
disconnected. We need to always reset the interface state (remove IP config, set
connected=FALSE,...) also in that case.

Also consolidated in some helper private functions the way the bearer status is
updated.
2012-04-10 10:46:10 +02:00
Aleksander Morgado 473c5fee4d bearer: properties are exposed before exporting the bearer object
And we let subclasses to specify which of the input properties need to be
exposed.
2012-03-16 14:53:26 +01:00
Aleksander Morgado d306bb082f libmm-common: `MMBearerProperties' won't be considered internal any more
Renamed `MMCommonBearerProperties' to `MMBearerProperties', and removed the
`MMBearerProperties' provided in libmm-glib. We'll just use the original one
from libmm-common always.
2012-03-16 14:53:19 +01:00
Aleksander Morgado 323df60ed9 libmm-common: `MMBearerIpConfig' won't be considered internal any more
Renamed `MMCommonBearerIpConfig' to `MMBearerIpConfig', and removed the
`MMBearerIpConfig' provided in libmm-glib. We'll just use the original one
from libmm-common always.
2012-03-16 14:53:19 +01:00
Aleksander Morgado b4bed06f98 bearer: include policy authorization checks 2012-03-16 14:53:16 +01:00
Aleksander Morgado 7fdd08c02e api,dbus: new `IpTimeout' property in the Bearer interface
This IpTimeout property will be read by NetworkManager, and used as the time to
wait for pppd to establish the IP configuration (20s by default).
2012-03-15 14:15:06 +01:00
Aleksander Morgado ffdb034413 build: renamed files holding daemon-specific enum types 2012-03-15 14:15:04 +01:00
Aleksander Morgado 1603fd1109 bearer: allow comparing current bearer with a set of properties 2012-03-15 14:14:55 +01:00
Aleksander Morgado 9feb177e21 bearer: expose IP config dictionaries with unknown method 2012-03-15 14:14:54 +01:00
Aleksander Morgado 43ac87170c bearer: don't handle reasons to forbid connection in the generic Bearer object 2012-03-15 14:14:54 +01:00
Aleksander Morgado c6b9aead81 bearer: subclasses need to report IPv4/v6 config when connection ready 2012-03-15 14:14:54 +01:00
Aleksander Morgado aa36af424d bearer: number in Connect() no longer needed 2012-03-15 14:14:54 +01:00
Aleksander Morgado a400db4b5c bearer: remove allow-roaming, only meaningful in the broadband bearer 2012-03-15 14:14:53 +01:00
Aleksander Morgado 6c2dc9eef1 bearer: set unique path when the bearer gets exported 2012-03-15 14:14:53 +01:00
Aleksander Morgado 7e36f04b37 core: use new enums/flags string getters/builders 2012-03-15 14:14:52 +01:00
Aleksander Morgado 3d6df6a1f4 bearer: export the object whenever both path and connection are set 2012-03-15 14:14:47 +01:00
Aleksander Morgado 531c1fa660 bearer: set allow-roaming as property at generic bearer object level 2012-03-15 14:14:47 +01:00
Aleksander Morgado c3f1a7ec98 bearer: use g_clear_object() before setting new objects 2012-03-15 14:14:44 +01:00
Aleksander Morgado b232cc4f11 bearer: allow launching connection not only via DBus 2012-03-15 14:14:38 +01:00
Aleksander Morgado 93732cf075 bearers: base bearer creation in the new bearer properties object 2012-03-15 14:14:38 +01:00
Aleksander Morgado 10a4360d83 bearer: provide reason of why connection is forbidden 2012-03-15 14:14:38 +01:00
Aleksander Morgado e385b5b079 api,core: new 'allow-roaming' property to be set when creating a bearer
This new boolean property, applicable to 3GPP bearers, will specify whether 3GPP
bearers are allowed to get connected when registered in a roaming network.
2012-03-15 14:14:35 +01:00
Aleksander Morgado 855824d7da bearer: allow disconnection also with internal requests 2012-03-15 14:14:35 +01:00
Aleksander Morgado ee9cbbfcfb bearer,bearer-3gpp: implement connection request cancellation
We allow connection requests to get cancelled, either via DBus calls or any
other method.
2012-03-15 14:14:35 +01:00
Aleksander Morgado 9962f5cbde bearer: new `bearer-state' property 2012-03-15 14:14:35 +01:00
Aleksander Morgado cadc27ca0e core,libmm-glib: include ony `libmm-common.h'
Don't include one by one all the headers from libmm-common, just include the
global `libmm-common.h' which includes all the others.
2012-03-15 14:14:34 +01:00
Aleksander Morgado 770ea53109 bearer: fail connecting try if not allowed to connect 2012-03-15 14:14:34 +01:00
Aleksander Morgado 00b2e2d2dd bearer: new property to define whether the bearer is allowed to connect
Modems will allow bearers to get connected once they are registered in the
network.
2012-03-15 14:14:34 +01:00
Aleksander Morgado 48f0061355 bearer-3gpp: implement 3GPP-specific bearer
Implement basic functionality of a 3GPP based bearer, including connnection and
disconnection.
2012-03-15 14:14:34 +01:00
Aleksander Morgado d7f4a5e134 bearer: populate Properties used when creating the Bearer 2012-03-15 14:14:33 +01:00
Aleksander Morgado 667e3edfbd bearer: ensure only valid bearers are exported
We setup bearer export in DBus only if the input properties are the expected
ones.
2012-03-15 14:14:33 +01:00
Aleksander Morgado 4f4bb6b54b bearer: fix object export/unexport 2012-03-15 14:14:32 +01:00
Aleksander Morgado a2f0814fc5 bearer: keep properties given as input, and avoid async creation
No need to create this object asynchronously.
2012-03-15 14:14:32 +01:00
Aleksander Morgado 36fae5564b bearer: new object to handle bearers, implements the Bearer DBus interface 2012-03-15 14:14:31 +01:00