AC_SUBST(UUID_CFLAGS)
AC_SUBST(UUID_LIBS)
- PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
++PKG_CHECK_MODULES(WIMAX, libiWmxSdk-0)
+
+ PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
AC_SUBST(POLKIT_CFLAGS)
- PKG_CHECK_MODULES(WIMAX, libiWmxSdk-0)
+ # Check for polkit_authority_get_sync()
+ AC_CHECK_LIB([polkit-gobject-1], [polkit_authority_get_sync], ac_have_pk_auth_get_sync="1", ac_have_pk_auth_get_sync="0")
+ AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORITY_GET_SYNC, $ac_have_pk_auth_get_sync, [Define if you have a polkit with polkit_authority_get_sync()])
AC_ARG_WITH(crypto, AS_HELP_STRING([--with-crypto=nss | gnutls], [Cryptography library to use for certificate and key operations]),ac_crypto=$withval, ac_crypto=nss)
<property name="WirelessHardwareEnabled" type="b" access="read"/>
<property name="WwanEnabled" type="b" access="readwrite"/>
<property name="WwanHardwareEnabled" type="b" access="read"/>
+ <property name="WimaxEnabled" type="b" access="readwrite"/>
+ <property name="WimaxHardwareEnabled" type="b" access="read"/>
<property name="ActiveConnections" type="ao" access="read"/>
+ <property name="Version" type="s" access="read"/>
<property name="State" type="u" access="read"/>
<signal name="StateChanged">
nm-client-bindings.h: $(top_srcdir)/introspection/nm-manager-client.xml
- dbus-binding-tool --prefix=nm_client --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_client --mode=glib-client --output=$@ $<
nm-device-bindings.h: $(top_srcdir)/introspection/nm-device.xml
- dbus-binding-tool --prefix=nm_device --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device --mode=glib-client --output=$@ $<
nm-device-ethernet-bindings.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
- dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-client --output=$@ $<
nm-device-wifi-bindings.h: $(top_srcdir)/introspection/nm-device-wifi.xml
- dbus-binding-tool --prefix=nm_device_wifi --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_wifi --mode=glib-client --output=$@ $<
nm-device-bt-bindings.h: $(top_srcdir)/introspection/nm-device-bt.xml
- dbus-binding-tool --prefix=nm_device_bt --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_device_bt --mode=glib-client --output=$@ $<
nm-access-point-bindings.h: $(top_srcdir)/introspection/nm-access-point.xml
- dbus-binding-tool --prefix=nm_access_point --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_access_point --mode=glib-client --output=$@ $<
nm-settings-glue.h: $(top_srcdir)/introspection/nm-settings.xml
- dbus-binding-tool --prefix=nm_settings --mode=glib-server --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-server --output=$@ $<
nm-settings-bindings.h: $(top_srcdir)/introspection/nm-settings.xml
- dbus-binding-tool --prefix=nm_settings --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-client --output=$@ $<
nm-settings-system-bindings.h: $(top_srcdir)/introspection/nm-settings-system.xml
- dbus-binding-tool --prefix=nm_settings_system --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_settings_system --mode=glib-client --output=$@ $<
nm-exported-connection-glue.h: $(top_srcdir)/introspection/nm-exported-connection.xml
- dbus-binding-tool --prefix=nm_exported_connection --mode=glib-server --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_exported_connection --mode=glib-server --output=$@ $<
nm-exported-connection-bindings.h: $(top_srcdir)/introspection/nm-exported-connection.xml
- dbus-binding-tool --prefix=nm_exported_connection --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_exported_connection --mode=glib-client --output=$@ $<
nm-vpn-connection-bindings.h: $(top_srcdir)/introspection/nm-vpn-connection.xml
- dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-client --output=$@ $<
nm-vpn-plugin-glue.h: $(top_srcdir)/introspection/nm-vpn-plugin.xml
- dbus-binding-tool --prefix=nm_vpn_plugin --mode=glib-server --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_plugin --mode=glib-server --output=$@ $<
nm-active-connection-bindings.h: $(top_srcdir)/introspection/nm-active-connection.xml
- dbus-binding-tool --prefix=nm_active_connection --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_active_connection --mode=glib-client --output=$@ $<
nm-ip4-config-bindings.h: $(top_srcdir)/introspection/nm-ip4-config.xml
- dbus-binding-tool --prefix=nm_ip4_config --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_ip4_config --mode=glib-client --output=$@ $<
nm-dhcp4-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp4-config.xml
- dbus-binding-tool --prefix=nm_dhcp4_config --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp4_config --mode=glib-client --output=$@ $<
nm-ip6-config-bindings.h: $(top_srcdir)/introspection/nm-ip6-config.xml
- dbus-binding-tool --prefix=nm_ip6_config --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_ip6_config --mode=glib-client --output=$@ $<
nm-dhcp6-config-bindings.h: $(top_srcdir)/introspection/nm-dhcp6-config.xml
- dbus-binding-tool --prefix=nm_dhcp6_config --mode=glib-client --output=$@ $<
+ $(AM_V_GEN) dbus-binding-tool --prefix=nm_dhcp6_config --mode=glib-client --output=$@ $<
+nm-wimax-device-bindings.h: $(top_srcdir)/introspection/nm-wimax-device.xml
+ dbus-binding-tool --prefix=nm_wimax_device --mode=glib-client --output=$@ $<
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libnm-glib.pc libnm-glib-vpn.pc
#define NM_CLIENT_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled"
#define NM_CLIENT_WWAN_ENABLED "wwan-enabled"
#define NM_CLIENT_WWAN_HARDWARE_ENABLED "wwan-hardware-enabled"
+#define NM_CLIENT_WIMAX_ENABLED "wimax-enabled"
+#define NM_CLIENT_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled"
#define NM_CLIENT_ACTIVE_CONNECTIONS "active-connections"
+ /* Permissions */
+ typedef enum {
+ NM_CLIENT_PERMISSION_NONE = 0,
+ NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK = 1,
+ NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIFI = 2,
+ NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN = 3,
+ NM_CLIENT_PERMISSION_USE_USER_CONNECTIONS = 4,
+
+ NM_CLIENT_PERMISSION_LAST = NM_CLIENT_PERMISSION_USE_USER_CONNECTIONS
+ } NMClientPermission;
+
+ typedef enum {
+ NM_CLIENT_PERMISSION_RESULT_UNKNOWN = 0,
+ NM_CLIENT_PERMISSION_RESULT_YES,
+ NM_CLIENT_PERMISSION_RESULT_AUTH,
+ NM_CLIENT_PERMISSION_RESULT_NO
+ } NMClientPermissionResult;
+
+
typedef struct {
NMObject parent;
} NMClient;
$(GUDEV_CFLAGS) \
$(LIBNL_CFLAGS) \
$(GMODULE_CFLAGS) \
+ $(WIMAX_CFLAGS) \
+ $(POLKIT_CFLAGS) \
-DG_DISABLE_DEPRECATED \
-DBINDIR=\"$(bindir)\" \
-DSBINDIR=\"$(sbindir)\" \
char *pidfile = NULL, *state_file = NULL, *dhcp = NULL;
char *config = NULL, *plugins = NULL, *conf_plugins = NULL;
char *log_level = NULL, *log_domains = NULL;
- gboolean wifi_enabled = TRUE, net_enabled = TRUE, wwan_enabled = TRUE;
+ char **dns = NULL;
+ gboolean wifi_enabled = TRUE, net_enabled = TRUE, wwan_enabled = TRUE, wimax_enabled = TRUE;
gboolean success;
NMPolicy *policy = NULL;
NMVPNManager *vpn_manager = NULL;
priv->state_file = g_strdup (state_file);
- priv->sleeping = !initial_net_enabled;
+ priv->net_enabled = initial_net_enabled;
- priv->radio_states[RFKILL_TYPE_WLAN].enabled = initial_wifi_enabled;
- priv->radio_states[RFKILL_TYPE_WWAN].enabled = initial_wwan_enabled;
- priv->radio_states[RFKILL_TYPE_WIMAX].enabled = initial_wimax_enabled;
+ priv->radio_states[RFKILL_TYPE_WLAN].user_enabled = initial_wifi_enabled;
+ priv->radio_states[RFKILL_TYPE_WWAN].user_enabled = initial_wwan_enabled;
++ priv->radio_states[RFKILL_TYPE_WIMAX].user_enabled = initial_wimax_enabled;
g_signal_connect (priv->sys_settings, "notify::" NM_SYSCONFIG_SETTINGS_UNMANAGED_SPECS,
G_CALLBACK (system_unmanaged_devices_changed_cb), singleton);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
switch (prop_id) {
+ case PROP_NETWORKING_ENABLED:
+ /* Construct only for now */
+ priv->net_enabled = g_value_get_boolean (value);
+ break;
case PROP_WIRELESS_ENABLED:
- manager_set_radio_enabled (NM_MANAGER (object),
- &priv->radio_states[RFKILL_TYPE_WLAN],
- g_value_get_boolean (value));
+ manager_radio_user_toggled (NM_MANAGER (object),
+ &priv->radio_states[RFKILL_TYPE_WLAN],
+ g_value_get_boolean (value));
break;
case PROP_WWAN_ENABLED:
- manager_set_radio_enabled (NM_MANAGER (object),
- &priv->radio_states[RFKILL_TYPE_WWAN],
- g_value_get_boolean (value));
+ manager_radio_user_toggled (NM_MANAGER (object),
+ &priv->radio_states[RFKILL_TYPE_WWAN],
+ g_value_get_boolean (value));
break;
+ case PROP_WIMAX_ENABLED:
+ manager_set_radio_enabled (NM_MANAGER (object),
+ &priv->radio_states[RFKILL_TYPE_WIMAX],
+ g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
priv->radio_states[RFKILL_TYPE_WWAN].other_enabled_func = nm_manager_get_modem_enabled_state;
priv->radio_states[RFKILL_TYPE_WWAN].rtype = RFKILL_TYPE_WWAN;
- priv->radio_states[RFKILL_TYPE_WIMAX].enabled = TRUE;
+ priv->radio_states[RFKILL_TYPE_WIMAX].user_enabled = TRUE;
priv->radio_states[RFKILL_TYPE_WIMAX].key = "WiMAXEnabled";
- priv->radio_states[RFKILL_TYPE_WIMAX].prop = NULL;
- priv->radio_states[RFKILL_TYPE_WIMAX].hw_prop = NULL;
+ priv->radio_states[RFKILL_TYPE_WIMAX].prop = NM_MANAGER_WIMAX_ENABLED;
+ priv->radio_states[RFKILL_TYPE_WIMAX].hw_prop = NM_MANAGER_WIMAX_HARDWARE_ENABLED;
priv->radio_states[RFKILL_TYPE_WIMAX].desc = "WiMAX";
priv->radio_states[RFKILL_TYPE_WIMAX].other_enabled_func = NULL;
priv->radio_states[RFKILL_TYPE_WIMAX].rtype = RFKILL_TYPE_WIMAX;
#define NM_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_MANAGER))
#define NM_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_MANAGER, NMManagerClass))
+ #define NM_MANAGER_VERSION "version"
+ #define NM_MANAGER_STATE "state"
+ #define NM_MANAGER_NETWORKING_ENABLED "networking-enabled"
+ #define NM_MANAGER_WIRELESS_ENABLED "wireless-enabled"
+ #define NM_MANAGER_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled"
+ #define NM_MANAGER_WWAN_ENABLED "wwan-enabled"
+ #define NM_MANAGER_WWAN_HARDWARE_ENABLED "wwan-hardware-enabled"
++#define NM_MANAGER_WIMAX_ENABLED "wimax-enabled"
++#define NM_MANAGER_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled"
+ #define NM_MANAGER_ACTIVE_CONNECTIONS "active-connections"
+
/* Not exported */
#define NM_MANAGER_HOSTNAME "hostname"
#define NM_MANAGER_SLEEPING "sleeping"
#include <nm-gsm-device.h>
#include <nm-cdma-device.h>
#include <nm-device-bt.h>
+#include <nm-wimax-device.h>
#include <nm-utils.h>
#include <nm-setting-ip4-config.h>
+ #include <nm-setting-ip6-config.h>
#include <nm-vpn-connection.h>
#include <nm-setting-connection.h>