From: Samuel Ortiz Date: Thu, 9 Dec 2010 00:28:15 +0000 (+0100) Subject: technology: Add support for regulatory domain notification X-Git-Tag: 2.0_alpha~2031 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4291c2095c6c6ee534dd6fbc0a66b1323fa5acc7;p=framework%2Fconnectivity%2Fconnman.git technology: Add support for regulatory domain notification --- diff --git a/include/technology.h b/include/technology.h index 6117f8f..9cf4656 100644 --- a/include/technology.h +++ b/include/technology.h @@ -38,6 +38,8 @@ struct connman_technology; void connman_technology_tethering_notify(struct connman_technology *technology, connman_bool_t enabled); +void connman_technology_regdom_notify(struct connman_technology *technology, + const char *alpha2); struct connman_technology_driver { const char *name; diff --git a/src/technology.c b/src/technology.c index c5600e2..66fec98 100644 --- a/src/technology.c +++ b/src/technology.c @@ -58,6 +58,7 @@ struct connman_technology { GSList *device_list; gint enabled; gint blocked; + char *regdom; struct connman_technology_driver *driver; void *driver_data; @@ -246,6 +247,20 @@ int __connman_technology_disable_tethering(const char *bridge) return set_tethering(bridge, FALSE); } +void connman_technology_regdom_notify(struct connman_technology *technology, + const char *alpha2) +{ + DBG(""); + + if (alpha2 == NULL) + connman_error("Failed to set regulatory domain"); + else + DBG("Regulatory domain set to %s", alpha2); + + g_free(technology->regdom); + technology->regdom = g_strdup(alpha2); +} + int __connman_technology_set_regdom(const char *alpha2) { GSList *list; @@ -504,6 +519,7 @@ static void technology_put(struct connman_technology *technology) g_hash_table_destroy(technology->rfkill_list); g_free(technology->path); + g_free(technology->regdom); g_free(technology); }