int __connman_notifier_init(void);
void __connman_notifier_cleanup(void);
-void __connman_notifier_list_enabled(DBusMessageIter *iter, void *user_data);
void __connman_notifier_list_connected(DBusMessageIter *iter, void *user_data);
void __connman_notifier_register(enum connman_service_type type);
connman_dbus_dict_append_basic(&dict, "OfflineMode",
DBUS_TYPE_BOOLEAN, &offlinemode);
- connman_dbus_dict_append_array(&dict, "EnabledTechnologies",
- DBUS_TYPE_STRING, __connman_notifier_list_enabled, NULL);
connman_dbus_dict_append_array(&dict, "ConnectedTechnologies",
DBUS_TYPE_STRING, __connman_notifier_list_connected, NULL);
static volatile int enabled[MAX_TECHNOLOGIES];
static volatile int connected[MAX_TECHNOLOGIES];
-void __connman_notifier_list_enabled(DBusMessageIter *iter, void *user_data)
-{
- int i;
-
- __sync_synchronize();
- for (i = 0; i < MAX_TECHNOLOGIES; i++) {
- const char *type = __connman_service_type2string(i);
-
- if (type == NULL)
- continue;
-
- if (enabled[i] > 0)
- dbus_message_iter_append_basic(iter,
- DBUS_TYPE_STRING, &type);
- }
-}
-
void __connman_notifier_list_connected(DBusMessageIter *iter, void *user_data)
{
int i;
DBG("type %d enabled %d", type, enabled);
- connman_dbus_property_changed_array(CONNMAN_MANAGER_PATH,
- CONNMAN_MANAGER_INTERFACE, "EnabledTechnologies",
- DBUS_TYPE_STRING, __connman_notifier_list_enabled, NULL);
-
for (list = notifier_list; list; list = list->next) {
struct connman_notifier *notifier = list->data;