This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/142/head
in repository enlightenment.

View the commit online.

commit 532230edf6c4b64544c398ee6adb831a58566464
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Aug 3 13:50:11 2026 -0600

    networkmanager - drop the parts of the model nothing uses
    
    The neutral model went in with API and fields that never acquired a
    caller: enm_net_manager_get, enm_net_backend_name_get and the two
    to_str helpers, plus backend_data, which was never read or written, and
    offline_mode, which the connman backend filled in for nobody.
    
    Better gone than left looking like they are waiting for something.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
---
 src/modules/networkmanager/e_net.c         | 48 ------------------------------
 src/modules/networkmanager/e_net.h         | 10 -------
 src/modules/networkmanager/e_net_connman.c |  7 -----
 3 files changed, 65 deletions(-)

diff --git a/src/modules/networkmanager/e_net.c b/src/modules/networkmanager/e_net.c
index 557d0b496..ef4ab86a5 100644
--- a/src/modules/networkmanager/e_net.c
+++ b/src/modules/networkmanager/e_net.c
@@ -36,7 +36,6 @@ static const E_Net_Backend *const _backends[] =
 #define BACKEND_COUNT ((int)(sizeof(_backends) / sizeof(_backends[0])))
 
 static const E_Net_Backend *_backend;   /* bound backend, or NULL */
-static E_Net_Manager       *_manager;   /* live manager, or NULL */
 static const E_Net_Mod_Callbacks *_mod_cbs;
 
 /* Selection state: which daemons are on the bus, which one we are bound to,
@@ -275,7 +274,6 @@ e_net_manager_new(const E_Net_Backend *backend)
    mgr->backend = backend;
    mgr->state   = E_NET_STATE_IDLE;
 
-   _manager = mgr;
    return mgr;
 }
 
@@ -294,7 +292,6 @@ e_net_manager_free(E_Net_Manager *mgr)
    eina_stringshare_del(mgr->active_name);
    eina_stringshare_del(mgr->active_iface);
 
-   if (_manager == mgr) _manager = NULL;
    free(mgr);
 }
 
@@ -314,12 +311,6 @@ e_net_manager_active_set(E_Net_Manager *mgr, E_Net_Type type,
    eina_stringshare_replace(&mgr->active_iface, iface);
 }
 
-E_Net_Manager *
-e_net_manager_get(void)
-{
-   return _manager;
-}
-
 /* -------------------------------------------------------------------------- */
 /* Backend selection and lifecycle                                             */
 /* -------------------------------------------------------------------------- */
@@ -480,7 +471,6 @@ e_net_shutdown(void)
      _backends[_bound_idx]->shutdown();
    _bound_idx = -1;
    _backend = NULL;
-   _manager = NULL;
    _mod_cbs = NULL;
 
    for (i = 0; i < BACKEND_COUNT; i++)
@@ -500,12 +490,6 @@ e_net_shutdown(void)
    _preference = NULL;
 }
 
-const char *
-e_net_backend_name_get(void)
-{
-   return _backend ? _backend->name : NULL;
-}
-
 /* -------------------------------------------------------------------------- */
 /* Action dispatch                                                             */
 /* -------------------------------------------------------------------------- */
@@ -590,38 +574,6 @@ e_net_vpn_import(const char *file_path, E_Net_Import_Cb done_cb, void *data)
 /* Utility                                                                     */
 /* -------------------------------------------------------------------------- */
 
