This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch connman-backend
in repository enlightenment.
View the commit online.
commit 10970b44d2c9b93a324616e7b321c58a8e441c83
Author: Cedric BAIL <[email protected]>
AuthorDate: Sun Aug 2 14:16:10 2026 -0600
networkmanager - move active-connection views into the data layer
Phase 0 of adding a ConnMan backend: the UI layer walked nm->devices and
nm->bluetooth_connections directly in the gadget path, which blocks
swapping a different network daemon in underneath.
Move that walking behind nine data-layer accessors, each of which maps
onto a field of the neutral model the next phase introduces:
enm_best_ap_for_ssid, enm_active_ap_get, enm_ssid_is_active,
enm_has_wifi_device, enm_has_bt_entries, enm_active_interface_get,
enm_active_strength_get, enm_active_technology_get,
enm_active_name_get, enm_state_theme_value
No intended behaviour change. Two notes:
- The gadget label chain was asymmetric: the bluetooth branch fell back
to "Bluetooth" when no device had reached ACTIVATED, while the
ethernet branch left the previous label on screen. That is preserved
verbatim - enm_active_name_get returns NULL to mean "leave it alone"
and the caller honours it. Worth revisiting when the UI moves to the
neutral model.
- enm_ssid_is_active now returns false on a NULL ssid rather than
reaching strcmp(x, NULL). Three call sites passed ap->ssid unguarded,
so this removes a latent crash.
Co-Authored-By: Claude Opus 5 <[email protected]>
---
src/modules/networkmanager/e_mod_main.c | 211 +++-----------------------
src/modules/networkmanager/e_networkmanager.c | 180 ++++++++++++++++++++++
src/modules/networkmanager/e_networkmanager.h | 54 +++++++
3 files changed, 253 insertions(+), 192 deletions(-)
diff --git a/src/modules/networkmanager/e_mod_main.c b/src/modules/networkmanager/e_mod_main.c
index 1381a7cde..df8305d33 100644
--- a/src/modules/networkmanager/e_mod_main.c
+++ b/src/modules/networkmanager/e_mod_main.c
@@ -290,8 +290,6 @@ _enm_popup_settings_cb(void *data, Evas_Object *obj EINA_UNUSED,
}
-static Eina_Bool _enm_ssid_is_active(struct NM_Manager *nm, const char *ssid);
-
/* Forward declarations for icon/forget-button factories used in item class
* callbacks defined before the factory implementations. */
static Evas_Object *_enm_ap_icon_new(struct NM_Manager *nm,
@@ -966,7 +964,7 @@ _enm_deselect_timer_cb(void *data)
if (id && id->nm)
{
if (id->ap)
- keep_selected = _enm_ssid_is_active(id->nm, id->ap->ssid);
+ keep_selected = enm_ssid_is_active(id->nm, id->ap->ssid);
else if (id->bt && id->dev)
keep_selected =
(id->dev->state >= NM_DEVICE_STATE_ACTIVATED) &&
@@ -1094,7 +1092,7 @@ _enm_item_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
}
/* If this AP's SSID is currently active, disconnect */
- if (nm->active_ap_path && _enm_ssid_is_active(nm, id->ap->ssid))
+ if (nm->active_ap_path && enm_ssid_is_active(nm, id->ap->ssid))
{
INF("Disconnect from %s", id->ap->ssid ?: id->ap_path);
if (!selected) enm_ap_disconnect(nm);
@@ -1136,7 +1134,7 @@ _enm_ap_icon_new(struct NM_Manager *nm, struct NM_Access_Point *ap,
ed = elm_layout_edje_get(icon);
/* Map active AP to ONLINE(5), otherwise IDLE(1) — ConnMan theme values */
- state_val = (ap->ssid && _enm_ssid_is_active(nm, ap->ssid)) ? 5 : 1;
+ state_val = (ap->ssid && enm_ssid_is_active(nm, ap->ssid)) ? 5 : 1;
msg = malloc(sizeof(*msg) + sizeof(int));
if (msg)
@@ -1352,45 +1350,6 @@ _enm_bt_icon_new(struct NM_Manager *nm, struct NM_Bluetooth_Connection *bc,
return icon;
}
-/* Find the best AP for a given SSID across all devices.
- * Prefers the active AP if it matches, otherwise picks highest strength.
- * Used to deduplicate multiple stations broadcasting the same network name. */
-static struct NM_Access_Point *
-_enm_best_ap_for_ssid(struct NM_Manager *nm, const char *ssid)
-{
- struct NM_Device *dev;
- struct NM_Access_Point *best = NULL;
-
- EINA_INLIST_FOREACH(nm->devices, dev)
- {
- struct NM_Access_Point *ap;
- if (dev->type != NM_DEVICE_TYPE_WIFI) continue;
- EINA_INLIST_FOREACH(dev->access_points, ap)
- {
- if (!ap->ssid || !ap->ssid[0]) continue;
- if (strcmp(ap->ssid, ssid)) continue;
- /* Always prefer the active AP */
- if (nm->active_ap_path && nm->active_ap_path == ap->path)
- return ap;
- if (!best || ap->strength > best->strength)
- best = ap;
- }
- }
- return best;
-}
-
-/* Check if the given SSID matches the currently connected network */
-static Eina_Bool
-_enm_ssid_is_active(struct NM_Manager *nm, const char *ssid)
-{
- struct NM_Access_Point *active;
-
- if (!nm->active_ap_path) return EINA_FALSE;
- active = enm_manager_find_ap(nm, nm->active_ap_path);
- if (!active || !active->ssid) return EINA_FALSE;
- return !strcmp(active->ssid, ssid);
-}
-
/* Build the desired list of entries. Returns count; caller frees labels/paths. */
struct _Popup_Entry
{
@@ -1468,7 +1427,7 @@ _enm_popup_build_entries(struct NM_Manager *nm,
if (!ap->ssid || !ap->ssid[0]) continue;
if (eina_hash_find(seen_ssids, ap->ssid)) continue;
- best = _enm_best_ap_for_ssid(nm, ap->ssid);
+ best = enm_best_ap_for_ssid(nm, ap->ssid);
if (!best) continue;
eina_hash_add(seen_ssids, ap->ssid, (void *)1);
@@ -1512,28 +1471,6 @@ _enm_popup_build_entries(struct NM_Manager *nm,
return n;
}
-static Eina_Bool
-_enm_has_wifi_device(struct NM_Manager *nm)
-{
- struct NM_Device *dev;
- if (!nm) return EINA_FALSE;
- EINA_INLIST_FOREACH(nm->devices, dev)
- if (dev->type == NM_DEVICE_TYPE_WIFI) return EINA_TRUE;
- return EINA_FALSE;
-}
-
-static Eina_Bool
-_enm_has_bt_entries(struct NM_Manager *nm)
-{
- struct NM_Bluetooth_Connection *bc;
-
- if (!nm) return EINA_FALSE;
- EINA_INLIST_FOREACH(nm->bluetooth_connections, bc)
- if (enm_bluetooth_connection_device_find(nm, bc))
- return EINA_TRUE;
- return EINA_FALSE;
-}
-
static Eina_Bool
_enm_popup_item_should_be_selected(E_NM_Instance *inst,
Elm_Object_Item *it)
@@ -1560,7 +1497,7 @@ _enm_popup_item_should_be_selected(E_NM_Instance *inst,
if (!id || !id->nm) return EINA_FALSE;
if (id->ap)
- return _enm_ssid_is_active(id->nm, id->ap->ssid);
+ return enm_ssid_is_active(id->nm, id->ap->ssid);
if (id->bt && id->dev)
return (id->dev->state >= NM_DEVICE_STATE_ACTIVATED) &&
@@ -1766,7 +1703,7 @@ _enm_popup_update(struct NM_Manager *nm, E_NM_Instance *inst)
* Pass 3: sync wifi section. Header is present whenever a wifi
* adapter exists, regardless of AP count.
* ------------------------------------------------------------------ */
- if (_enm_has_wifi_device(nm))
+ if (enm_has_wifi_device(nm))
{
if (!inst->ui.popup.group_wifi)
{
@@ -1835,7 +1772,7 @@ _enm_popup_update(struct NM_Manager *nm, E_NM_Instance *inst)
/* ------------------------------------------------------------------
* Pass 4: sync bluetooth section.
* ------------------------------------------------------------------ */
- if (bt_count > 0 || _enm_has_bt_entries(nm))
+ if (bt_count > 0 || enm_has_bt_entries(nm))
{
if (!inst->ui.popup.group_bt)
{
@@ -2211,25 +2148,6 @@ _enm_gadget_setup(E_NM_Instance *inst)
edje_object_signal_emit(o, "e,available", "e");
}
-/* Map NM state to ConnMan theme state values:
- * OFFLINE=0, IDLE=1, ASSOCIATION=2, CONFIGURATION=3, READY=4, _ONLINE_=5 */
-static int
-_enm_state_to_connman(enum NM_State state)
-{
- switch (state)
- {
- case NM_STATE_UNKNOWN:
- case NM_STATE_ASLEEP: return 0; /* OFFLINE */
- case NM_STATE_DISCONNECTED:
- case NM_STATE_DISCONNECTING: return 1; /* IDLE */
- case NM_STATE_CONNECTING: return 2; /* ASSOCIATION */
- case NM_STATE_CONNECTED_LOCAL: return 4; /* READY */
- case NM_STATE_CONNECTED_SITE: return 4; /* READY */
- case NM_STATE_CONNECTED_GLOBAL: return 5; /* ONLINE */
- default: return 0;
- }
-}
-
static void
_enm_mod_manager_update_inst(E_NM_Module_Context *ctxt EINA_UNUSED,
E_NM_Instance *inst,
@@ -2238,34 +2156,20 @@ _enm_mod_manager_update_inst(E_NM_Module_Context *ctxt EINA_UNUSED,
{
Evas_Object *o = inst->ui.gadget;
Edje_Message_Int_Set *msg;
- struct NM_Access_Point *active_ap = NULL;
- const char *typestr;
+ struct NM_Access_Point *active_ap;
+ const char *typestr, *label;
char buf[256];
uint8_t strength;
int theme_state;
- /* Determine connection technology type for gadget icon */
- if (nm && nm->active_conn_type == NM_DEVICE_TYPE_ETHERNET)
- typestr = "ethernet";
- else if (nm && nm->active_conn_type == NM_DEVICE_TYPE_BLUETOOTH)
- typestr = "bluetooth";
- else
- typestr = "wifi";
-
- /* Resolve active AP for real signal strength */
- if (nm && nm->active_ap_path)
- active_ap = enm_manager_find_ap(nm, nm->active_ap_path);
-
- /* Ethernet: full strength; WiFi: from active AP */
- if (nm && nm->active_conn_type == NM_DEVICE_TYPE_ETHERNET)
- strength = 100;
- else
- strength = active_ap ? active_ap->strength : 0;
+ typestr = enm_active_technology_get(nm);
+ active_ap = enm_active_ap_get(nm);
+ strength = enm_active_strength_get(nm);
DBG("gadget_update: state=%d type=%s ap=%s strength=%d active_ap=%p",
state, typestr, nm ? (nm->active_ap_path ?: "(null)") : "no-nm",
strength, active_ap);
- theme_state = _enm_state_to_connman(state);
+ theme_state = enm_state_theme_value(state);
msg = malloc(sizeof(*msg) + sizeof(int));
if (!msg) return;
@@ -2279,45 +2183,11 @@ _enm_mod_manager_update_inst(E_NM_Module_Context *ctxt EINA_UNUSED,
snprintf(buf, sizeof(buf), "e,changed,technology,%s", typestr);
edje_object_signal_emit(o, buf, "e");
- /* Set hover label text — shows SSID or interface name on mouse hover */
- if (nm && active_ap && active_ap->ssid)
- edje_object_part_text_set(o, "e.text.label", active_ap->ssid);
- else if (nm && nm->active_conn_type == NM_DEVICE_TYPE_ETHERNET)
- {
- struct NM_Device *dev;
- EINA_INLIST_FOREACH(nm->devices, dev)
- {
- if (dev->type == NM_DEVICE_TYPE_ETHERNET &&
- dev->state >= NM_DEVICE_STATE_ACTIVATED)
- {
- edje_object_part_text_set(o, "e.text.label",
- dev->interface ?: _("Wired"));
- break;
- }
- }
- }
- else if (nm && nm->active_conn_type == NM_DEVICE_TYPE_BLUETOOTH)
- {
- struct NM_Bluetooth_Connection *bc;
- struct NM_Device *dev;
- Eina_Bool found = EINA_FALSE;
-
- EINA_INLIST_FOREACH(nm->bluetooth_connections, bc)
- {
- dev = enm_bluetooth_connection_device_find(nm, bc);
- if (dev && dev->state >= NM_DEVICE_STATE_ACTIVATED)
- {
- edje_object_part_text_set(o, "e.text.label",
- bc->name ?: _("Bluetooth"));
- found = EINA_TRUE;
- break;
- }
- }
- if (!found)
- edje_object_part_text_set(o, "e.text.label", _("Bluetooth"));
- }
- else
- edje_object_part_text_set(o, "e.text.label", "");
+ /* Set hover label text — shows SSID or interface name on mouse hover.
+ * A NULL label means "keep whatever is up"; see enm_active_name_get. */
+ label = enm_active_name_get(nm);
+ if (label)
+ edje_object_part_text_set(o, "e.text.label", label);
/* Set security overlay and frequency band on gadget icon */
if (nm && active_ap)
@@ -2591,49 +2461,6 @@ static const E_NM_Mod_Callbacks _enm_mod_cbs =
/* --- network activity indicator ------------------------------------------- */
-/* Find the interface name for the active network connection */
-static const char *
-_enm_active_interface(struct NM_Manager *nm)
-{
- struct NM_Device *dev;
-
- if (!nm) return NULL;
-
- /* WiFi: find first connected WiFi device (activated state) */
- if (nm->active_conn_type == NM_DEVICE_TYPE_WIFI)
- {
- EINA_INLIST_FOREACH(nm->devices, dev)
- {
- if (dev->type == NM_DEVICE_TYPE_WIFI &&
- dev->state >= NM_DEVICE_STATE_ACTIVATED)
- return dev->interface;
- }
- }
-
- /* Ethernet: find first connected ethernet device */
- if (nm->active_conn_type == NM_DEVICE_TYPE_ETHERNET)
- {
- EINA_INLIST_FOREACH(nm->devices, dev)
- {
- if (dev->type == NM_DEVICE_TYPE_ETHERNET &&
- dev->state >= NM_DEVICE_STATE_ACTIVATED)
- return dev->interface;
- }
- }
-
- if (nm->active_conn_type == NM_DEVICE_TYPE_BLUETOOTH)
- {
- EINA_INLIST_FOREACH(nm->devices, dev)
- {
- if (dev->type == NM_DEVICE_TYPE_BLUETOOTH &&
- dev->state >= NM_DEVICE_STATE_ACTIVATED)
- return dev->interface;
- }
- }
-
- return NULL;
-}
-
static Eina_Bool
_enm_read_sysfs_counter(const char *iface, const char *counter,
unsigned long long *val)
@@ -2864,7 +2691,7 @@ _enm_traffic_timer_start(E_NM_Module_Context *ctxt)
if (!ctxt->nm) return;
if (ctxt->nm->state < NM_STATE_CONNECTED_LOCAL) return;
- iface = _enm_active_interface(ctxt->nm);
+ iface = enm_active_interface_get(ctxt->nm);
if (!iface) return;
/* If a worker is already running for the same iface, nothing to do */
diff --git a/src/modules/networkmanager/e_networkmanager.c b/src/modules/networkmanager/e_networkmanager.c
index 2eb077c06..ec2e847a4 100644
--- a/src/modules/networkmanager/e_networkmanager.c
+++ b/src/modules/networkmanager/e_networkmanager.c
@@ -2940,6 +2940,186 @@ enm_manager_find_ap(struct NM_Manager *nm, const char *path)
return NULL;
}
+/* -------------------------------------------------------------------------- */
+/* Active-connection views */
+/* */
+/* Precomputed summaries of the device/AP graph, for the UI layer. Keeping */
+/* them here means e_mod_main.c never walks nm->devices itself, which is what */
+/* lets a non-NetworkManager backend be swapped in underneath later. */
+/* */
+/* Every const char * returned points at storage owned by the data layer (or */
+/* at a static gettext string). It is valid only until the next model change */
+/* — copy it if you need to keep it. */
+/* -------------------------------------------------------------------------- */
+
+struct NM_Access_Point *
+enm_best_ap_for_ssid(struct NM_Manager *nm, const char *ssid)
+{
+ struct NM_Device *dev;
+ struct NM_Access_Point *best = NULL;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(nm, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ssid, NULL);
+
+ EINA_INLIST_FOREACH(nm->devices, dev)
+ {
+ struct NM_Access_Point *ap;
+
+ if (dev->type != NM_DEVICE_TYPE_WIFI) continue;
+ EINA_INLIST_FOREACH(dev->access_points, ap)
+ {
+ if (!ap->ssid || !ap->ssid[0]) continue;
+ if (strcmp(ap->ssid, ssid)) continue;
+ /* Always prefer the active AP */
+ if (nm->active_ap_path && nm->active_ap_path == ap->path)
+ return ap;
+ if (!best || ap->strength > best->strength)
+ best = ap;
+ }
+ }
+ return best;
+}
+
+struct NM_Access_Point *
+enm_active_ap_get(struct NM_Manager *nm)
+{
+ if (!nm || !nm->active_ap_path) return NULL;
+ return enm_manager_find_ap(nm, nm->active_ap_path);
+}
+
+Eina_Bool
+enm_ssid_is_active(struct NM_Manager *nm, const char *ssid)
+{
+ struct NM_Access_Point *active;
+
+ if (!nm || !ssid) return EINA_FALSE;
+ active = enm_active_ap_get(nm);
+ if (!active || !active->ssid) return EINA_FALSE;
+ return !strcmp(active->ssid, ssid);
+}
+
+Eina_Bool
+enm_has_wifi_device(struct NM_Manager *nm)
+{
+ struct NM_Device *dev;
+
+ if (!nm) return EINA_FALSE;
+ EINA_INLIST_FOREACH(nm->devices, dev)
+ if (dev->type == NM_DEVICE_TYPE_WIFI) return EINA_TRUE;
+ return EINA_FALSE;
+}
+
+Eina_Bool
+enm_has_bt_entries(struct NM_Manager *nm)
+{
+ struct NM_Bluetooth_Connection *bc;
+
+ if (!nm) return EINA_FALSE;
+ EINA_INLIST_FOREACH(nm->bluetooth_connections, bc)
+ if (enm_bluetooth_connection_device_find(nm, bc)) return EINA_TRUE;
+ return EINA_FALSE;
+}
+
+const char *
+enm_active_interface_get(struct NM_Manager *nm)
+{
+ struct NM_Device *dev;
+
+ if (!nm) return NULL;
+
+ switch (nm->active_conn_type)
+ {
+ case NM_DEVICE_TYPE_WIFI:
+ case NM_DEVICE_TYPE_ETHERNET:
+ case NM_DEVICE_TYPE_BLUETOOTH:
+ EINA_INLIST_FOREACH(nm->devices, dev)
+ if ((dev->type == nm->active_conn_type) &&
+ (dev->state >= NM_DEVICE_STATE_ACTIVATED))
+ return dev->interface;
+ break;
+
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+uint8_t
+enm_active_strength_get(struct NM_Manager *nm)
+{
+ struct NM_Access_Point *ap;
+
+ /* Ethernet has no signal strength concept — report full. */
+ if (nm && nm->active_conn_type == NM_DEVICE_TYPE_ETHERNET) return 100;
+
+ ap = enm_active_ap_get(nm);
+ return ap ? ap->strength : 0;
+}
+
+const char *
+enm_active_technology_get(struct NM_Manager *nm)
+{
+ if (nm && nm->active_conn_type == NM_DEVICE_TYPE_ETHERNET) return "ethernet";
+ if (nm && nm->active_conn_type == NM_DEVICE_TYPE_BLUETOOTH) return "bluetooth";
+ return "wifi";
+}
+
+const char *
+enm_active_name_get(struct NM_Manager *nm)
+{
+ struct NM_Access_Point *ap;
+ struct NM_Device *dev;
+
+ if (!nm) return "";
+
+ ap = enm_active_ap_get(nm);
+ if (ap && ap->ssid) return ap->ssid;
+
+ if (nm->active_conn_type == NM_DEVICE_TYPE_ETHERNET)
+ {
+ EINA_INLIST_FOREACH(nm->devices, dev)
+ if ((dev->type == NM_DEVICE_TYPE_ETHERNET) &&
+ (dev->state >= NM_DEVICE_STATE_ACTIVATED))
+ return dev->interface ?: _("Wired");
+ /* NM says ethernet is active but no device has reached ACTIVATED
+ * yet — see the header for why this is NULL and not "". */
+ return NULL;
+ }
+
+ if (nm->active_conn_type == NM_DEVICE_TYPE_BLUETOOTH)
+ {
+ struct NM_Bluetooth_Connection *bc;
+
+ EINA_INLIST_FOREACH(nm->bluetooth_connections, bc)
+ {
+ dev = enm_bluetooth_connection_device_find(nm, bc);
+ if (dev && (dev->state >= NM_DEVICE_STATE_ACTIVATED))
+ return bc->name ?: _("Bluetooth");
+ }
+ return _("Bluetooth");
+ }
+
+ return "";
+}
+
+int
+enm_state_theme_value(enum NM_State state)
+{
+ switch (state)
+ {
+ case NM_STATE_UNKNOWN:
+ case NM_STATE_ASLEEP: return 0; /* OFFLINE */
+ case NM_STATE_DISCONNECTED:
+ case NM_STATE_DISCONNECTING: return 1; /* IDLE */
+ case NM_STATE_CONNECTING: return 2; /* ASSOCIATION */
+ case NM_STATE_CONNECTED_LOCAL: return 4; /* READY */
+ case NM_STATE_CONNECTED_SITE: return 4; /* READY */
+ case NM_STATE_CONNECTED_GLOBAL: return 5; /* ONLINE */
+ default: return 0;
+ }
+}
+
/* -------------------------------------------------------------------------- */
/* NM name owner lifecycle */
/* -------------------------------------------------------------------------- */
diff --git a/src/modules/networkmanager/e_networkmanager.h b/src/modules/networkmanager/e_networkmanager.h
index 45b934f14..70e766fc7 100644
--- a/src/modules/networkmanager/e_networkmanager.h
+++ b/src/modules/networkmanager/e_networkmanager.h
@@ -357,6 +357,60 @@ void enm_wireless_enabled_set(struct NM_Manager *nm, Eina_Bool enabled);
struct NM_Access_Point *enm_manager_find_ap(struct NM_Manager *nm,
const char *path) EINA_ARG_NONNULL(1, 2);
+/*
+ * Active-connection views.
+ *
+ * Precomputed summaries of the device/AP graph so the UI never has to walk
+ * nm->devices itself. All const char * results point at data-layer-owned
+ * storage (or a static gettext string) and are valid only until the next
+ * model change — copy anything you need to keep.
+ */
+
+/* Strongest AP broadcasting `ssid`, preferring the active one if it matches.
+ * Used to collapse several stations of one network into a single row. */
+struct NM_Access_Point *enm_best_ap_for_ssid(struct NM_Manager *nm,
+ const char *ssid);
+
+/* The AP behind nm->active_ap_path, or NULL when nothing is associated. */
+struct NM_Access_Point *enm_active_ap_get(struct NM_Manager *nm);
+
+/* True when `ssid` names the currently associated network. */
+Eina_Bool enm_ssid_is_active(struct NM_Manager *nm, const char *ssid);
+
+/* True when a wifi adapter exists at all (drives the Wireless section). */
+Eina_Bool enm_has_wifi_device(struct NM_Manager *nm);
+
+/* True when at least one saved bluetooth profile has a device present. */
+Eina_Bool enm_has_bt_entries(struct NM_Manager *nm);
+
+/* Kernel interface name carrying the active connection, or NULL. Feeds the
+ * traffic monitor. */
+const char *enm_active_interface_get(struct NM_Manager *nm);
+
+/* Signal strength 0..100 for the active connection; 100 for ethernet, 0 when
+ * nothing is connected. */
+uint8_t enm_active_strength_get(struct NM_Manager *nm);
+
+/* Technology name for the gadget icon: "ethernet", "bluetooth" or "wifi".
+ * Never NULL; "wifi" is the fallback. */
+const char *enm_active_technology_get(struct NM_Manager *nm);
+
+/* Display label for the active connection: SSID, interface name, or
+ * bluetooth profile name.
+ *
+ * Returns "" when there is nothing to show, and NULL to mean "leave whatever
+ * is already displayed alone". NULL arises only when NM reports an active
+ * ethernet connection while no ethernet device has reached ACTIVATED yet; the
+ * UI has always left a stale label up during that window rather than blanking
+ * it, and that behaviour is preserved verbatim here. Worth revisiting when
+ * the UI moves onto the neutral model. */
+const char *enm_active_name_get(struct NM_Manager *nm);
+
+/* Map an NM state onto the integer the edje theme expects. The theme's
+ * vocabulary is ConnMan's: OFFLINE=0, IDLE=1, ASSOCIATION=2,
+ * CONFIGURATION=3, READY=4, _ONLINE_=5. */
+int enm_state_theme_value(enum NM_State state);
+
/*
* Module callbacks.
*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.