diff options
author | Michael Biebl <biebl@debian.org> | 2011-04-21 10:42:53 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2011-04-21 10:42:53 +0200 |
commit | 8baa1aca8dfd35e3190d7d5655eb83b5b901e263 (patch) | |
tree | a9ac1e67d0c22a48330c76f08fc5291f85307055 /include | |
parent | f75dd6fd1975146623052b843b182dc32c3fbe46 (diff) |
Imported Upstream version 0.8.4.0upstream/0.8.4.0
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 3 | ||||
-rw-r--r-- | include/Makefile.in | 51 | ||||
-rw-r--r-- | include/NetworkManager.h | 339 | ||||
-rw-r--r-- | include/nm-settings-flags.h | 34 | ||||
-rw-r--r-- | include/nm-version.h | 2 |
5 files changed, 164 insertions, 265 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index b5b44d82d..b2f24ae81 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -5,8 +5,7 @@ EXTRA_DIST = \ nm-dbus-glib-types.h \ nm-glib-compat.h \ nm-test-helpers.h \ - nm-version.h.in \ - nm-settings-flags.h + nm-version.h.in NetworkManagerincludedir=$(includedir)/NetworkManager diff --git a/include/Makefile.in b/include/Makefile.in index cd4504d4e..121f1c1ff 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -39,16 +39,11 @@ DIST_COMMON = $(NetworkManagerinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/nm-version.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/introspection.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnl-check.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ + $(top_srcdir)/m4/libnl-check.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -90,6 +85,7 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -98,6 +94,8 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -114,7 +112,6 @@ DHCLIENT_PATH = @DHCLIENT_PATH@ DHCLIENT_VERSION = @DHCLIENT_VERSION@ DHCPCD_PATH = @DHCPCD_PATH@ DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ -DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -123,7 +120,6 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ @@ -132,8 +128,8 @@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ +GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ GNUTLS_LIBS = @GNUTLS_LIBS@ GREP = @GREP@ @@ -148,23 +144,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ IPTABLES_PATH = @IPTABLES_PATH@ -IWMX_SDK_CFLAGS = @IWMX_SDK_CFLAGS@ -IWMX_SDK_LIBS = @IWMX_SDK_LIBS@ KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ @@ -172,8 +158,6 @@ LIBDL = @LIBDL@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ LIBM = @LIBM@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ @@ -182,15 +166,13 @@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ +MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -216,9 +198,12 @@ PKGCONFIG_PATH = @PKGCONFIG_PATH@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ POLKIT_CFLAGS = @POLKIT_CFLAGS@ POLKIT_LIBS = @POLKIT_LIBS@ POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ RANLIB = @RANLIB@ RESOLVCONF_PATH = @RESOLVCONF_PATH@ @@ -233,13 +218,10 @@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -295,8 +277,7 @@ EXTRA_DIST = \ nm-dbus-glib-types.h \ nm-glib-compat.h \ nm-test-helpers.h \ - nm-version.h.in \ - nm-settings-flags.h + nm-version.h.in NetworkManagerincludedir = $(includedir)/NetworkManager NetworkManagerinclude_HEADERS = \ diff --git a/include/NetworkManager.h b/include/NetworkManager.h index 17c3a116c..30444e66b 100644 --- a/include/NetworkManager.h +++ b/include/NetworkManager.h @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * * Dan Williams <dcbw@redhat.com> @@ -17,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2004 - 2011 Red Hat, Inc. + * (C) Copyright 2004 - 2010 Red Hat, Inc. */ #ifndef NETWORK_MANAGER_H @@ -38,10 +37,9 @@ #define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH NM_DBUS_INTERFACE_DEVICE ".Bluetooth" #define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint" #define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint" -#define NM_DBUS_INTERFACE_DEVICE_MODEM NM_DBUS_INTERFACE_DEVICE ".Modem" -#define NM_DBUS_INTERFACE_DEVICE_WIMAX NM_DBUS_INTERFACE_DEVICE ".WiMax" -#define NM_DBUS_INTERFACE_WIMAX_NSP NM_DBUS_INTERFACE ".WiMax.Nsp" -#define NM_DBUS_PATH_WIMAX_NSP NM_DBUS_PATH "/Nsp" +#define NM_DBUS_INTERFACE_SERIAL_DEVICE NM_DBUS_INTERFACE_DEVICE ".Serial" +#define NM_DBUS_INTERFACE_GSM_DEVICE NM_DBUS_INTERFACE_DEVICE ".Gsm" +#define NM_DBUS_INTERFACE_CDMA_DEVICE NM_DBUS_INTERFACE_DEVICE ".Cdma" #define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active" #define NM_DBUS_INTERFACE_IP4_CONFIG NM_DBUS_INTERFACE ".IP4Config" #define NM_DBUS_INTERFACE_DHCP4_CONFIG NM_DBUS_INTERFACE ".DHCP4Config" @@ -49,99 +47,77 @@ #define NM_DBUS_INTERFACE_DHCP6_CONFIG NM_DBUS_INTERFACE ".DHCP6Config" -#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManager.Settings" -#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManager/Settings" +#define NM_DBUS_SERVICE_USER_SETTINGS "org.freedesktop.NetworkManagerUserSettings" +#define NM_DBUS_SERVICE_SYSTEM_SETTINGS "org.freedesktop.NetworkManagerSystemSettings" +#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManagerSettings" +#define NM_DBUS_IFACE_SETTINGS_SYSTEM "org.freedesktop.NetworkManagerSettings.System" +#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManagerSettings" -#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManager.Settings.Connection" -#define NM_DBUS_PATH_SETTINGS_CONNECTION "/org/freedesktop/NetworkManager/Settings/Connection" -#define NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS "org.freedesktop.NetworkManager.Settings.Connection.Secrets" +#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManagerSettings.Connection" +#define NM_DBUS_PATH_SETTINGS_CONNECTION "/org/freedesktop/NetworkManagerSettings/Connection" +#define NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS "org.freedesktop.NetworkManagerSettings.Connection.Secrets" -#define NM_DBUS_INTERFACE_AGENT_MANAGER NM_DBUS_INTERFACE ".AgentManager" -#define NM_DBUS_PATH_AGENT_MANAGER "/org/freedesktop/NetworkManager/AgentManager" -#define NM_DBUS_INTERFACE_SECRET_AGENT NM_DBUS_INTERFACE ".SecretAgent" -#define NM_DBUS_PATH_SECRET_AGENT "/org/freedesktop/NetworkManager/SecretAgent" - -/** - * NMState: - * @NM_STATE_UNKNOWN: networking state is unknown - * @NM_STATE_ASLEEP: networking is not enabled - * @NM_STATE_DISCONNECTED: there is no active network connection - * @NM_STATE_DISCONNECTING: network connections are being cleaned up - * @NM_STATE_CONNECTING: a network connection is being started - * @NM_STATE_CONNECTED_LOCAL: there is only local IPv4 and/or IPv6 connectivity - * @NM_STATE_CONNECTED_SITE: there is only site-wide IPv4 and/or IPv6 connectivity - * @NM_STATE_CONNECTED_GLOBAL: there is global IPv4 and/or IPv6 Internet connectivity - * - * #NMState values indicate the current overall networking state. +/* + * Types of NetworkManager states */ -typedef enum { - NM_STATE_UNKNOWN = 0, - NM_STATE_ASLEEP = 10, - NM_STATE_DISCONNECTED = 20, - NM_STATE_DISCONNECTING = 30, - NM_STATE_CONNECTING = 40, - NM_STATE_CONNECTED_LOCAL = 50, - NM_STATE_CONNECTED_SITE = 60, - NM_STATE_CONNECTED_GLOBAL = 70 +typedef enum NMState +{ + NM_STATE_UNKNOWN = 0, + NM_STATE_ASLEEP, + NM_STATE_CONNECTING, + NM_STATE_CONNECTED, + NM_STATE_DISCONNECTED } NMState; -/* For backwards compat */ -#define NM_STATE_CONNECTED NM_STATE_CONNECTED_GLOBAL -/** - * NMDeviceType: - * @NM_DEVICE_TYPE_UNKNOWN: unknown device - * @NM_DEVICE_TYPE_ETHERNET: a wired ethernet device - * @NM_DEVICE_TYPE_WIFI: an 802.11 WiFi device - * @NM_DEVICE_TYPE_UNUSED1: not used - * @NM_DEVICE_TYPE_UNUSED2: not used - * @NM_DEVICE_TYPE_BT: a Bluetooth device supporting PAN or DUN access protocols - * @NM_DEVICE_TYPE_OLPC_MESH: an OLPC XO mesh networking device - * @NM_DEVICE_TYPE_WIMAX: an 802.16e Mobile WiMAX broadband device - * @NM_DEVICE_TYPE_MODEM: a modem supporting analog telephone, CDMA/EVDO, - * GSM/UMTS, or LTE network access protocols - * - * #NMState values indicate the current overall networking state. +/* + * Types of NetworkManager devices */ -typedef enum { - NM_DEVICE_TYPE_UNKNOWN = 0, - NM_DEVICE_TYPE_ETHERNET = 1, - NM_DEVICE_TYPE_WIFI = 2, - NM_DEVICE_TYPE_UNUSED1 = 3, - NM_DEVICE_TYPE_UNUSED2 = 4, - NM_DEVICE_TYPE_BT = 5, /* Bluetooth */ - NM_DEVICE_TYPE_OLPC_MESH = 6, - NM_DEVICE_TYPE_WIMAX = 7, - NM_DEVICE_TYPE_MODEM = 8, +typedef enum NMDeviceType +{ + NM_DEVICE_TYPE_UNKNOWN = 0, + NM_DEVICE_TYPE_ETHERNET, + NM_DEVICE_TYPE_WIFI, + NM_DEVICE_TYPE_GSM, + NM_DEVICE_TYPE_CDMA, + NM_DEVICE_TYPE_BT, /* Bluetooth */ + NM_DEVICE_TYPE_OLPC_MESH } NMDeviceType; -/* General device capability flags */ -typedef enum { - NM_DEVICE_CAP_NONE = 0x00000000, - NM_DEVICE_CAP_NM_SUPPORTED = 0x00000001, - NM_DEVICE_CAP_CARRIER_DETECT = 0x00000002 -} NMDeviceCapabilities; +/* DEPRECATED TYPE NAMES */ +#define DEVICE_TYPE_UNKNOWN NM_DEVICE_TYPE_UNKNOWN +#define DEVICE_TYPE_802_3_ETHERNET NM_DEVICE_TYPE_ETHERNET +#define DEVICE_TYPE_802_11_WIRELESS NM_DEVICE_TYPE_WIFI +#define DEVICE_TYPE_GSM NM_DEVICE_TYPE_GSM +#define DEVICE_TYPE_CDMA NM_DEVICE_TYPE_CDMA -/* 802.11 Wifi device capabilities */ -typedef enum { - NM_WIFI_DEVICE_CAP_NONE = 0x00000000, - NM_WIFI_DEVICE_CAP_CIPHER_WEP40 = 0x00000001, - NM_WIFI_DEVICE_CAP_CIPHER_WEP104 = 0x00000002, - NM_WIFI_DEVICE_CAP_CIPHER_TKIP = 0x00000004, - NM_WIFI_DEVICE_CAP_CIPHER_CCMP = 0x00000008, - NM_WIFI_DEVICE_CAP_WPA = 0x00000010, - NM_WIFI_DEVICE_CAP_RSN = 0x00000020 -} NMDeviceWifiCapabilities; +/* + * General device capability bits + * + */ +#define NM_DEVICE_CAP_NONE 0x00000000 +#define NM_DEVICE_CAP_NM_SUPPORTED 0x00000001 +#define NM_DEVICE_CAP_CARRIER_DETECT 0x00000002 -/* 802.11 Access Point flags */ -typedef enum { - /*< flags >*/ - NM_802_11_AP_FLAGS_NONE = 0x00000000, - NM_802_11_AP_FLAGS_PRIVACY = 0x00000001 -} NM80211ApFlags; +/* 802.11 wireless device-specific capabilities */ +#define NM_WIFI_DEVICE_CAP_NONE 0x00000000 +#define NM_WIFI_DEVICE_CAP_CIPHER_WEP40 0x00000001 +#define NM_WIFI_DEVICE_CAP_CIPHER_WEP104 0x00000002 +#define NM_WIFI_DEVICE_CAP_CIPHER_TKIP 0x00000004 +#define NM_WIFI_DEVICE_CAP_CIPHER_CCMP 0x00000008 +#define NM_WIFI_DEVICE_CAP_WPA 0x00000010 +#define NM_WIFI_DEVICE_CAP_RSN 0x00000020 + + +/* + * 802.11 Access Point flags + * + */ +#define NM_802_11_AP_FLAGS_NONE 0x00000000 +#define NM_802_11_AP_FLAGS_PRIVACY 0x00000001 /* * 802.11 Access Point security flags @@ -150,20 +126,17 @@ typedef enum { * from various pieces of beacon information, like beacon flags and various * information elements. */ -typedef enum { - /*< flags >*/ - NM_802_11_AP_SEC_NONE = 0x00000000, - NM_802_11_AP_SEC_PAIR_WEP40 = 0x00000001, - NM_802_11_AP_SEC_PAIR_WEP104 = 0x00000002, - NM_802_11_AP_SEC_PAIR_TKIP = 0x00000004, - NM_802_11_AP_SEC_PAIR_CCMP = 0x00000008, - NM_802_11_AP_SEC_GROUP_WEP40 = 0x00000010, - NM_802_11_AP_SEC_GROUP_WEP104 = 0x00000020, - NM_802_11_AP_SEC_GROUP_TKIP = 0x00000040, - NM_802_11_AP_SEC_GROUP_CCMP = 0x00000080, - NM_802_11_AP_SEC_KEY_MGMT_PSK = 0x00000100, - NM_802_11_AP_SEC_KEY_MGMT_802_1X = 0x00000200 -} NM80211ApSecurityFlags; +#define NM_802_11_AP_SEC_NONE 0x00000000 +#define NM_802_11_AP_SEC_PAIR_WEP40 0x00000001 +#define NM_802_11_AP_SEC_PAIR_WEP104 0x00000002 +#define NM_802_11_AP_SEC_PAIR_TKIP 0x00000004 +#define NM_802_11_AP_SEC_PAIR_CCMP 0x00000008 +#define NM_802_11_AP_SEC_GROUP_WEP40 0x00000010 +#define NM_802_11_AP_SEC_GROUP_WEP104 0x00000020 +#define NM_802_11_AP_SEC_GROUP_TKIP 0x00000040 +#define NM_802_11_AP_SEC_GROUP_CCMP 0x00000080 +#define NM_802_11_AP_SEC_KEY_MGMT_PSK 0x00000100 +#define NM_802_11_AP_SEC_KEY_MGMT_802_1X 0x00000200 /* * 802.11 AP and Station modes @@ -179,97 +152,86 @@ typedef enum { * NMBluetoothCapabilities: * @NM_BT_CAPABILITY_NONE: device has no usable capabilities * @NM_BT_CAPABILITY_DUN: device provides Dial-Up Networking capability - * @NM_BT_CAPABILITY_NAP: device provides Network Access Point capability + * @NM_BT_CAPABILITY_PAN: device provides Personal Area Networking capability * * #NMBluetoothCapabilities values indicate the usable capabilities of a * Bluetooth device. */ typedef enum { - /*< flags >*/ NM_BT_CAPABILITY_NONE = 0x00000000, NM_BT_CAPABILITY_DUN = 0x00000001, NM_BT_CAPABILITY_NAP = 0x00000002, } NMBluetoothCapabilities; -/** - * NMDeviceModemCapabilities: - * @NM_DEVICE_MODEM_CAPABILITY_NONE: modem has no usable capabilities - * @NM_DEVICE_MODEM_CAPABILITY_POTS: modem uses the analog wired telephone - * network and is not a wireless/cellular device - * @NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO: modem supports at least one of CDMA - * 1xRTT, EVDO revision 0, EVDO revision A, or EVDO revision B - * @NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS: modem supports at least one of GSM, - * GPRS, EDGE, UMTS, HSDPA, HSUPA, or HSPA+ packet switched data capability - * @NM_DEVICE_MODEM_CAPABILITY_LTE: modem has LTE data capability - * - * #NMDeviceModemCapabilities values indicate the generic radio access - * technology families a modem device supports. For more information on the - * specific access technologies the device supports use the ModemManager D-Bus - * API. - */ -typedef enum { - /*< flags >*/ - NM_DEVICE_MODEM_CAPABILITY_NONE = 0x00000000, - NM_DEVICE_MODEM_CAPABILITY_POTS = 0x00000001, - NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO = 0x00000002, - NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS = 0x00000004, - NM_DEVICE_MODEM_CAPABILITY_LTE = 0x00000008, -} NMDeviceModemCapabilities; - -/** - * NMDeviceState: - * @NM_DEVICE_STATE_UNKNOWN: the device's state is unknown - * @NM_DEVICE_STATE_UNMANAGED: the device is recognized, but not managed by - * NetworkManager - * @NM_DEVICE_STATE_UNAVAILABLE: the device is managed by NetworkManager, but - * is not available for use. Reasons may include the wireless switched off, - * missing firmware, no ethernet carrier, missing supplicant or modem manager, - * etc. - * @NM_DEVICE_STATE_DISCONNECTED: the device can be activated, but is currently - * idle and not connected to a network. - * @NM_DEVICE_STATE_PREPARE: the device is preparing the connection to the - * network. This may include operations like changing the MAC address, - * setting physical link properties, and anything else required to connect - * to the requested network. - * @NM_DEVICE_STATE_CONFIG: the device is connecting to the requested network. - * This may include operations like associating with the WiFi AP, dialing - * the modem, connecting to the remote Bluetooth device, etc. - * @NM_DEVICE_STATE_NEED_AUTH: the device requires more information to continue - * connecting to the requested network. This includes secrets like WiFi - * passphrases, login passwords, PIN codes, etc. - * @NM_DEVICE_STATE_IP_CONFIG: the device is requesting IPv4 and/or IPv6 - * addresses and routing information from the network. - * @NM_DEVICE_STATE_IP_CHECK: the device is checking whether further action is - * required for the requested network connection. This may include checking - * whether only local network access is available, whether a captive portal - * is blocking access to the Internet, etc. - * @NM_DEVICE_STATE_SECONDARIES: the device is waiting for a secondary - * connection (like a VPN) which must activated before the device can be - * activated - * @NM_DEVICE_STATE_ACTIVATED: the device has a network connection, either local - * or global. - * @NM_DEVICE_STATE_DEACTIVATING: a disconnection from the current network - * connection was requested, and the device is cleaning up resources used for - * that connection. The network connection may still be valid. - * @NM_DEVICE_STATE_FAILED: the device failed to connect to the requested - * network and is cleaning up the connection request - * - **/ -typedef enum { - NM_DEVICE_STATE_UNKNOWN = 0, - NM_DEVICE_STATE_UNMANAGED = 10, - NM_DEVICE_STATE_UNAVAILABLE = 20, - NM_DEVICE_STATE_DISCONNECTED = 30, - NM_DEVICE_STATE_PREPARE = 40, - NM_DEVICE_STATE_CONFIG = 50, - NM_DEVICE_STATE_NEED_AUTH = 60, - NM_DEVICE_STATE_IP_CONFIG = 70, - NM_DEVICE_STATE_IP_CHECK = 80, - NM_DEVICE_STATE_SECONDARIES = 90, - NM_DEVICE_STATE_ACTIVATED = 100, - NM_DEVICE_STATE_DEACTIVATING = 110, - NM_DEVICE_STATE_FAILED = 120 +/* + * Device states + */ +typedef enum +{ + NM_DEVICE_STATE_UNKNOWN = 0, + + /* Initial state of all devices and the only state for devices not + * managed by NetworkManager. + * + * Allowed next states: + * UNAVAILABLE: the device is now managed by NetworkManager + */ + NM_DEVICE_STATE_UNMANAGED = 1, + + /* Indicates the device is not yet ready for use, but is managed by + * NetworkManager. For Ethernet devices, the device may not have an + * active carrier. For WiFi devices, the device may not have it's radio + * enabled. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * DISCONNECTED: the device is now ready for use + */ + NM_DEVICE_STATE_UNAVAILABLE = 2, + + /* Indicates the device does not have an activate connection to anything. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * PREPARE: the device has started activation + */ + NM_DEVICE_STATE_DISCONNECTED = 3, + + /* Indicate states in device activation. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * FAILED: an error ocurred during activation + * NEED_AUTH: authentication/secrets are needed + * ACTIVATED: (IP_CONFIG only) activation was successful + * DISCONNECTED: the device's connection is no longer valid, or NetworkManager went to sleep + */ + NM_DEVICE_STATE_PREPARE = 4, + NM_DEVICE_STATE_CONFIG = 5, + NM_DEVICE_STATE_NEED_AUTH = 6, + NM_DEVICE_STATE_IP_CONFIG = 7, + + /* Indicates the device is part of an active network connection. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * FAILED: a DHCP lease was not renewed, or another error + * DISCONNECTED: the device's connection is no longer valid, or NetworkManager went to sleep + */ + NM_DEVICE_STATE_ACTIVATED = 8, + + /* Indicates the device's activation failed. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * DISCONNECTED: the device's connection is ready for activation, or NetworkManager went to sleep + */ + NM_DEVICE_STATE_FAILED = 9 } NMDeviceState; @@ -417,23 +379,14 @@ typedef enum { } NMDeviceStateReason; -/** - * NMActiveConnectionState: - * @NM_ACTIVE_CONNECTION_STATE_UNKNOWN: the state of the connection is unknown - * @NM_ACTIVE_CONNECTION_STATE_ACTIVATING: a network connection is being prepared - * @NM_ACTIVE_CONNECTION_STATE_ACTIVATED: there is a connection to the network - * @NM_ACTIVE_CONNECTION_STATE_DEACTIVATING: the network connection is being - * torn down and cleaned up - * - * #NMActiveConnectionState values indicate the state of a connection to a - * specific network while it is starting, connected, or disconnecting from that - * network. - */ typedef enum { NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0, + + /* Indicates the connection is activating */ NM_ACTIVE_CONNECTION_STATE_ACTIVATING, - NM_ACTIVE_CONNECTION_STATE_ACTIVATED, - NM_ACTIVE_CONNECTION_STATE_DEACTIVATING + + /* Indicates the connection is currently active */ + NM_ACTIVE_CONNECTION_STATE_ACTIVATED } NMActiveConnectionState; #endif /* NETWORK_MANAGER_H */ diff --git a/include/nm-settings-flags.h b/include/nm-settings-flags.h deleted file mode 100644 index 5f008f5c8..000000000 --- a/include/nm-settings-flags.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Network link manager - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2011 Red Hat, Inc. - */ - -#ifndef NM_SETTINGS_FLAGS_H -#define NM_SETTINGS_FLAGS_H - -/* NOTE: these values should match the NM_SECRET_AGENT_GET_SECRETS_FLAGS in - * the nm-secret-agent.xml introspection file. - */ -typedef enum { - NM_SETTINGS_GET_SECRETS_FLAG_NONE = 0x0, - NM_SETTINGS_GET_SECRETS_FLAG_ALLOW_INTERACTION = 0x1, - NM_SETTINGS_GET_SECRETS_FLAG_REQUEST_NEW = 0x2 -} NMSettingsGetSecretsFlags; - -#endif /* NM_SETTINGS_FLAGS_H */ - diff --git a/include/nm-version.h b/include/nm-version.h index ee41b9978..1867e0542 100644 --- a/include/nm-version.h +++ b/include/nm-version.h @@ -43,7 +43,7 @@ * Evaluates to the micro version number of NetworkManager which this source * compiled against. */ -#define NM_MICRO_VERSION (998) +#define NM_MICRO_VERSION (4) /** * NM_CHECK_VERSION: |