Skip to content
  • Thomas Haller's avatar
    libnm: revert coercing NMVpnConnectionStateReason to NMActiveConnectionStateReason · 5022e3b8
    Thomas Haller authored
    NMVpnConnectionStateReason is no longer used and replaced by
    NMActiveConnectionStateReason. However, the old enums should
    stay in place as they were:
    
    Otherwise:
      #define NMVpnConnectionStateReason NMActiveConnectionStateReason
    causes compiler warnings:
      NMVpnConnectionStateReason x;
      x = NM_VPN_CONNECTION_STATE_REASON_UNKNOWN;             // -Wenum-conversion
      if (x == NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS) { } // -Wenum-compare
    
    Similarly, a user who didn't upgrade shall continue to get the
    old GType for NM_TYPE_VPN_CONNECTION_STATE_REASON.
    
    In practice, old users will have no issues using the old enum
    the places where it worked before.
    The only use of the deprecated enum is in vpn_state_changed()
    signal slot of NMVpnConnection. This makes the signal slot
    itself deprecated. However, NMVpnConnection is an NMObject and commonly
    created within libnm itself, not by the user. It is very unlikely that
    a user of libnm subclassed NMVpnConnection and makes use of the
    vpn_state_changed() signal slot. So, deprecate it without replacement.
    
    Fixes: a91369f8
    5022e3b8