* [PATCH_v1 0/2] cdma-connman add roaming support
@ 2011-12-05 11:04 Guillaume Zajac
2011-12-05 11:04 ` [PATCH_v1 1/2] doc: Add RoamingAllowed property Guillaume Zajac
2011-12-05 11:04 ` [PATCH_v1 2/2] cdma-connman: Add RoamingAllowed support Guillaume Zajac
0 siblings, 2 replies; 4+ messages in thread
From: Guillaume Zajac @ 2011-12-05 11:04 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
Hi,
Change log from v0:
- Remove cdma-netreg status watches
- Only change the property RomaingAllowed.
- Don't change the data call state when the property is changed.
Kind regards,
Guilllaume
Guillaume Zajac (2):
doc: Add RoamingAllowed property
cdma-connman: Add RoamingAllowed support
doc/cdma-connman-api.txt | 8 ++++++++
src/cdma-connman.c | 19 ++++++++++++++++++-
2 files changed, 26 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH_v1 1/2] doc: Add RoamingAllowed property
2011-12-05 11:04 [PATCH_v1 0/2] cdma-connman add roaming support Guillaume Zajac
@ 2011-12-05 11:04 ` Guillaume Zajac
2011-12-05 14:03 ` Guillaume Zajac
2011-12-05 11:04 ` [PATCH_v1 2/2] cdma-connman: Add RoamingAllowed support Guillaume Zajac
1 sibling, 1 reply; 4+ messages in thread
From: Guillaume Zajac @ 2011-12-05 11:04 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
---
doc/cdma-connman-api.txt | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
index 48699a3..319c973 100644
--- a/doc/cdma-connman-api.txt
+++ b/doc/cdma-connman-api.txt
@@ -45,6 +45,14 @@ Properties boolean Powered [readwrite]
Holds the password to be used for authentication
purposes.
+ boolean RoamingAllowed [readwrite]
+
+ Contains whether data roaming is allowed. In the off
+ setting, if the packet radio registration state
+ indicates that the modem is roaming, oFono will
+ automatically shutdown connection and no further
+ connection establishment will be possible.
+
dict Settings [readonly, optional]
Holds all the IP network settings
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH_v1 2/2] cdma-connman: Add RoamingAllowed support
2011-12-05 11:04 [PATCH_v1 0/2] cdma-connman add roaming support Guillaume Zajac
2011-12-05 11:04 ` [PATCH_v1 1/2] doc: Add RoamingAllowed property Guillaume Zajac
@ 2011-12-05 11:04 ` Guillaume Zajac
1 sibling, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2011-12-05 11:04 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]
We need to use status watch in case we are registered to a network
and we pass into roaming status. We have to deactivate the data
call.
---
src/cdma-connman.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/src/cdma-connman.c b/src/cdma-connman.c
index 87cefd6..d880b94 100644
--- a/src/cdma-connman.c
+++ b/src/cdma-connman.c
@@ -52,6 +52,7 @@ struct cdma_connman_settings {
struct ofono_cdma_connman {
ofono_bool_t powered;
ofono_bool_t dormant;
+ ofono_bool_t roaming_allowed;
struct cdma_connman_settings *settings;
DBusMessage *pending;
const struct ofono_cdma_connman_driver *driver;
@@ -354,8 +355,10 @@ static ofono_bool_t network_registered(struct ofono_cdma_connman *cm)
switch (status) {
case NETWORK_REGISTRATION_STATUS_REGISTERED:
- case NETWORK_REGISTRATION_STATUS_ROAMING:
return TRUE;
+ case NETWORK_REGISTRATION_STATUS_ROAMING:
+ if (cm->roaming_allowed == TRUE)
+ return TRUE;
default:
break;
}
@@ -390,6 +393,10 @@ static DBusMessage *cdma_connman_get_properties(DBusConnection *conn,
value = cm->dormant;
ofono_dbus_dict_append(&dict, "Dormant", DBUS_TYPE_BOOLEAN, &value);
+ value = cm->roaming_allowed;
+ ofono_dbus_dict_append(&dict, "RoamingAllowed",
+ DBUS_TYPE_BOOLEAN, &value);
+
if (cm->settings)
cdma_connman_settings_append_properties(cm, &dict);
@@ -512,6 +519,16 @@ static DBusMessage *cdma_connman_set_property(DBusConnection *conn,
dbus_message_iter_get_basic(&var, &str);
return cdma_connman_set_password(cm, conn, msg, str);
+ } else if (!strcmp(property, "RoamingAllowed")) {
+ if (dbus_message_iter_get_arg_type(&var) != DBUS_TYPE_BOOLEAN)
+ return __ofono_error_invalid_args(msg);
+
+ dbus_message_iter_get_basic(&var, &value);
+
+ if (cm->roaming_allowed == (ofono_bool_t) value)
+ return dbus_message_new_method_return(msg);
+
+ cm->roaming_allowed = value;
}
/* TODO: Dormant property. Not yet supported. */
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH_v1 1/2] doc: Add RoamingAllowed property
2011-12-05 11:04 ` [PATCH_v1 1/2] doc: Add RoamingAllowed property Guillaume Zajac
@ 2011-12-05 14:03 ` Guillaume Zajac
0 siblings, 0 replies; 4+ messages in thread
From: Guillaume Zajac @ 2011-12-05 14:03 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
Hi,
On 05/12/2011 12:04, Guillaume Zajac wrote:
> ---
> doc/cdma-connman-api.txt | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/doc/cdma-connman-api.txt b/doc/cdma-connman-api.txt
> index 48699a3..319c973 100644
> --- a/doc/cdma-connman-api.txt
> +++ b/doc/cdma-connman-api.txt
> @@ -45,6 +45,14 @@ Properties boolean Powered [readwrite]
> Holds the password to be used for authentication
> purposes.
>
> + boolean RoamingAllowed [readwrite]
> +
> + Contains whether data roaming is allowed. In the off
> + setting, if the packet radio registration state
> + indicates that the modem is roaming, oFono will
> + automatically shutdown connection and no further
> + connection establishment will be possible.
> +
The documentation is not up-to-date with the implementation.
Please ignore this set of patches, I will send a v2.
> dict Settings [readonly, optional]
>
> Holds all the IP network settings
Kind regards,
Guillaume
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-05 14:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-05 11:04 [PATCH_v1 0/2] cdma-connman add roaming support Guillaume Zajac
2011-12-05 11:04 ` [PATCH_v1 1/2] doc: Add RoamingAllowed property Guillaume Zajac
2011-12-05 14:03 ` Guillaume Zajac
2011-12-05 11:04 ` [PATCH_v1 2/2] cdma-connman: Add RoamingAllowed support Guillaume Zajac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.