-const char *
-e_net_state_to_str(E_Net_State state)
-{
-   switch (state)
-     {
-      case E_NET_STATE_OFFLINE:       return "offline";
-      case E_NET_STATE_IDLE:          return "idle";
-      case E_NET_STATE_ASSOCIATION:   return "association";
-      case E_NET_STATE_CONFIGURATION: return "configuration";
-      case E_NET_STATE_READY:         return "ready";
-      case E_NET_STATE_ONLINE:        return "online";
-      case E_NET_STATE_DISCONNECT:    return "disconnect";
-      case E_NET_STATE_FAILURE:       return "failure";
-     }
-   return "unknown";
-}
-
-const char *
-e_net_type_to_str(E_Net_Type type)
-{
-   switch (type)
-     {
-      case E_NET_TYPE_ETHERNET:  return "ethernet";
-      case E_NET_TYPE_WIFI:      return "wifi";
-      case E_NET_TYPE_BLUETOOTH: return "bluetooth";
-      case E_NET_TYPE_CELLULAR:  return "cellular";
-      case E_NET_TYPE_VPN:       return "vpn";
-      case E_NET_TYPE_UNKNOWN:   break;
-     }
-   return "unknown";
-}
-
 /* Priority order here is load-bearing: it reproduces the string the popup
  * subtitle and the lock overlay have always shown for a given AP. */
 const char *
diff --git a/src/modules/networkmanager/e_net.h b/src/modules/networkmanager/e_net.h
index c623d50d2..779f77236 100644
--- a/src/modules/networkmanager/e_net.h
+++ b/src/modules/networkmanager/e_net.h
@@ -115,7 +115,6 @@ struct _E_Net_Manager
    E_Net_State  state;
    Eina_Bool    wifi_present;
    Eina_Bool    wifi_enabled;
-   Eina_Bool    offline_mode;
 
    /* Precomputed summary of the primary connection, for the gadget. */
    E_Net_Type   active_type;
@@ -126,7 +125,6 @@ struct _E_Net_Manager
    uint16_t     active_frequency;
 
    const E_Net_Backend *backend;
-   void        *backend_data;
 };
 
 /*
@@ -196,17 +194,11 @@ void e_net_module_callbacks_set(const E_Net_Mod_Callbacks *cbs);
  * E_NET_BACKEND environment variable overrides it. */
 void       e_net_backend_preference_set(const char *name);
 
-/* Name of the bound backend, or NULL when no daemon is available. */
-const char *e_net_backend_name_get(void);
-
 /* Lifecycle.  e_net_init starts watching for daemons and binds the most
  * preferred one that is present, now or later. */
 Eina_Bool  e_net_init(void);
 void       e_net_shutdown(void);
 
-/* The live manager, or NULL when no daemon is bound. */
-E_Net_Manager *e_net_manager_get(void);
-
 /* Actions — thin dispatchers onto the bound backend, NULL-safe. */
 void e_net_scan(E_Net_Manager *mgr);
 void e_net_connect(E_Net_Manager *mgr, E_Net_Service *svc);
@@ -259,8 +251,6 @@ void e_net_notify_manager_inout(E_Net_Manager *mgr);
 void e_net_notify_vpn_active_changed(E_Net_Manager *mgr);
 
 /* Utility. */
-const char *e_net_state_to_str(E_Net_State state);
-const char *e_net_type_to_str(E_Net_Type type);
 /* Highest-priority security name: "sae", "802.1x", "wpa2", "wpa", "wep" or
  * "open".  Never NULL. */
 const char *e_net_security_to_str(unsigned int security);
diff --git a/src/modules/networkmanager/e_net_connman.c b/src/modules/networkmanager/e_net_connman.c
index 64d251217..cc139dcbc 100644
--- a/src/modules/networkmanager/e_net_connman.c
+++ b/src/modules/networkmanager/e_net_connman.c
@@ -771,13 +771,6 @@ _mgr_prop_apply(const char *key, Eldbus_Message_Iter *var)
         if (!eldbus_message_iter_arguments_get(var, "s", &s)) return;
         _mgr->state = _state_map(s);
      }
-   else if (!strcmp(key, "OfflineMode"))
-     {
-        Eina_Bool v;
-
-        if (!eldbus_message_iter_arguments_get(var, "b", &v)) return;
-        _mgr->offline_mode = v;
-     }
 }
 
 /* Recompute the active-connection summary the gadget reads.  ConnMan has no

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to