diff options
| author | Michael Biebl <biebl@debian.org> | 2021-10-01 23:05:04 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-10-01 23:05:04 +0200 |
| commit | e74c568b07b50b97873fb4ee1d776dedefbd54d6 (patch) | |
| tree | 3469f17ea9af91f7ff169b890633bda68b0cf76e /src/libnm-client-public | |
| parent | bfe522304da217296e2a61040f58e35ec5d6f3f2 (diff) | |
New upstream version 1.32.12 upstream/1.32.12
Diffstat (limited to 'src/libnm-client-public')
52 files changed, 4136 insertions, 0 deletions
diff --git a/src/libnm-client-public/NetworkManager.h b/src/libnm-client-public/NetworkManager.h new file mode 100644 index 00000000..f9cc8565 --- /dev/null +++ b/src/libnm-client-public/NetworkManager.h @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2014 - 2018 Red Hat, Inc. + */ + +#ifndef __NETWORKMANAGER_H__ +#define __NETWORKMANAGER_H__ + +#define __NETWORKMANAGER_H_INSIDE__ + +#include "nm-access-point.h" +#include "nm-active-connection.h" +#include "nm-client.h" +#include "nm-connection.h" +#include "nm-core-enum-types.h" +#include "nm-dbus-interface.h" +#include "nm-device-6lowpan.h" +#include "nm-device-adsl.h" +#include "nm-device-bond.h" +#include "nm-device-bridge.h" +#include "nm-device-bt.h" +#include "nm-device-dummy.h" +#include "nm-device-ethernet.h" +#include "nm-device-generic.h" +#include "nm-device-infiniband.h" +#include "nm-device-ip-tunnel.h" +#include "nm-device-macsec.h" +#include "nm-device-macvlan.h" +#include "nm-device-modem.h" +#include "nm-device-olpc-mesh.h" +#include "nm-device-ovs-bridge.h" +#include "nm-device-ovs-interface.h" +#include "nm-device-ovs-port.h" +#include "nm-device-ppp.h" +#include "nm-device-team.h" +#include "nm-device-tun.h" +#include "nm-device-veth.h" +#include "nm-device-vlan.h" +#include "nm-device-vxlan.h" +#include "nm-device-wifi-p2p.h" +#include "nm-device-wifi.h" +#include "nm-device-wimax.h" +#include "nm-device-wireguard.h" +#include "nm-device-wpan.h" +#include "nm-device.h" +#include "nm-dhcp-config.h" +#include "nm-enum-types.h" +#include "nm-ethtool-utils.h" +#include "nm-ip-config.h" +#include "nm-keyfile.h" +#include "nm-object.h" +#include "nm-remote-connection.h" +#include "nm-setting-6lowpan.h" +#include "nm-setting-8021x.h" +#include "nm-setting-adsl.h" +#include "nm-setting-bluetooth.h" +#include "nm-setting-bond.h" +#include "nm-setting-bridge.h" +#include "nm-setting-bridge-port.h" +#include "nm-setting-cdma.h" +#include "nm-setting-connection.h" +#include "nm-setting-dcb.h" +#include "nm-setting-dummy.h" +#include "nm-setting-ethtool.h" +#include "nm-setting-generic.h" +#include "nm-setting-gsm.h" +#include "nm-setting-hostname.h" +#include "nm-setting-infiniband.h" +#include "nm-setting-ip4-config.h" +#include "nm-setting-ip6-config.h" +#include "nm-setting-ip-config.h" +#include "nm-setting-ip-tunnel.h" +#include "nm-setting-macsec.h" +#include "nm-setting-macvlan.h" +#include "nm-setting-match.h" +#include "nm-setting-olpc-mesh.h" +#include "nm-setting-ovs-bridge.h" +#include "nm-setting-ovs-interface.h" +#include "nm-setting-ovs-dpdk.h" +#include "nm-setting-ovs-patch.h" +#include "nm-setting-ovs-port.h" +#include "nm-setting-wifi-p2p.h" +#include "nm-setting-ppp.h" +#include "nm-setting-pppoe.h" +#include "nm-setting-proxy.h" +#include "nm-setting-serial.h" +#include "nm-setting-sriov.h" +#include "nm-setting-tc-config.h" +#include "nm-setting-team.h" +#include "nm-setting-team-port.h" +#include "nm-setting-tun.h" +#include "nm-setting-user.h" +#include "nm-setting-veth.h" +#include "nm-setting-vlan.h" +#include "nm-setting-vpn.h" +#include "nm-setting-vrf.h" +#include "nm-setting-vxlan.h" +#include "nm-setting-wimax.h" +#include "nm-setting-wired.h" +#include "nm-setting-wireguard.h" +#include "nm-setting-wireless.h" +#include "nm-setting-wireless-security.h" +#include "nm-setting-wpan.h" +#include "nm-setting.h" +#include "nm-simple-connection.h" +#include "nm-utils.h" +#include "nm-version.h" +#include "nm-vpn-connection.h" +#include "nm-vpn-dbus-interface.h" +#include "nm-vpn-editor.h" +#include "nm-vpn-editor-plugin.h" +#include "nm-vpn-plugin-info.h" +#include "nm-vpn-service-plugin.h" +#include "nm-wifi-p2p-peer.h" +#include "nm-wimax-nsp.h" + +#include "nm-autoptr.h" + +#if !defined(NETWORKMANAGER_COMPILATION) \ + && (!defined(NM_NO_INCLUDE_EXTRA_HEADERS) || !NM_NO_INCLUDE_EXTRA_HEADERS) + /* historically, NetworkManager.h drags in the following system headers. + * These are not strictly necessary and the user may wish to opt out from + * including them. */ + #include <linux/if_ether.h> + #include <linux/if_infiniband.h> + #include <linux/if_vlan.h> + #include <netinet/in.h> +#endif + +#undef __NETWORKMANAGER_H_INSIDE__ + +#endif /* __NETWORKMANAGER_H__ */ diff --git a/src/libnm-client-public/meson.build b/src/libnm-client-public/meson.build new file mode 100644 index 00000000..3ae4e8d8 --- /dev/null +++ b/src/libnm-client-public/meson.build @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +libnm_client_public_inc = include_directories('.') + +libnm_client_headers = files( + 'NetworkManager.h', + 'nm-access-point.h', + 'nm-active-connection.h', + 'nm-autoptr.h', + 'nm-checkpoint.h', + 'nm-client.h', + 'nm-device-6lowpan.h', + 'nm-device-adsl.h', + 'nm-device-bond.h', + 'nm-device-bridge.h', + 'nm-device-bt.h', + 'nm-device-dummy.h', + 'nm-device-ethernet.h', + 'nm-device-generic.h', + 'nm-device-infiniband.h', + 'nm-device-ip-tunnel.h', + 'nm-device-macsec.h', + 'nm-device-macvlan.h', + 'nm-device-modem.h', + 'nm-device-olpc-mesh.h', + 'nm-device-ovs-bridge.h', + 'nm-device-ovs-interface.h', + 'nm-device-ovs-port.h', + 'nm-device-ppp.h', + 'nm-device-team.h', + 'nm-device-tun.h', + 'nm-device-veth.h', + 'nm-device-vlan.h', + 'nm-device-vrf.h', + 'nm-device-vxlan.h', + 'nm-device-wifi-p2p.h', + 'nm-device-wifi.h', + 'nm-device-wimax.h', + 'nm-device-wireguard.h', + 'nm-device-wpan.h', + 'nm-device.h', + 'nm-dhcp-config.h', + 'nm-ethtool-utils.h', + 'nm-ip-config.h', + 'nm-object.h', + 'nm-remote-connection.h', + 'nm-secret-agent-old.h', + 'nm-types.h', + 'nm-vpn-connection.h', + 'nm-vpn-editor.h', + 'nm-vpn-plugin-old.h', + 'nm-vpn-service-plugin.h', + 'nm-wifi-p2p-peer.h', + 'nm-wimax-nsp.h', +) + +libnm_client_public_enum_sources = gnome.mkenums( + 'nm-enum-types', + sources: libnm_client_headers, + identifier_prefix: nm_id_prefix, + c_template: 'nm-enum-types.c.template', + h_template: 'nm-enum-types.h.template', + install_header: true, + install_dir: libnm_pkgincludedir, +) + +install_headers( + libnm_core_headers + libnm_client_headers + [nm_version_macro_header], + subdir: libnm_name, +) + +libnm_client_public_dep = declare_dependency( + sources: libnm_client_public_enum_sources[1], + include_directories: [ + libnm_client_public_inc, + src_inc, + top_inc, + ], + dependencies: [ + libnm_core_public_dep, + glib_dep, + ], +) diff --git a/src/libnm-client-public/nm-access-point.h b/src/libnm-client-public/nm-access-point.h new file mode 100644 index 00000000..0460ea0a --- /dev/null +++ b/src/libnm-client-public/nm-access-point.h @@ -0,0 +1,67 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2011 Red Hat, Inc. + */ + +#ifndef __NM_ACCESS_POINT_H__ +#define __NM_ACCESS_POINT_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_ACCESS_POINT (nm_access_point_get_type()) +#define NM_ACCESS_POINT(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_ACCESS_POINT, NMAccessPoint)) +#define NM_ACCESS_POINT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_ACCESS_POINT, NMAccessPointClass)) +#define NM_IS_ACCESS_POINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_ACCESS_POINT)) +#define NM_IS_ACCESS_POINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_ACCESS_POINT)) +#define NM_ACCESS_POINT_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_ACCESS_POINT, NMAccessPointClass)) + +#define NM_ACCESS_POINT_FLAGS "flags" +#define NM_ACCESS_POINT_WPA_FLAGS "wpa-flags" +#define NM_ACCESS_POINT_RSN_FLAGS "rsn-flags" +#define NM_ACCESS_POINT_SSID "ssid" +#define NM_ACCESS_POINT_BSSID "bssid" +#define NM_ACCESS_POINT_FREQUENCY "frequency" +#define NM_ACCESS_POINT_MODE "mode" +#define NM_ACCESS_POINT_MAX_BITRATE "max-bitrate" +#define NM_ACCESS_POINT_STRENGTH "strength" +#define NM_ACCESS_POINT_LAST_SEEN "last-seen" + +/* DEPRECATED */ +#define NM_ACCESS_POINT_HW_ADDRESS "hw-address" + +/** + * NMAccessPoint: + */ +typedef struct _NMAccessPointClass NMAccessPointClass; + +GType nm_access_point_get_type(void); + +NM80211ApFlags nm_access_point_get_flags(NMAccessPoint *ap); +NM80211ApSecurityFlags nm_access_point_get_wpa_flags(NMAccessPoint *ap); +NM80211ApSecurityFlags nm_access_point_get_rsn_flags(NMAccessPoint *ap); +GBytes * nm_access_point_get_ssid(NMAccessPoint *ap); +const char * nm_access_point_get_bssid(NMAccessPoint *ap); +guint32 nm_access_point_get_frequency(NMAccessPoint *ap); +NM80211Mode nm_access_point_get_mode(NMAccessPoint *ap); +guint32 nm_access_point_get_max_bitrate(NMAccessPoint *ap); +guint8 nm_access_point_get_strength(NMAccessPoint *ap); +NM_AVAILABLE_IN_1_2 +int nm_access_point_get_last_seen(NMAccessPoint *ap); + +GPtrArray *nm_access_point_filter_connections(NMAccessPoint *ap, const GPtrArray *connections); + +gboolean nm_access_point_connection_valid(NMAccessPoint *ap, NMConnection *connection); + +G_END_DECLS + +#endif /* __NM_ACCESS_POINT_H__ */ diff --git a/src/libnm-client-public/nm-active-connection.h b/src/libnm-client-public/nm-active-connection.h new file mode 100644 index 00000000..44b715c7 --- /dev/null +++ b/src/libnm-client-public/nm-active-connection.h @@ -0,0 +1,75 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2014 Red Hat, Inc. + * Copyright (C) 2008 Novell, Inc. + */ + +#ifndef __NM_ACTIVE_CONNECTION_H__ +#define __NM_ACTIVE_CONNECTION_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_ACTIVE_CONNECTION (nm_active_connection_get_type()) +#define NM_ACTIVE_CONNECTION(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnection)) +#define NM_ACTIVE_CONNECTION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionClass)) +#define NM_IS_ACTIVE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_ACTIVE_CONNECTION)) +#define NM_IS_ACTIVE_CONNECTION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_ACTIVE_CONNECTION)) +#define NM_ACTIVE_CONNECTION_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionClass)) + +#define NM_ACTIVE_CONNECTION_CONNECTION "connection" +#define NM_ACTIVE_CONNECTION_ID "id" +#define NM_ACTIVE_CONNECTION_UUID "uuid" +#define NM_ACTIVE_CONNECTION_TYPE "type" +#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT_PATH "specific-object-path" +#define NM_ACTIVE_CONNECTION_DEVICES "devices" +#define NM_ACTIVE_CONNECTION_STATE "state" +#define NM_ACTIVE_CONNECTION_STATE_FLAGS "state-flags" +#define NM_ACTIVE_CONNECTION_DEFAULT "default" +#define NM_ACTIVE_CONNECTION_IP4_CONFIG "ip4-config" +#define NM_ACTIVE_CONNECTION_DHCP4_CONFIG "dhcp4-config" +#define NM_ACTIVE_CONNECTION_DEFAULT6 "default6" +#define NM_ACTIVE_CONNECTION_IP6_CONFIG "ip6-config" +#define NM_ACTIVE_CONNECTION_DHCP6_CONFIG "dhcp6-config" +#define NM_ACTIVE_CONNECTION_VPN "vpn" +#define NM_ACTIVE_CONNECTION_MASTER "master" + +/** + * NMActiveConnection: + */ +typedef struct _NMActiveConnectionClass NMActiveConnectionClass; + +GType nm_active_connection_get_type(void); + +NMRemoteConnection *nm_active_connection_get_connection(NMActiveConnection *connection); +const char * nm_active_connection_get_id(NMActiveConnection *connection); +const char * nm_active_connection_get_uuid(NMActiveConnection *connection); +const char * nm_active_connection_get_connection_type(NMActiveConnection *connection); +const char * nm_active_connection_get_specific_object_path(NMActiveConnection *connection); +const GPtrArray * nm_active_connection_get_devices(NMActiveConnection *connection); +NMActiveConnectionState nm_active_connection_get_state(NMActiveConnection *connection); +NM_AVAILABLE_IN_1_10 +NMActivationStateFlags nm_active_connection_get_state_flags(NMActiveConnection *connection); +NM_AVAILABLE_IN_1_8 +NMActiveConnectionStateReason nm_active_connection_get_state_reason(NMActiveConnection *connection); +NMDevice * nm_active_connection_get_master(NMActiveConnection *connection); +gboolean nm_active_connection_get_default(NMActiveConnection *connection); +NMIPConfig * nm_active_connection_get_ip4_config(NMActiveConnection *connection); +NMDhcpConfig * nm_active_connection_get_dhcp4_config(NMActiveConnection *connection); +gboolean nm_active_connection_get_default6(NMActiveConnection *connection); +NMIPConfig * nm_active_connection_get_ip6_config(NMActiveConnection *connection); +NMDhcpConfig * nm_active_connection_get_dhcp6_config(NMActiveConnection *connection); +gboolean nm_active_connection_get_vpn(NMActiveConnection *connection); + +G_END_DECLS + +#endif /* __NM_ACTIVE_CONNECTION_H__ */ diff --git a/src/libnm-client-public/nm-autoptr.h b/src/libnm-client-public/nm-autoptr.h new file mode 100644 index 00000000..f37e2cfc --- /dev/null +++ b/src/libnm-client-public/nm-autoptr.h @@ -0,0 +1,122 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2018 Red Hat, Inc. + */ + +#ifndef __NM_AUTOPTR_H__ +#define __NM_AUTOPTR_H__ + +/* + * Note that you might use this header with older versions of libnm + * that do not yet ship this header. In that case, copy the header + * into your source tree. + */ + +#include <glib.h> +#include <NetworkManager.h> + +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMClient, g_object_unref) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMAccessPoint, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMActiveConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMCheckpoint, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDevice, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDhcpConfig, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMIPConfig, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMObject, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMRemoteConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSetting, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSimpleConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMWifiP2PPeer, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMWimaxNsp, g_object_unref) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDevice6Lowpan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceAdsl, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceBond, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceBridge, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceBt, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceDummy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceEthernet, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceGeneric, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceIPTunnel, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceInfiniband, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceMacsec, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceMacvlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceModem, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOlpcMesh, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOvsBridge, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOvsInterface, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOvsPort, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDevicePpp, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceTeam, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceTun, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceVeth, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceVlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceVxlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWifi, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWifiP2P, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWimax, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWireGuard, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWpan, g_object_unref) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSetting6Lowpan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSetting8021x, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingAdsl, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBluetooth, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBond, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBridge, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBridgePort, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingCdma, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingDcb, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingDummy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingEthtool, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingGeneric, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingGsm, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIP4Config, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIP6Config, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIPConfig, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIPTunnel, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingInfiniband, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMacsec, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMacvlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMatch, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOlpcMesh, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsBridge, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsInterface, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsPatch, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsPort, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingPpp, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingPppoe, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingProxy, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingSerial, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingSriov, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTCConfig, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTeam, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTeamPort, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTun, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingUser, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVeth, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVpn, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVxlan, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWifiP2P, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWimax, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWired, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWireGuard, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWireless, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWirelessSecurity, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWpan, g_object_unref) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnConnection, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnEditor, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnEditorPlugin, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnPluginInfo, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnServicePlugin, g_object_unref) + +#endif + +#endif /* __NM_AUTOPTR_H__ */ diff --git a/src/libnm-client-public/nm-checkpoint.h b/src/libnm-client-public/nm-checkpoint.h new file mode 100644 index 00000000..3bc28f6f --- /dev/null +++ b/src/libnm-client-public/nm-checkpoint.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017 Red Hat, Inc. + */ + +#ifndef __NM_CHECKPOINT_H__ +#define __NM_CHECKPOINT_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_CHECKPOINT (nm_checkpoint_get_type()) +#define NM_CHECKPOINT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_CHECKPOINT, NMCheckpoint)) +#define NM_CHECKPOINT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_CHECKPOINT, NMCheckpointClass)) +#define NM_IS_CHECKPOINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_CHECKPOINT)) +#define NM_IS_CHECKPOINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_CHECKPOINT)) +#define NM_CHECKPOINT_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_CHECKPOINT, NMCheckpointClass)) + +#define NM_CHECKPOINT_DEVICES "devices" +#define NM_CHECKPOINT_CREATED "created" +#define NM_CHECKPOINT_ROLLBACK_TIMEOUT "rollback-timeout" + +/** + * NMCheckpoint: + */ +typedef struct _NMCheckpointClass NMCheckpointClass; + +GType nm_checkpoint_get_type(void); + +NM_AVAILABLE_IN_1_12 +const GPtrArray *nm_checkpoint_get_devices(NMCheckpoint *checkpoint); +NM_AVAILABLE_IN_1_12 +gint64 nm_checkpoint_get_created(NMCheckpoint *checkpoint); +NM_AVAILABLE_IN_1_12 +guint32 nm_checkpoint_get_rollback_timeout(NMCheckpoint *checkpoint); + +G_END_DECLS + +#endif /* __NM_CHECKPOINT_H__ */ diff --git a/src/libnm-client-public/nm-client.h b/src/libnm-client-public/nm-client.h new file mode 100644 index 00000000..0145c5f4 --- /dev/null +++ b/src/libnm-client-public/nm-client.h @@ -0,0 +1,496 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2014 Red Hat, Inc. + */ + +#ifndef __NM_CLIENT_H__ +#define __NM_CLIENT_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-types.h" + +G_BEGIN_DECLS + +/** + * NMClientInstanceFlags: + * @NM_CLIENT_INSTANCE_FLAGS_NONE: special value to indicate no flags. + * @NM_CLIENT_INSTANCE_FLAGS_NO_AUTO_FETCH_PERMISSIONS: by default, NMClient + * will fetch the permissions via "GetPermissions" and refetch them when + * "CheckPermissions" signal gets received. By setting this flag, this behavior + * can be disabled. You can toggle this flag to enable and disable automatic + * fetching of the permissions. Watch also nm_client_get_permissions_state() + * to know whether the permissions are up to date. + * + * Since: 1.24 + */ +typedef enum { /*< flags >*/ + NM_CLIENT_INSTANCE_FLAGS_NONE = 0, + NM_CLIENT_INSTANCE_FLAGS_NO_AUTO_FETCH_PERMISSIONS = 1, +} NMClientInstanceFlags; + +#define NM_TYPE_CLIENT (nm_client_get_type()) +#define NM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_CLIENT, NMClient)) +#define NM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_CLIENT, NMClientClass)) +#define NM_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_CLIENT)) +#define NM_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_CLIENT)) +#define NM_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_CLIENT, NMClientClass)) + +#define NM_CLIENT_VERSION "version" +#define NM_CLIENT_STATE "state" +#define NM_CLIENT_STARTUP "startup" +#define NM_CLIENT_NM_RUNNING "nm-running" +#define NM_CLIENT_DBUS_CONNECTION "dbus-connection" +#define NM_CLIENT_DBUS_NAME_OWNER "dbus-name-owner" +#define NM_CLIENT_INSTANCE_FLAGS "instance-flags" + +_NM_DEPRECATED_SYNC_WRITABLE_PROPERTY +#define NM_CLIENT_NETWORKING_ENABLED "networking-enabled" + +_NM_DEPRECATED_SYNC_WRITABLE_PROPERTY +#define NM_CLIENT_WIRELESS_ENABLED "wireless-enabled" +_NM_DEPRECATED_SYNC_WRITABLE_PROPERTY +#define NM_CLIENT_WWAN_ENABLED "wwan-enabled" +_NM_DEPRECATED_SYNC_WRITABLE_PROPERTY +#define NM_CLIENT_WIMAX_ENABLED "wimax-enabled" + +#define NM_CLIENT_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled" +#define NM_CLIENT_WWAN_HARDWARE_ENABLED "wwan-hardware-enabled" +#define NM_CLIENT_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled" + +#define NM_CLIENT_ACTIVE_CONNECTIONS "active-connections" +#define NM_CLIENT_CONNECTIVITY "connectivity" +#define NM_CLIENT_CONNECTIVITY_CHECK_URI "connectivity-check-uri" +#define NM_CLIENT_CONNECTIVITY_CHECK_AVAILABLE "connectivity-check-available" + +_NM_DEPRECATED_SYNC_WRITABLE_PROPERTY +#define NM_CLIENT_CONNECTIVITY_CHECK_ENABLED "connectivity-check-enabled" + +#define NM_CLIENT_PRIMARY_CONNECTION "primary-connection" +#define NM_CLIENT_ACTIVATING_CONNECTION "activating-connection" +#define NM_CLIENT_DEVICES "devices" +#define NM_CLIENT_ALL_DEVICES "all-devices" +#define NM_CLIENT_CONNECTIONS "connections" +#define NM_CLIENT_HOSTNAME "hostname" +#define NM_CLIENT_CAN_MODIFY "can-modify" +#define NM_CLIENT_METERED "metered" +#define NM_CLIENT_DNS_MODE "dns-mode" +#define NM_CLIENT_DNS_RC_MANAGER "dns-rc-manager" +#define NM_CLIENT_DNS_CONFIGURATION "dns-configuration" +#define NM_CLIENT_CHECKPOINTS "checkpoints" +#define NM_CLIENT_CAPABILITIES "capabilities" +#define NM_CLIENT_PERMISSIONS_STATE "permissions-state" + +#define NM_CLIENT_DEVICE_ADDED "device-added" +#define NM_CLIENT_DEVICE_REMOVED "device-removed" +#define NM_CLIENT_ANY_DEVICE_ADDED "any-device-added" +#define NM_CLIENT_ANY_DEVICE_REMOVED "any-device-removed" +#define NM_CLIENT_PERMISSION_CHANGED "permission-changed" +#define NM_CLIENT_CONNECTION_ADDED "connection-added" +#define NM_CLIENT_CONNECTION_REMOVED "connection-removed" +#define NM_CLIENT_ACTIVE_CONNECTION_ADDED "active-connection-added" +#define NM_CLIENT_ACTIVE_CONNECTION_REMOVED "active-connection-removed" + +/** + * NMClientError: + * @NM_CLIENT_ERROR_FAILED: unknown or unclassified error + * @NM_CLIENT_ERROR_MANAGER_NOT_RUNNING: an operation that requires NetworkManager + * failed because NetworkManager is not running + * @NM_CLIENT_ERROR_OBJECT_CREATION_FAILED: NetworkManager claimed that an + * operation succeeded, but the object that was allegedly created (eg, + * #NMRemoteConnection, #NMActiveConnection) was apparently destroyed before + * #NMClient could create a representation of it. + * + * Describes errors that may result from operations involving a #NMClient. + * + * D-Bus operations may also return errors from other domains, including + * #NMManagerError, #NMSettingsError, #NMAgentManagerError, and #NMConnectionError. + **/ +typedef enum { + NM_CLIENT_ERROR_FAILED = 0, + NM_CLIENT_ERROR_MANAGER_NOT_RUNNING, + NM_CLIENT_ERROR_OBJECT_CREATION_FAILED, +} NMClientError; + +#define NM_CLIENT_ERROR nm_client_error_quark() +GQuark nm_client_error_quark(void); + +/* DNS stuff */ + +typedef struct NMDnsEntry NMDnsEntry; + +NM_AVAILABLE_IN_1_6 +GType nm_dns_entry_get_type(void); +NM_AVAILABLE_IN_1_6 +void nm_dns_entry_unref(NMDnsEntry *entry); +NM_AVAILABLE_IN_1_6 +const char *nm_dns_entry_get_interface(NMDnsEntry *entry); +NM_AVAILABLE_IN_1_6 +const char *const *nm_dns_entry_get_nameservers(NMDnsEntry *entry); +NM_AVAILABLE_IN_1_6 +const char *const *nm_dns_entry_get_domains(NMDnsEntry *entry); +NM_AVAILABLE_IN_1_6 +int nm_dns_entry_get_priority(NMDnsEntry *entry); +NM_AVAILABLE_IN_1_6 +gboolean nm_dns_entry_get_vpn(NMDnsEntry *entry); + +/** + * NMClient: + * + * NMClient contains a cache of the objects of NetworkManager's D-Bus API. + * It uses #GMainContext and #GDBusConnection for that and registers to + * D-Bus signals. That means, when iterating the associated #GMainContext, + * D-Bus signals gets processed and the #NMClient instance updates and + * emits #GObject signals. + */ +typedef struct _NMClientClass NMClientClass; + +GType nm_client_get_type(void); + +NMClient *nm_client_new(GCancellable *cancellable, GError **error); + +void +nm_client_new_async(GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); +NMClient *nm_client_new_finish(GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_24 +NMClientInstanceFlags nm_client_get_instance_flags(NMClient *self); + +NM_AVAILABLE_IN_1_22 +GDBusConnection *nm_client_get_dbus_connection(NMClient *client); + +NM_AVAILABLE_IN_1_22 +GMainContext *nm_client_get_main_context(NMClient *self); + +NM_AVAILABLE_IN_1_22 +GObject *nm_client_get_context_busy_watcher(NMClient *self); + +NM_AVAILABLE_IN_1_22 +const char *nm_client_get_dbus_name_owner(NMClient *client); + +const char *nm_client_get_version(NMClient *client); +NMState nm_client_get_state(NMClient *client); +gboolean nm_client_get_startup(NMClient *client); +gboolean nm_client_get_nm_running(NMClient *client); + +NMObject *nm_client_get_object_by_path(NMClient *client, const char *dbus_path); + +NM_AVAILABLE_IN_1_22 +NMMetered nm_client_get_metered(NMClient *client); + +gboolean nm_client_networking_get_enabled(NMClient *client); + +NM_AVAILABLE_IN_1_24 +const guint32 *nm_client_get_capabilities(NMClient *client, gsize *length); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_client_networking_set_enabled(NMClient *client, gboolean enabled, GError **error); + +gboolean nm_client_wireless_get_enabled(NMClient *client); + +_NM_DEPRECATED_SYNC_METHOD +void nm_client_wireless_set_enabled(NMClient *client, gboolean enabled); + +gboolean nm_client_wireless_hardware_get_enabled(NMClient *client); + +gboolean nm_client_wwan_get_enabled(NMClient *client); + +_NM_DEPRECATED_SYNC_METHOD +void nm_client_wwan_set_enabled(NMClient *client, gboolean enabled); + +gboolean nm_client_wwan_hardware_get_enabled(NMClient *client); + +NM_DEPRECATED_IN_1_22 +gboolean nm_client_wimax_get_enabled(NMClient *client); + +NM_DEPRECATED_IN_1_22 +_NM_DEPRECATED_SYNC_METHOD +void nm_client_wimax_set_enabled(NMClient *client, gboolean enabled); + +NM_DEPRECATED_IN_1_22 +gboolean nm_client_wimax_hardware_get_enabled(NMClient *client); + +NM_AVAILABLE_IN_1_10 +gboolean nm_client_connectivity_check_get_available(NMClient *client); + +NM_AVAILABLE_IN_1_10 +gboolean nm_client_connectivity_check_get_enabled(NMClient *client); + +NM_AVAILABLE_IN_1_10 +_NM_DEPRECATED_SYNC_METHOD +void nm_client_connectivity_check_set_enabled(NMClient *client, gboolean enabled); + +NM_AVAILABLE_IN_1_20 +const char *nm_client_connectivity_check_get_uri(NMClient *client); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_client_get_logging(NMClient *client, char **level, char **domains, GError **error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean +nm_client_set_logging(NMClient *client, const char *level, const char *domains, GError **error); + +NMClientPermissionResult nm_client_get_permission_result(NMClient * client, + NMClientPermission permission); + +NM_AVAILABLE_IN_1_24 +NMTernary nm_client_get_permissions_state(NMClient *self); + +NMConnectivityState nm_client_get_connectivity(NMClient *client); + +_NM_DEPRECATED_SYNC_METHOD +NM_DEPRECATED_IN_1_22 +NMConnectivityState +nm_client_check_connectivity(NMClient *client, GCancellable *cancellable, GError **error); + +void nm_client_check_connectivity_async(NMClient * client, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NMConnectivityState +nm_client_check_connectivity_finish(NMClient *client, GAsyncResult *result, GError **error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_client_save_hostname(NMClient * client, + const char * hostname, + GCancellable *cancellable, + GError ** error); + +void nm_client_save_hostname_async(NMClient * client, + const char * hostname, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_client_save_hostname_finish(NMClient *client, GAsyncResult *result, GError **error); + +/* Devices */ + +const GPtrArray *nm_client_get_devices(NMClient *client); +NM_AVAILABLE_IN_1_2 +const GPtrArray *nm_client_get_all_devices(NMClient *client); +NMDevice * nm_client_get_device_by_path(NMClient *client, const char *object_path); +NMDevice * nm_client_get_device_by_iface(NMClient *client, const char *iface); + +/* Active Connections */ + +const GPtrArray *nm_client_get_active_connections(NMClient *client); + +NMActiveConnection *nm_client_get_primary_connection(NMClient *client); +NMActiveConnection *nm_client_get_activating_connection(NMClient *client); + +void nm_client_activate_connection_async(NMClient * client, + NMConnection * connection, + NMDevice * device, + const char * specific_object, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NMActiveConnection * +nm_client_activate_connection_finish(NMClient *client, GAsyncResult *result, GError **error); + +void nm_client_add_and_activate_connection_async(NMClient * client, + NMConnection * partial, + NMDevice * device, + const char * specific_object, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NMActiveConnection *nm_client_add_and_activate_connection_finish(NMClient * client, + GAsyncResult *result, + GError ** error); + +NM_AVAILABLE_IN_1_16 +void nm_client_add_and_activate_connection2(NMClient * client, + NMConnection * partial, + NMDevice * device, + const char * specific_object, + GVariant * options, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_16 +NMActiveConnection *nm_client_add_and_activate_connection2_finish(NMClient * client, + GAsyncResult *result, + GVariant ** out_result, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_client_deactivate_connection(NMClient * client, + NMActiveConnection *active, + GCancellable * cancellable, + GError ** error); + +void nm_client_deactivate_connection_async(NMClient * client, + NMActiveConnection *active, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean +nm_client_deactivate_connection_finish(NMClient *client, GAsyncResult *result, GError **error); + +/* Connections */ + +const GPtrArray *nm_client_get_connections(NMClient *client); + +NMRemoteConnection *nm_client_get_connection_by_id(NMClient *client, const char *id); +NMRemoteConnection *nm_client_get_connection_by_path(NMClient *client, const char *path); +NMRemoteConnection *nm_client_get_connection_by_uuid(NMClient *client, const char *uuid); + +void nm_client_add_connection_async(NMClient * client, + NMConnection * connection, + gboolean save_to_disk, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NMRemoteConnection * +nm_client_add_connection_finish(NMClient *client, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_20 +void nm_client_add_connection2(NMClient * client, + GVariant * settings, + NMSettingsAddConnection2Flags flags, + GVariant * args, + gboolean ignore_out_result, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_AVAILABLE_IN_1_20 +NMRemoteConnection *nm_client_add_connection2_finish(NMClient * client, + GAsyncResult *result, + GVariant ** out_result, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_client_load_connections(NMClient * client, + char ** filenames, + char *** failures, + GCancellable *cancellable, + GError ** error); + +void nm_client_load_connections_async(NMClient * client, + char ** filenames, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_client_load_connections_finish(NMClient * client, + char *** failures, + GAsyncResult *result, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_client_reload_connections(NMClient *client, GCancellable *cancellable, GError **error); + +void nm_client_reload_connections_async(NMClient * client, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean +nm_client_reload_connections_finish(NMClient *client, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_6 +const char *nm_client_get_dns_mode(NMClient *client); +NM_AVAILABLE_IN_1_6 +const char *nm_client_get_dns_rc_manager(NMClient *client); +NM_AVAILABLE_IN_1_6 +const GPtrArray *nm_client_get_dns_configuration(NMClient *client); + +NM_AVAILABLE_IN_1_12 +const GPtrArray *nm_client_get_checkpoints(NMClient *client); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_create(NMClient * client, + const GPtrArray * devices, + guint32 rollback_timeout, + NMCheckpointCreateFlags flags, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_12 +NMCheckpoint * +nm_client_checkpoint_create_finish(NMClient *client, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_destroy(NMClient * client, + const char * checkpoint_path, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_12 +gboolean +nm_client_checkpoint_destroy_finish(NMClient *client, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_rollback(NMClient * client, + const char * checkpoint_path, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_12 +GHashTable * +nm_client_checkpoint_rollback_finish(NMClient *client, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_12 +void nm_client_checkpoint_adjust_rollback_timeout(NMClient * client, + const char * checkpoint_path, + guint32 add_timeout, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_AVAILABLE_IN_1_12 +gboolean nm_client_checkpoint_adjust_rollback_timeout_finish(NMClient * client, + GAsyncResult *result, + GError ** error); + +NM_AVAILABLE_IN_1_22 +void nm_client_reload(NMClient * client, + NMManagerReloadFlags flags, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_22 +gboolean nm_client_reload_finish(NMClient *client, GAsyncResult *result, GError **error); + +/*****************************************************************************/ + +NM_AVAILABLE_IN_1_24 +void nm_client_dbus_call(NMClient * client, + const char * object_path, + const char * interface_name, + const char * method_name, + GVariant * parameters, + const GVariantType *reply_type, + int timeout_msec, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_AVAILABLE_IN_1_24 +GVariant *nm_client_dbus_call_finish(NMClient *client, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_24 +void nm_client_dbus_set_property(NMClient * client, + const char * object_path, + const char * interface_name, + const char * property_name, + GVariant * value, + int timeout_msec, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_AVAILABLE_IN_1_24 +gboolean nm_client_dbus_set_property_finish(NMClient *client, GAsyncResult *result, GError **error); + +/*****************************************************************************/ + +NM_AVAILABLE_IN_1_30 +void nm_utils_print(int output_mode, const char *msg); + +G_END_DECLS + +#endif /* __NM_CLIENT_H__ */ diff --git a/src/libnm-client-public/nm-device-6lowpan.h b/src/libnm-client-public/nm-device-6lowpan.h new file mode 100644 index 00000000..d46e6db4 --- /dev/null +++ b/src/libnm-client-public/nm-device-6lowpan.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2018 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_6LOWPAN_H__ +#define __NM_DEVICE_6LOWPAN_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_6LOWPAN (nm_device_6lowpan_get_type()) +#define NM_DEVICE_6LOWPAN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_6LOWPAN, NMDevice6Lowpan)) +#define NM_DEVICE_6LOWPAN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_6LOWPAN, NMDevice6LowpanClass)) +#define NM_IS_DEVICE_6LOWPAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_6LOWPAN)) +#define NM_IS_DEVICE_6LOWPAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_6LOWPAN)) +#define NM_DEVICE_6LOWPAN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_6LOWPAN, NMDevice6LowpanClass)) + +#define NM_DEVICE_6LOWPAN_PARENT "parent" +#define NM_DEVICE_6LOWPAN_HW_ADDRESS "hw-address" + +/** + * NMDevice6Lowpan: + */ +typedef struct _NMDevice6LowpanClass NMDevice6LowpanClass; + +NM_AVAILABLE_IN_1_14 +GType nm_device_6lowpan_get_type(void); + +NM_AVAILABLE_IN_1_14 +NMDevice *nm_device_6lowpan_get_parent(NMDevice6Lowpan *device); + +NM_AVAILABLE_IN_1_14 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_6lowpan_get_hw_address(NMDevice6Lowpan *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_6LOWPAN_H__ */ diff --git a/src/libnm-client-public/nm-device-adsl.h b/src/libnm-client-public/nm-device-adsl.h new file mode 100644 index 00000000..92eaf369 --- /dev/null +++ b/src/libnm-client-public/nm-device-adsl.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2011 Pantelis Koukousoulas <pktoss@gmail.com> + */ + +#ifndef __NM_DEVICE_ADSL_H__ +#define __NM_DEVICE_ADSL_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_ADSL (nm_device_adsl_get_type()) +#define NM_DEVICE_ADSL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_ADSL, NMDeviceAdsl)) +#define NM_DEVICE_ADSL_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_ADSL, NMDeviceAdslClass)) +#define NM_IS_DEVICE_ADSL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_ADSL)) +#define NM_IS_DEVICE_ADSL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_ADSL)) +#define NM_DEVICE_ADSL_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_ADSL, NMDeviceAdslClass)) + +#define NM_DEVICE_ADSL_CARRIER "carrier" + +/** + * NMDeviceAdsl: + */ +typedef struct _NMDeviceAdslClass NMDeviceAdslClass; + +GType nm_device_adsl_get_type(void); + +gboolean nm_device_adsl_get_carrier(NMDeviceAdsl *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_ADSL_H__ */ diff --git a/src/libnm-client-public/nm-device-bond.h b/src/libnm-client-public/nm-device-bond.h new file mode 100644 index 00000000..91c023a4 --- /dev/null +++ b/src/libnm-client-public/nm-device-bond.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2012 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_BOND_H__ +#define __NM_DEVICE_BOND_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_BOND (nm_device_bond_get_type()) +#define NM_DEVICE_BOND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_BOND, NMDeviceBond)) +#define NM_DEVICE_BOND_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_BOND, NMDeviceBondClass)) +#define NM_IS_DEVICE_BOND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_BOND)) +#define NM_IS_DEVICE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_BOND)) +#define NM_DEVICE_BOND_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_BOND, NMDeviceBondClass)) + +#define NM_DEVICE_BOND_HW_ADDRESS "hw-address" +#define NM_DEVICE_BOND_CARRIER "carrier" +#define NM_DEVICE_BOND_SLAVES "slaves" + +/** + * NMDeviceBond: + */ +typedef struct _NMDeviceBondClass NMDeviceBondClass; + +GType nm_device_bond_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_bond_get_hw_address(NMDeviceBond *device); + +gboolean nm_device_bond_get_carrier(NMDeviceBond *device); +const GPtrArray *nm_device_bond_get_slaves(NMDeviceBond *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_BOND_H__ */ diff --git a/src/libnm-client-public/nm-device-bridge.h b/src/libnm-client-public/nm-device-bridge.h new file mode 100644 index 00000000..a6c50658 --- /dev/null +++ b/src/libnm-client-public/nm-device-bridge.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2012 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_BRIDGE_H__ +#define __NM_DEVICE_BRIDGE_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_BRIDGE (nm_device_bridge_get_type()) +#define NM_DEVICE_BRIDGE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_BRIDGE, NMDeviceBridge)) +#define NM_DEVICE_BRIDGE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_BRIDGE, NMDeviceBridgeClass)) +#define NM_IS_DEVICE_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_BRIDGE)) +#define NM_IS_DEVICE_BRIDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_BRIDGE)) +#define NM_DEVICE_BRIDGE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_BRIDGE, NMDeviceBridgeClass)) + +#define NM_DEVICE_BRIDGE_HW_ADDRESS "hw-address" +#define NM_DEVICE_BRIDGE_CARRIER "carrier" +#define NM_DEVICE_BRIDGE_SLAVES "slaves" + +/** + * NMDeviceBridge: + */ +typedef struct _NMDeviceBridgeClass NMDeviceBridgeClass; + +GType nm_device_bridge_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_bridge_get_hw_address(NMDeviceBridge *device); + +gboolean nm_device_bridge_get_carrier(NMDeviceBridge *device); +const GPtrArray *nm_device_bridge_get_slaves(NMDeviceBridge *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_BRIDGE_H__ */ diff --git a/src/libnm-client-public/nm-device-bt.h b/src/libnm-client-public/nm-device-bt.h new file mode 100644 index 00000000..a7cfc796 --- /dev/null +++ b/src/libnm-client-public/nm-device-bt.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2008 - 2012 Red Hat, Inc. + * Copyright (C) 2008 Novell, Inc. + */ + +#ifndef __NM_DEVICE_BT_H__ +#define __NM_DEVICE_BT_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_BT (nm_device_bt_get_type()) +#define NM_DEVICE_BT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_BT, NMDeviceBt)) +#define NM_DEVICE_BT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_BT, NMDeviceBtClass)) +#define NM_IS_DEVICE_BT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_BT)) +#define NM_IS_DEVICE_BT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_BT)) +#define NM_DEVICE_BT_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_BT, NMDeviceBtClass)) + +#define NM_DEVICE_BT_HW_ADDRESS "hw-address" +#define NM_DEVICE_BT_NAME "name" +#define NM_DEVICE_BT_CAPABILITIES "bt-capabilities" + +/** + * NMDeviceBt: + */ +typedef struct _NMDeviceBtClass NMDeviceBtClass; + +GType nm_device_bt_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_bt_get_hw_address(NMDeviceBt *device); + +const char *nm_device_bt_get_name(NMDeviceBt *device); + +NMBluetoothCapabilities nm_device_bt_get_capabilities(NMDeviceBt *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_BT_H__ */ diff --git a/src/libnm-client-public/nm-device-dummy.h b/src/libnm-client-public/nm-device-dummy.h new file mode 100644 index 00000000..ad34b65e --- /dev/null +++ b/src/libnm-client-public/nm-device-dummy.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_DUMMY_H__ +#define __NM_DEVICE_DUMMY_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_DUMMY (nm_device_dummy_get_type()) +#define NM_DEVICE_DUMMY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_DUMMY, NMDeviceDummy)) +#define NM_DEVICE_DUMMY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_DUMMY, NMDeviceDummyClass)) +#define NM_IS_DEVICE_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_DUMMY)) +#define NM_IS_DEVICE_DUMMY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_DUMMY)) +#define NM_DEVICE_DUMMY_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_DUMMY, NMDeviceDummyClass)) + +#define NM_DEVICE_DUMMY_HW_ADDRESS "hw-address" + +/** + * NMDeviceDummy: + */ +typedef struct _NMDeviceDummyClass NMDeviceDummyClass; + +GType nm_device_dummy_get_type(void); + +NM_AVAILABLE_IN_1_10 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_dummy_get_hw_address(NMDeviceDummy *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_DUMMY_H__ */ diff --git a/src/libnm-client-public/nm-device-ethernet.h b/src/libnm-client-public/nm-device-ethernet.h new file mode 100644 index 00000000..877930e6 --- /dev/null +++ b/src/libnm-client-public/nm-device-ethernet.h @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2012 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_ETHERNET_H__ +#define __NM_DEVICE_ETHERNET_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_ETHERNET (nm_device_ethernet_get_type()) +#define NM_DEVICE_ETHERNET(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernet)) +#define NM_DEVICE_ETHERNET_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass)) +#define NM_IS_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_ETHERNET)) +#define NM_IS_DEVICE_ETHERNET_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_ETHERNET)) +#define NM_DEVICE_ETHERNET_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass)) + +#define NM_DEVICE_ETHERNET_HW_ADDRESS "hw-address" +#define NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS "perm-hw-address" +#define NM_DEVICE_ETHERNET_SPEED "speed" +#define NM_DEVICE_ETHERNET_CARRIER "carrier" +#define NM_DEVICE_ETHERNET_S390_SUBCHANNELS "s390-subchannels" + +/** + * NMDeviceEthernet: + */ +typedef struct _NMDeviceEthernetClass NMDeviceEthernetClass; + +GType nm_device_ethernet_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_ethernet_get_hw_address(NMDeviceEthernet *device); + +const char *nm_device_ethernet_get_permanent_hw_address(NMDeviceEthernet *device); +guint32 nm_device_ethernet_get_speed(NMDeviceEthernet *device); +gboolean nm_device_ethernet_get_carrier(NMDeviceEthernet *device); +NM_AVAILABLE_IN_1_2 +const char *const *nm_device_ethernet_get_s390_subchannels(NMDeviceEthernet *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_ETHERNET_H__ */ diff --git a/src/libnm-client-public/nm-device-generic.h b/src/libnm-client-public/nm-device-generic.h new file mode 100644 index 00000000..5c1f3084 --- /dev/null +++ b/src/libnm-client-public/nm-device-generic.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2013 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_GENERIC_H__ +#define __NM_DEVICE_GENERIC_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_GENERIC (nm_device_generic_get_type()) +#define NM_DEVICE_GENERIC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_GENERIC, NMDeviceGeneric)) +#define NM_DEVICE_GENERIC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_GENERIC, NMDeviceGenericClass)) +#define NM_IS_DEVICE_GENERIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_GENERIC)) +#define NM_IS_DEVICE_GENERIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_GENERIC)) +#define NM_DEVICE_GENERIC_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_GENERIC, NMDeviceGenericClass)) + +#define NM_DEVICE_GENERIC_HW_ADDRESS "hw-address" +#define NM_DEVICE_GENERIC_TYPE_DESCRIPTION "type-description" + +/** + * NMDeviceGeneric: + */ +typedef struct _NMDeviceGenericClass NMDeviceGenericClass; + +GType nm_device_generic_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_generic_get_hw_address(NMDeviceGeneric *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_GENERIC_H__ */ diff --git a/src/libnm-client-public/nm-device-infiniband.h b/src/libnm-client-public/nm-device-infiniband.h new file mode 100644 index 00000000..be9a26e5 --- /dev/null +++ b/src/libnm-client-public/nm-device-infiniband.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2011 - 2012 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_INFINIBAND_H__ +#define __NM_DEVICE_INFINIBAND_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_INFINIBAND (nm_device_infiniband_get_type()) +#define NM_DEVICE_INFINIBAND(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfiniband)) +#define NM_DEVICE_INFINIBAND_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandClass)) +#define NM_IS_DEVICE_INFINIBAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_INFINIBAND)) +#define NM_IS_DEVICE_INFINIBAND_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_INFINIBAND)) +#define NM_DEVICE_INFINIBAND_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_INFINIBAND, NMDeviceInfinibandClass)) + +#define NM_DEVICE_INFINIBAND_HW_ADDRESS "hw-address" +#define NM_DEVICE_INFINIBAND_CARRIER "carrier" + +/** + * NMDeviceInfiniband: + */ +typedef struct _NMDeviceInfinibandClass NMDeviceInfinibandClass; + +GType nm_device_infiniband_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_infiniband_get_hw_address(NMDeviceInfiniband *device); + +gboolean nm_device_infiniband_get_carrier(NMDeviceInfiniband *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_INFINIBAND_H__ */ diff --git a/src/libnm-client-public/nm-device-ip-tunnel.h b/src/libnm-client-public/nm-device-ip-tunnel.h new file mode 100644 index 00000000..0d9c3e55 --- /dev/null +++ b/src/libnm-client-public/nm-device-ip-tunnel.h @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2015 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_IP_TUNNEL_H__ +#define __NM_DEVICE_IP_TUNNEL_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" +#include "nm-setting-ip-tunnel.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_IP_TUNNEL (nm_device_ip_tunnel_get_type()) +#define NM_DEVICE_IP_TUNNEL(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_IP_TUNNEL, NMDeviceIPTunnel)) +#define NM_DEVICE_IP_TUNNEL_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_IP_TUNNEL, NMDeviceIPTunnelClass)) +#define NM_IS_DEVICE_IP_TUNNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_IP_TUNNEL)) +#define NM_IS_DEVICE_IP_TUNNEL_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_IP_TUNNEL)) +#define NM_DEVICE_IP_TUNNEL_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_IP_TUNNEL, NMDeviceIPTunnelClass)) + +#define NM_DEVICE_IP_TUNNEL_MODE "mode" +#define NM_DEVICE_IP_TUNNEL_PARENT "parent" +#define NM_DEVICE_IP_TUNNEL_LOCAL "local" +#define NM_DEVICE_IP_TUNNEL_REMOTE "remote" +#define NM_DEVICE_IP_TUNNEL_TTL "ttl" +#define NM_DEVICE_IP_TUNNEL_TOS "tos" +#define NM_DEVICE_IP_TUNNEL_PATH_MTU_DISCOVERY "path-mtu-discovery" +#define NM_DEVICE_IP_TUNNEL_INPUT_KEY "input-key" +#define NM_DEVICE_IP_TUNNEL_OUTPUT_KEY "output-key" +#define NM_DEVICE_IP_TUNNEL_ENCAPSULATION_LIMIT "encapsulation-limit" +#define NM_DEVICE_IP_TUNNEL_FLOW_LABEL "flow-label" +#define NM_DEVICE_IP_TUNNEL_FLAGS "flags" + +/** + * NMDeviceIPTunnel: + */ +typedef struct _NMDeviceIPTunnelClass NMDeviceIPTunnelClass; + +NM_AVAILABLE_IN_1_2 +GType nm_device_ip_tunnel_get_type(void); + +NM_AVAILABLE_IN_1_2 +NMDevice *nm_device_ip_tunnel_get_parent(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +NMIPTunnelMode nm_device_ip_tunnel_get_mode(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +const char *nm_device_ip_tunnel_get_local(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +const char *nm_device_ip_tunnel_get_remote(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +guint8 nm_device_ip_tunnel_get_ttl(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +guint8 nm_device_ip_tunnel_get_tos(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_ip_tunnel_get_path_mtu_discovery(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +const char *nm_device_ip_tunnel_get_input_key(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +const char *nm_device_ip_tunnel_get_output_key(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +guint8 nm_device_ip_tunnel_get_encapsulation_limit(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_ip_tunnel_get_flow_label(NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_12 +NMIPTunnelFlags nm_device_ip_tunnel_get_flags(NMDeviceIPTunnel *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_IP_TUNNEL_H__ */ diff --git a/src/libnm-client-public/nm-device-macsec.h b/src/libnm-client-public/nm-device-macsec.h new file mode 100644 index 00000000..5a036601 --- /dev/null +++ b/src/libnm-client-public/nm-device-macsec.h @@ -0,0 +1,83 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_MACSEC_H__ +#define __NM_DEVICE_MACSEC_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_MACSEC (nm_device_macsec_get_type()) +#define NM_DEVICE_MACSEC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_MACSEC, NMDeviceMacsec)) +#define NM_DEVICE_MACSEC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_MACSEC, NMDeviceMacsecClass)) +#define NM_IS_DEVICE_MACSEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_MACSEC)) +#define NM_IS_DEVICE_MACSEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_MACSEC)) +#define NM_DEVICE_MACSEC_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_MACSEC, NMDeviceMacsecClass)) + +#define NM_DEVICE_MACSEC_PARENT "parent" +#define NM_DEVICE_MACSEC_HW_ADDRESS "hw-address" +#define NM_DEVICE_MACSEC_SCI "sci" +#define NM_DEVICE_MACSEC_ICV_LENGTH "icv-length" +#define NM_DEVICE_MACSEC_CIPHER_SUITE "cipher-suite" +#define NM_DEVICE_MACSEC_WINDOW "window" +#define NM_DEVICE_MACSEC_ENCODING_SA "encoding-sa" +#define NM_DEVICE_MACSEC_VALIDATION "validation" +#define NM_DEVICE_MACSEC_ENCRYPT "encrypt" +#define NM_DEVICE_MACSEC_PROTECT "protect" +#define NM_DEVICE_MACSEC_INCLUDE_SCI "include-sci" +#define NM_DEVICE_MACSEC_ES "es" +#define NM_DEVICE_MACSEC_SCB "scb" +#define NM_DEVICE_MACSEC_REPLAY_PROTECT "replay-protect" + +/** + * NMDeviceMacsec: + */ +typedef struct _NMDeviceMacsecClass NMDeviceMacsecClass; + +NM_AVAILABLE_IN_1_6 +GType nm_device_macsec_get_type(void); + +NM_AVAILABLE_IN_1_6 +NMDevice *nm_device_macsec_get_parent(NMDeviceMacsec *device); + +NM_AVAILABLE_IN_1_6 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_macsec_get_hw_address(NMDeviceMacsec *device); + +NM_AVAILABLE_IN_1_6 +guint64 nm_device_macsec_get_sci(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +guint8 nm_device_macsec_get_icv_length(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +guint64 nm_device_macsec_get_cipher_suite(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +guint nm_device_macsec_get_window(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +guint8 nm_device_macsec_get_encoding_sa(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +const char *nm_device_macsec_get_validation(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +gboolean nm_device_macsec_get_encrypt(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +gboolean nm_device_macsec_get_protect(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +gboolean nm_device_macsec_get_include_sci(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +gboolean nm_device_macsec_get_es(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +gboolean nm_device_macsec_get_scb(NMDeviceMacsec *device); +NM_AVAILABLE_IN_1_6 +gboolean nm_device_macsec_get_replay_protect(NMDeviceMacsec *device); +G_END_DECLS + +#endif /* __NM_DEVICE_MACSEC_H__ */ diff --git a/src/libnm-client-public/nm-device-macvlan.h b/src/libnm-client-public/nm-device-macvlan.h new file mode 100644 index 00000000..b8d27066 --- /dev/null +++ b/src/libnm-client-public/nm-device-macvlan.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2015 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_MACVLAN_H__ +#define __NM_DEVICE_MACVLAN_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_MACVLAN (nm_device_macvlan_get_type()) +#define NM_DEVICE_MACVLAN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_MACVLAN, NMDeviceMacvlan)) +#define NM_DEVICE_MACVLAN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_MACVLAN, NMDeviceMacvlanClass)) +#define NM_IS_DEVICE_MACVLAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_MACVLAN)) +#define NM_IS_DEVICE_MACVLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_MACVLAN)) +#define NM_DEVICE_MACVLAN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_MACVLAN, NMDeviceMacvlanClass)) + +#define NM_DEVICE_MACVLAN_PARENT "parent" +#define NM_DEVICE_MACVLAN_MODE "mode" +#define NM_DEVICE_MACVLAN_NO_PROMISC "no-promisc" +#define NM_DEVICE_MACVLAN_TAP "tap" +#define NM_DEVICE_MACVLAN_HW_ADDRESS "hw-address" + +/** + * NMDeviceMacvlan: + */ +typedef struct _NMDeviceMacvlanClass NMDeviceMacvlanClass; + +NM_AVAILABLE_IN_1_2 +GType nm_device_macvlan_get_type(void); + +NM_AVAILABLE_IN_1_2 +NMDevice *nm_device_macvlan_get_parent(NMDeviceMacvlan *device); +NM_AVAILABLE_IN_1_2 +const char *nm_device_macvlan_get_mode(NMDeviceMacvlan *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_macvlan_get_no_promisc(NMDeviceMacvlan *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_macvlan_get_tap(NMDeviceMacvlan *device); + +NM_AVAILABLE_IN_1_2 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_macvlan_get_hw_address(NMDeviceMacvlan *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_MACVLAN_H__ */ diff --git a/src/libnm-client-public/nm-device-modem.h b/src/libnm-client-public/nm-device-modem.h new file mode 100644 index 00000000..eced137a --- /dev/null +++ b/src/libnm-client-public/nm-device-modem.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2011 - 2012 Red Hat, Inc. + * Copyright (C) 2008 Novell, Inc. + */ + +#ifndef __NM_DEVICE_MODEM_H__ +#define __NM_DEVICE_MODEM_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_MODEM (nm_device_modem_get_type()) +#define NM_DEVICE_MODEM(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_MODEM, NMDeviceModem)) +#define NM_DEVICE_MODEM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_MODEM, NMDeviceModemClass)) +#define NM_IS_DEVICE_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_MODEM)) +#define NM_IS_DEVICE_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_MODEM)) +#define NM_DEVICE_MODEM_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_MODEM, NMDeviceModemClass)) + +#define NM_DEVICE_MODEM_MODEM_CAPABILITIES "modem-capabilities" +#define NM_DEVICE_MODEM_CURRENT_CAPABILITIES "current-capabilities" +#define NM_DEVICE_MODEM_DEVICE_ID "device-id" +#define NM_DEVICE_MODEM_OPERATOR_CODE "operator-code" +#define NM_DEVICE_MODEM_APN "apn" + +/** + * NMDeviceModem: + */ +typedef struct _NMDeviceModemClass NMDeviceModemClass; + +GType nm_device_modem_get_type(void); + +NMDeviceModemCapabilities nm_device_modem_get_modem_capabilities(NMDeviceModem *self); +NMDeviceModemCapabilities nm_device_modem_get_current_capabilities(NMDeviceModem *self); + +NM_AVAILABLE_IN_1_20 +const char *nm_device_modem_get_device_id(NMDeviceModem *self); + +NM_AVAILABLE_IN_1_20 +const char *nm_device_modem_get_operator_code(NMDeviceModem *self); + +NM_AVAILABLE_IN_1_20 +const char *nm_device_modem_get_apn(NMDeviceModem *self); + +G_END_DECLS + +#endif /* __NM_DEVICE_MODEM_H__ */ diff --git a/src/libnm-client-public/nm-device-olpc-mesh.h b/src/libnm-client-public/nm-device-olpc-mesh.h new file mode 100644 index 00000000..d8b835fa --- /dev/null +++ b/src/libnm-client-public/nm-device-olpc-mesh.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2012 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_OLPC_MESH_H__ +#define __NM_DEVICE_OLPC_MESH_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_OLPC_MESH (nm_device_olpc_mesh_get_type()) +#define NM_DEVICE_OLPC_MESH(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMesh)) +#define NM_DEVICE_OLPC_MESH_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshClass)) +#define NM_IS_DEVICE_OLPC_MESH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_OLPC_MESH)) +#define NM_IS_DEVICE_OLPC_MESH_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_OLPC_MESH)) +#define NM_DEVICE_OLPC_MESH_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_OLPC_MESH, NMDeviceOlpcMeshClass)) + +#define NM_DEVICE_OLPC_MESH_HW_ADDRESS "hw-address" +#define NM_DEVICE_OLPC_MESH_COMPANION "companion" +#define NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL "active-channel" + +/** + * NMDeviceOlpcMesh: + */ +typedef struct _NMDeviceOlpcMeshClass NMDeviceOlpcMeshClass; + +GType nm_device_olpc_mesh_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_olpc_mesh_get_hw_address(NMDeviceOlpcMesh *device); + +NMDeviceWifi *nm_device_olpc_mesh_get_companion(NMDeviceOlpcMesh *device); +guint32 nm_device_olpc_mesh_get_active_channel(NMDeviceOlpcMesh *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_OLPC_MESH_H__ */ diff --git a/src/libnm-client-public/nm-device-ovs-bridge.h b/src/libnm-client-public/nm-device-ovs-bridge.h new file mode 100644 index 00000000..50754e11 --- /dev/null +++ b/src/libnm-client-public/nm-device-ovs-bridge.h @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017, 2018 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_OVS_BRIDGE_H__ +#define __NM_DEVICE_OVS_BRIDGE_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_OVS_BRIDGE (nm_device_ovs_bridge_get_type()) +#define NM_DEVICE_OVS_BRIDGE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_OVS_BRIDGE, NMDeviceOvsBridge)) +#define NM_DEVICE_OVS_BRIDGE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_OVS_BRIDGE, NMDeviceOvsBridgeClass)) +#define NM_IS_DEVICE_OVS_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_OVS_BRIDGE)) +#define NM_IS_DEVICE_OVS_BRIDGE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_OVS_BRIDGE)) +#define NM_DEVICE_OVS_BRIDGE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_OVS_BRIDGE, NMDeviceOvsBridgeClass)) + +#define NM_DEVICE_OVS_BRIDGE_SLAVES "slaves" + +/** + * NMDeviceOvsBridge: + */ +typedef struct _NMDeviceOvsBridgeClass NMDeviceOvsBridgeClass; + +NM_AVAILABLE_IN_1_10 +GType nm_device_ovs_bridge_get_type(void); + +NM_AVAILABLE_IN_1_14 +const GPtrArray *nm_device_ovs_bridge_get_slaves(NMDeviceOvsBridge *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_OVS_BRIDGE_H__ */ diff --git a/src/libnm-client-public/nm-device-ovs-interface.h b/src/libnm-client-public/nm-device-ovs-interface.h new file mode 100644 index 00000000..6767ad4a --- /dev/null +++ b/src/libnm-client-public/nm-device-ovs-interface.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_OVS_INTERFACE_H__ +#define __NM_DEVICE_OVS_INTERFACE_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_OVS_INTERFACE (nm_device_ovs_interface_get_type()) +#define NM_DEVICE_OVS_INTERFACE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_OVS_INTERFACE, NMDeviceOvsInterface)) +#define NM_DEVICE_OVS_INTERFACE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_OVS_INTERFACE, NMDeviceOvsInterfaceClass)) +#define NM_IS_DEVICE_OVS_INTERFACE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_OVS_INTERFACE)) +#define NM_IS_DEVICE_OVS_INTERFACE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_OVS_INTERFACE)) +#define NM_DEVICE_OVS_INTERFACE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_OVS_INTERFACE, NMDeviceOvsInterfaceClass)) + +/** + * NMDeviceOvsInterface: + */ +typedef struct _NMDeviceOvsInterfaceClass NMDeviceOvsInterfaceClass; + +NM_AVAILABLE_IN_1_10 +GType nm_device_ovs_interface_get_type(void); + +G_END_DECLS + +#endif /* __NM_DEVICE_OVS_INTERFACE_H__ */ diff --git a/src/libnm-client-public/nm-device-ovs-port.h b/src/libnm-client-public/nm-device-ovs-port.h new file mode 100644 index 00000000..1f69641b --- /dev/null +++ b/src/libnm-client-public/nm-device-ovs-port.h @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017, 2018 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_OVS_PORT_H__ +#define __NM_DEVICE_OVS_PORT_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_OVS_PORT (nm_device_ovs_port_get_type()) +#define NM_DEVICE_OVS_PORT(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_OVS_PORT, NMDeviceOvsPort)) +#define NM_DEVICE_OVS_PORT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_OVS_PORT, NMDeviceOvsPortClass)) +#define NM_IS_DEVICE_OVS_PORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_OVS_PORT)) +#define NM_IS_DEVICE_OVS_PORT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_OVS_PORT)) +#define NM_DEVICE_OVS_PORT_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_OVS_PORT, NMDeviceOvsPortClass)) + +#define NM_DEVICE_OVS_PORT_SLAVES "slaves" + +/** + * NMDeviceOvsPort: + */ +typedef struct _NMDeviceOvsPortClass NMDeviceOvsPortClass; + +NM_AVAILABLE_IN_1_10 +GType nm_device_ovs_port_get_type(void); + +NM_AVAILABLE_IN_1_14 +const GPtrArray *nm_device_ovs_port_get_slaves(NMDeviceOvsPort *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_OVS_PORT_H__ */ diff --git a/src/libnm-client-public/nm-device-ppp.h b/src/libnm-client-public/nm-device-ppp.h new file mode 100644 index 00000000..7bd282d7 --- /dev/null +++ b/src/libnm-client-public/nm-device-ppp.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2017 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_PPP_H__ +#define __NM_DEVICE_PPP_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_PPP (nm_device_ppp_get_type()) +#define NM_DEVICE_PPP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_PPP, NMDevicePpp)) +#define NM_DEVICE_PPP_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_PPP, NMDevicePppClass)) +#define NM_IS_DEVICE_PPP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_PPP)) +#define NM_IS_DEVICE_PPP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_PPP)) +#define NM_DEVICE_PPP_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_PPP, NMDevicePppClass)) + +/** + * NMDevicePpp: + */ +typedef struct _NMDevicePppClass NMDevicePppClass; + +GType nm_device_ppp_get_type(void); + +G_END_DECLS + +#endif /* __NM_DEVICE_PPP_H__ */ diff --git a/src/libnm-client-public/nm-device-team.h b/src/libnm-client-public/nm-device-team.h new file mode 100644 index 00000000..921353b6 --- /dev/null +++ b/src/libnm-client-public/nm-device-team.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us> + */ + +#ifndef __NM_DEVICE_TEAM_H__ +#define __NM_DEVICE_TEAM_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_TEAM (nm_device_team_get_type()) +#define NM_DEVICE_TEAM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_TEAM, NMDeviceTeam)) +#define NM_DEVICE_TEAM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_TEAM, NMDeviceTeamClass)) +#define NM_IS_DEVICE_TEAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_TEAM)) +#define NM_IS_DEVICE_TEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_TEAM)) +#define NM_DEVICE_TEAM_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_TEAM, NMDeviceTeamClass)) + +#define NM_DEVICE_TEAM_HW_ADDRESS "hw-address" +#define NM_DEVICE_TEAM_CARRIER "carrier" +#define NM_DEVICE_TEAM_SLAVES "slaves" +#define NM_DEVICE_TEAM_CONFIG "config" + +/** + * NMDeviceTeam: + */ +typedef struct _NMDeviceTeamClass NMDeviceTeamClass; + +GType nm_device_team_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_team_get_hw_address(NMDeviceTeam *device); + +gboolean nm_device_team_get_carrier(NMDeviceTeam *device); +const GPtrArray *nm_device_team_get_slaves(NMDeviceTeam *device); +NM_AVAILABLE_IN_1_4 +const char *nm_device_team_get_config(NMDeviceTeam *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_TEAM_H__ */ diff --git a/src/libnm-client-public/nm-device-tun.h b/src/libnm-client-public/nm-device-tun.h new file mode 100644 index 00000000..ee7342de --- /dev/null +++ b/src/libnm-client-public/nm-device-tun.h @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2015 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_TUN_H__ +#define __NM_DEVICE_TUN_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_TUN (nm_device_tun_get_type()) +#define NM_DEVICE_TUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_TUN, NMDeviceTun)) +#define NM_DEVICE_TUN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_TUN, NMDeviceTunClass)) +#define NM_IS_DEVICE_TUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_TUN)) +#define NM_IS_DEVICE_TUN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_TUN)) +#define NM_DEVICE_TUN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_TUN, NMDeviceTunClass)) + +#define NM_DEVICE_TUN_HW_ADDRESS "hw-address" +#define NM_DEVICE_TUN_OWNER "owner" +#define NM_DEVICE_TUN_GROUP "group" +#define NM_DEVICE_TUN_MODE "mode" +#define NM_DEVICE_TUN_NO_PI "no-pi" +#define NM_DEVICE_TUN_VNET_HDR "vnet-hdr" +#define NM_DEVICE_TUN_MULTI_QUEUE "multi-queue" + +/** + * NMDeviceTun: + */ +typedef struct _NMDeviceTunClass NMDeviceTunClass; + +NM_AVAILABLE_IN_1_2 +GType nm_device_tun_get_type(void); + +NM_AVAILABLE_IN_1_2 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_tun_get_hw_address(NMDeviceTun *device); + +NM_AVAILABLE_IN_1_2 +const char *nm_device_tun_get_mode(NMDeviceTun *device); +NM_AVAILABLE_IN_1_2 +gint64 nm_device_tun_get_owner(NMDeviceTun *device); +NM_AVAILABLE_IN_1_2 +gint64 nm_device_tun_get_group(NMDeviceTun *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_tun_get_no_pi(NMDeviceTun *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_tun_get_vnet_hdr(NMDeviceTun *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_tun_get_multi_queue(NMDeviceTun *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_TUN_H__ */ diff --git a/src/libnm-client-public/nm-device-veth.h b/src/libnm-client-public/nm-device-veth.h new file mode 100644 index 00000000..689762a7 --- /dev/null +++ b/src/libnm-client-public/nm-device-veth.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2020 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_VETH_H__ +#define __NM_DEVICE_VETH_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_VETH (nm_device_veth_get_type()) +#define NM_DEVICE_VETH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_VETH, NMDeviceVeth)) +#define NM_DEVICE_VETH_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_VETH, NMDeviceVethClass)) +#define NM_IS_DEVICE_VETH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_VETH)) +#define NM_IS_DEVICE_VETH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_VETH)) +#define NM_DEVICE_VETH_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_VETH, NMDeviceVethClass)) + +#define NM_DEVICE_VETH_PEER "peer" + +/** + * NMDeviceVeth: + */ +typedef struct _NMDeviceVethClass NMDeviceVethClass; + +NM_AVAILABLE_IN_1_30 +GType nm_device_veth_get_type(void); + +NM_AVAILABLE_IN_1_30 +NMDevice *nm_device_veth_get_peer(NMDeviceVeth *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_VETH_H__ */ diff --git a/src/libnm-client-public/nm-device-vlan.h b/src/libnm-client-public/nm-device-vlan.h new file mode 100644 index 00000000..81430509 --- /dev/null +++ b/src/libnm-client-public/nm-device-vlan.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2012 - 2014 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_VLAN_H__ +#define __NM_DEVICE_VLAN_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_VLAN (nm_device_vlan_get_type()) +#define NM_DEVICE_VLAN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_VLAN, NMDeviceVlan)) +#define NM_DEVICE_VLAN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_VLAN, NMDeviceVlanClass)) +#define NM_IS_DEVICE_VLAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_VLAN)) +#define NM_IS_DEVICE_VLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_VLAN)) +#define NM_DEVICE_VLAN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_VLAN, NMDeviceVlanClass)) + +#define NM_DEVICE_VLAN_HW_ADDRESS "hw-address" +#define NM_DEVICE_VLAN_CARRIER "carrier" +#define NM_DEVICE_VLAN_PARENT "parent" +#define NM_DEVICE_VLAN_VLAN_ID "vlan-id" + +/** + * NMDeviceVlan: + */ +typedef struct _NMDeviceVlanClass NMDeviceVlanClass; + +GType nm_device_vlan_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_vlan_get_hw_address(NMDeviceVlan *device); + +gboolean nm_device_vlan_get_carrier(NMDeviceVlan *device); +NMDevice *nm_device_vlan_get_parent(NMDeviceVlan *device); +guint nm_device_vlan_get_vlan_id(NMDeviceVlan *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_VLAN_H__ */ diff --git a/src/libnm-client-public/nm-device-vrf.h b/src/libnm-client-public/nm-device-vrf.h new file mode 100644 index 00000000..f835dd2f --- /dev/null +++ b/src/libnm-client-public/nm-device-vrf.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#ifndef __NM_DEVICE_VRF_H__ +#define __NM_DEVICE_VRF_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_VRF (nm_device_vrf_get_type()) +#define NM_DEVICE_VRF(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_VRF, NMDeviceVrf)) +#define NM_DEVICE_VRF_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_VRF, NMDeviceVrfClass)) +#define NM_IS_DEVICE_VRF(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_VRF)) +#define NM_IS_DEVICE_VRF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_VRF)) +#define NM_DEVICE_VRF_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_VRF, NMDeviceVrfClass)) + +#define NM_DEVICE_VRF_TABLE "table" + +/** + * NMDeviceVrf: + */ +typedef struct _NMDeviceVrfClass NMDeviceVrfClass; + +NM_AVAILABLE_IN_1_24 +GType nm_device_vrf_get_type(void); +NM_AVAILABLE_IN_1_24 +guint32 nm_device_vrf_get_table(NMDeviceVrf *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_VRF_H__ */ diff --git a/src/libnm-client-public/nm-device-vxlan.h b/src/libnm-client-public/nm-device-vxlan.h new file mode 100644 index 00000000..9ef5eb2d --- /dev/null +++ b/src/libnm-client-public/nm-device-vxlan.h @@ -0,0 +1,95 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2015 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_VXLAN_H__ +#define __NM_DEVICE_VXLAN_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_VXLAN (nm_device_vxlan_get_type()) +#define NM_DEVICE_VXLAN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_VXLAN, NMDeviceVxlan)) +#define NM_DEVICE_VXLAN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_VXLAN, NMDeviceVxlanClass)) +#define NM_IS_DEVICE_VXLAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_VXLAN)) +#define NM_IS_DEVICE_VXLAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_VXLAN)) +#define NM_DEVICE_VXLAN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_VXLAN, NMDeviceVxlanClass)) + +#define NM_DEVICE_VXLAN_HW_ADDRESS "hw-address" +#define NM_DEVICE_VXLAN_CARRIER "carrier" +#define NM_DEVICE_VXLAN_PARENT "parent" +#define NM_DEVICE_VXLAN_ID "id" +#define NM_DEVICE_VXLAN_GROUP "group" +#define NM_DEVICE_VXLAN_LOCAL "local" +#define NM_DEVICE_VXLAN_SRC_PORT_MIN "src-port-min" +#define NM_DEVICE_VXLAN_SRC_PORT_MAX "src-port-max" +#define NM_DEVICE_VXLAN_LEARNING "learning" +#define NM_DEVICE_VXLAN_AGEING "ageing" +#define NM_DEVICE_VXLAN_TOS "tos" +#define NM_DEVICE_VXLAN_TTL "ttl" +#define NM_DEVICE_VXLAN_LIMIT "limit" +#define NM_DEVICE_VXLAN_PROXY "proxy" +#define NM_DEVICE_VXLAN_RSC "rsc" +#define NM_DEVICE_VXLAN_L2MISS "l2miss" +#define NM_DEVICE_VXLAN_L3MISS "l3miss" +#define NM_DEVICE_VXLAN_DST_PORT "dst-port" + +/** + * NMDeviceVxlan: + */ +typedef struct _NMDeviceVxlanClass NMDeviceVxlanClass; + +NM_AVAILABLE_IN_1_2 +GType nm_device_vxlan_get_type(void); + +NM_AVAILABLE_IN_1_2 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_vxlan_get_hw_address(NMDeviceVxlan *device); + +NM_AVAILABLE_IN_1_2 +gboolean nm_device_vxlan_get_carrier(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +NMDevice *nm_device_vxlan_get_parent(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_id(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +const char *nm_device_vxlan_get_group(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +const char *nm_device_vxlan_get_local(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_src_port_min(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_src_port_max(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_dst_port(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_vxlan_get_learning(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_ageing(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_tos(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_ttl(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +guint nm_device_vxlan_get_limit(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_vxlan_get_proxy(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_vxlan_get_rsc(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_vxlan_get_l2miss(NMDeviceVxlan *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_vxlan_get_l3miss(NMDeviceVxlan *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_VXLAN_H__ */ diff --git a/src/libnm-client-public/nm-device-wifi-p2p.h b/src/libnm-client-public/nm-device-wifi-p2p.h new file mode 100644 index 00000000..374ef4bd --- /dev/null +++ b/src/libnm-client-public/nm-device-wifi-p2p.h @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2018 - 2019 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_WIFI_P2P_H__ +#define __NM_DEVICE_WIFI_P2P_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_WIFI_P2P (nm_device_wifi_p2p_get_type()) +#define NM_DEVICE_WIFI_P2P(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2P)) +#define NM_DEVICE_WIFI_P2P_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2PClass)) +#define NM_IS_DEVICE_WIFI_P2P(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_WIFI_P2P)) +#define NM_IS_DEVICE_WIFI_P2P_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_WIFI_P2P)) +#define NM_DEVICE_WIFI_P2P_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2PClass)) + +#define NM_DEVICE_WIFI_P2P_HW_ADDRESS "hw-address" +#define NM_DEVICE_WIFI_P2P_PEERS "peers" +#define NM_DEVICE_WIFI_P2P_WFDIES "wfdies" + +/** + * NMDeviceWifiP2P: + * + * Since: 1.16 + */ +typedef struct _NMDeviceWifiP2PClass NMDeviceWifiP2PClass; + +NM_AVAILABLE_IN_1_16 +GType nm_device_wifi_p2p_get_type(void); + +NM_AVAILABLE_IN_1_16 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_wifi_p2p_get_hw_address(NMDeviceWifiP2P *device); + +NM_AVAILABLE_IN_1_16 +NMWifiP2PPeer *nm_device_wifi_p2p_get_peer_by_path(NMDeviceWifiP2P *device, const char *path); + +NM_AVAILABLE_IN_1_16 +const GPtrArray *nm_device_wifi_p2p_get_peers(NMDeviceWifiP2P *device); + +NM_AVAILABLE_IN_1_16 +void nm_device_wifi_p2p_start_find(NMDeviceWifiP2P * device, + GVariant * options, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_16 +gboolean +nm_device_wifi_p2p_start_find_finish(NMDeviceWifiP2P *device, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_16 +void nm_device_wifi_p2p_stop_find(NMDeviceWifiP2P * device, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_16 +gboolean +nm_device_wifi_p2p_stop_find_finish(NMDeviceWifiP2P *device, GAsyncResult *result, GError **error); + +G_END_DECLS + +#endif /* __NM_DEVICE_WIFI_P2P_H__ */ diff --git a/src/libnm-client-public/nm-device-wifi.h b/src/libnm-client-public/nm-device-wifi.h new file mode 100644 index 00000000..bf712bbc --- /dev/null +++ b/src/libnm-client-public/nm-device-wifi.h @@ -0,0 +1,83 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2012 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_WIFI_H__ +#define __NM_DEVICE_WIFI_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_WIFI (nm_device_wifi_get_type()) +#define NM_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifi)) +#define NM_DEVICE_WIFI_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass)) +#define NM_IS_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_WIFI)) +#define NM_IS_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_WIFI)) +#define NM_DEVICE_WIFI_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass)) + +#define NM_DEVICE_WIFI_HW_ADDRESS "hw-address" +#define NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS "perm-hw-address" +#define NM_DEVICE_WIFI_MODE "mode" +#define NM_DEVICE_WIFI_BITRATE "bitrate" +#define NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT "active-access-point" +#define NM_DEVICE_WIFI_CAPABILITIES "wireless-capabilities" +#define NM_DEVICE_WIFI_ACCESS_POINTS "access-points" +#define NM_DEVICE_WIFI_LAST_SCAN "last-scan" + +/** + * NMDeviceWifi: + */ +typedef struct _NMDeviceWifiClass NMDeviceWifiClass; + +GType nm_device_wifi_get_type(void); + +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_wifi_get_hw_address(NMDeviceWifi *device); + +const char * nm_device_wifi_get_permanent_hw_address(NMDeviceWifi *device); +NM80211Mode nm_device_wifi_get_mode(NMDeviceWifi *device); +guint32 nm_device_wifi_get_bitrate(NMDeviceWifi *device); +NMDeviceWifiCapabilities nm_device_wifi_get_capabilities(NMDeviceWifi *device); +NMAccessPoint * nm_device_wifi_get_active_access_point(NMDeviceWifi *device); + +NMAccessPoint *nm_device_wifi_get_access_point_by_path(NMDeviceWifi *device, const char *path); + +const GPtrArray *nm_device_wifi_get_access_points(NMDeviceWifi *device); + +NM_AVAILABLE_IN_1_12 +gint64 nm_device_wifi_get_last_scan(NMDeviceWifi *device); + +_NM_DEPRECATED_SYNC_METHOD +gboolean +nm_device_wifi_request_scan(NMDeviceWifi *device, GCancellable *cancellable, GError **error); +NM_AVAILABLE_IN_1_2 +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_device_wifi_request_scan_options(NMDeviceWifi *device, + GVariant * options, + GCancellable *cancellable, + GError ** error); +void nm_device_wifi_request_scan_async(NMDeviceWifi * device, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_2 +void nm_device_wifi_request_scan_options_async(NMDeviceWifi * device, + GVariant * options, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean +nm_device_wifi_request_scan_finish(NMDeviceWifi *device, GAsyncResult *result, GError **error); + +G_END_DECLS + +#endif /* __NM_DEVICE_WIFI_H__ */ diff --git a/src/libnm-client-public/nm-device-wimax.h b/src/libnm-client-public/nm-device-wimax.h new file mode 100644 index 00000000..8a0fd901 --- /dev/null +++ b/src/libnm-client-public/nm-device-wimax.h @@ -0,0 +1,70 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2011 - 2012 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ + +#ifndef __NM_DEVICE_WIMAX_H__ +#define __NM_DEVICE_WIMAX_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_WIMAX (nm_device_wimax_get_type()) +#define NM_DEVICE_WIMAX(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_WIMAX, NMDeviceWimax)) +#define NM_DEVICE_WIMAX_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxClass)) +#define NM_IS_DEVICE_WIMAX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_WIMAX)) +#define NM_IS_DEVICE_WIMAX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_WIMAX)) +#define NM_DEVICE_WIMAX_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_WIMAX, NMDeviceWimaxClass)) + +#define NM_DEVICE_WIMAX_HW_ADDRESS "hw-address" +#define NM_DEVICE_WIMAX_ACTIVE_NSP "active-nsp" +#define NM_DEVICE_WIMAX_CENTER_FREQUENCY "center-frequency" +#define NM_DEVICE_WIMAX_RSSI "rssi" +#define NM_DEVICE_WIMAX_CINR "cinr" +#define NM_DEVICE_WIMAX_TX_POWER "tx-power" +#define NM_DEVICE_WIMAX_BSID "bsid" +#define NM_DEVICE_WIMAX_NSPS "nsps" + +/** + * NMDeviceWimax: + * + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. + */ +typedef struct _NMDeviceWimaxClass NMDeviceWimaxClass; + +NM_DEPRECATED_IN_1_2 +GType nm_device_wimax_get_type(void); + +NM_DEPRECATED_IN_1_2 +const char *nm_device_wimax_get_hw_address(NMDeviceWimax *wimax); +NM_DEPRECATED_IN_1_2 +NMWimaxNsp *nm_device_wimax_get_active_nsp(NMDeviceWimax *wimax); +NM_DEPRECATED_IN_1_2 +NMWimaxNsp *nm_device_wimax_get_nsp_by_path(NMDeviceWimax *wimax, const char *path); + +NM_DEPRECATED_IN_1_2 +const GPtrArray *nm_device_wimax_get_nsps(NMDeviceWimax *wimax); + +NM_DEPRECATED_IN_1_2 +guint nm_device_wimax_get_center_frequency(NMDeviceWimax *self); +NM_DEPRECATED_IN_1_2 +int nm_device_wimax_get_rssi(NMDeviceWimax *self); +NM_DEPRECATED_IN_1_2 +int nm_device_wimax_get_cinr(NMDeviceWimax *self); +NM_DEPRECATED_IN_1_2 +int nm_device_wimax_get_tx_power(NMDeviceWimax *self); +NM_DEPRECATED_IN_1_2 +const char *nm_device_wimax_get_bsid(NMDeviceWimax *self); + +G_END_DECLS + +#endif /* __NM_DEVICE_WIMAX_H__ */ diff --git a/src/libnm-client-public/nm-device-wireguard.h b/src/libnm-client-public/nm-device-wireguard.h new file mode 100644 index 00000000..f54695ee --- /dev/null +++ b/src/libnm-client-public/nm-device-wireguard.h @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2018 Javier Arteaga <jarteaga@jbeta.is> + */ + +#ifndef __NM_DEVICE_WIREGUARD_H__ +#define __NM_DEVICE_WIREGUARD_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_WIREGUARD (nm_device_wireguard_get_type()) +#define NM_DEVICE_WIREGUARD(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_WIREGUARD, NMDeviceWireGuard)) +#define NM_DEVICE_WIREGUARD_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_WIREGUARD, NMDeviceWireGuardClass)) +#define NM_IS_DEVICE_WIREGUARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_WIREGUARD)) +#define NM_IS_DEVICE_WIREGUARD_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_WIREGUARD)) +#define NM_DEVICE_WIREGUARD_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_WIREGUARD, NMDeviceWireGuardClass)) + +/** + * NMDeviceWireGuard: + */ +typedef struct _NMDeviceWireGuardClass NMDeviceWireGuardClass; + +#define NM_DEVICE_WIREGUARD_PUBLIC_KEY "public-key" +#define NM_DEVICE_WIREGUARD_LISTEN_PORT "listen-port" +#define NM_DEVICE_WIREGUARD_FWMARK "fwmark" + +NM_AVAILABLE_IN_1_14 +GType nm_device_wireguard_get_type(void); + +NM_AVAILABLE_IN_1_14 +GBytes *nm_device_wireguard_get_public_key(NMDeviceWireGuard *device); +NM_AVAILABLE_IN_1_14 +guint16 nm_device_wireguard_get_listen_port(NMDeviceWireGuard *device); +NM_AVAILABLE_IN_1_14 +guint32 nm_device_wireguard_get_fwmark(NMDeviceWireGuard *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_WIREGUARD_H__ */ diff --git a/src/libnm-client-public/nm-device-wpan.h b/src/libnm-client-public/nm-device-wpan.h new file mode 100644 index 00000000..7d50fd9e --- /dev/null +++ b/src/libnm-client-public/nm-device-wpan.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2018 Lubomir Rintel <lkundrak@v3.sk> + */ + +#ifndef __NM_DEVICE_WPAN_H__ +#define __NM_DEVICE_WPAN_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_WPAN (nm_device_wpan_get_type()) +#define NM_DEVICE_WPAN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_WPAN, NMDeviceWpan)) +#define NM_DEVICE_WPAN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_WPAN, NMDeviceWpanClass)) +#define NM_IS_DEVICE_WPAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_WPAN)) +#define NM_IS_DEVICE_WPAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_WPAN)) +#define NM_DEVICE_WPAN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_WPAN, NMDeviceWpanClass)) + +#define NM_DEVICE_WPAN_HW_ADDRESS "hw-address" + +/** + * NMDeviceWpan: + */ +typedef struct _NMDeviceWpanClass NMDeviceWpanClass; + +NM_AVAILABLE_IN_1_14 +GType nm_device_wpan_get_type(void); + +NM_AVAILABLE_IN_1_14 +NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +const char *nm_device_wpan_get_hw_address(NMDeviceWpan *device); + +G_END_DECLS + +#endif /* __NM_DEVICE_WPAN_H__ */ diff --git a/src/libnm-client-public/nm-device.h b/src/libnm-client-public/nm-device.h new file mode 100644 index 00000000..62baac92 --- /dev/null +++ b/src/libnm-client-public/nm-device.h @@ -0,0 +1,273 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2013 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_H__ +#define __NM_DEVICE_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE (nm_device_get_type()) +#define NM_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE, NMDevice)) +#define NM_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE, NMDeviceClass)) +#define NM_IS_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE)) +#define NM_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE)) +#define NM_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE, NMDeviceClass)) + +#define NM_DEVICE_DEVICE_TYPE "device-type" +#define NM_DEVICE_UDI "udi" +#define NM_DEVICE_PATH "path" +#define NM_DEVICE_INTERFACE "interface" +#define NM_DEVICE_IP_INTERFACE "ip-interface" +#define NM_DEVICE_DRIVER "driver" +#define NM_DEVICE_DRIVER_VERSION "driver-version" +#define NM_DEVICE_FIRMWARE_VERSION "firmware-version" +#define NM_DEVICE_CAPABILITIES "capabilities" +#define NM_DEVICE_REAL "real" +#define NM_DEVICE_MANAGED "managed" + +_NM_DEPRECATED_SYNC_WRITABLE_PROPERTY +#define NM_DEVICE_AUTOCONNECT "autoconnect" + +#define NM_DEVICE_FIRMWARE_MISSING "firmware-missing" +#define NM_DEVICE_NM_PLUGIN_MISSING "nm-plugin-missing" +#define NM_DEVICE_IP4_CONFIG "ip4-config" +#define NM_DEVICE_DHCP4_CONFIG "dhcp4-config" +#define NM_DEVICE_IP6_CONFIG "ip6-config" +#define NM_DEVICE_DHCP6_CONFIG "dhcp6-config" +#define NM_DEVICE_STATE "state" +#define NM_DEVICE_STATE_REASON "state-reason" +#define NM_DEVICE_ACTIVE_CONNECTION "active-connection" +#define NM_DEVICE_AVAILABLE_CONNECTIONS "available-connections" +#define NM_DEVICE_VENDOR "vendor" +#define NM_DEVICE_PRODUCT "product" +#define NM_DEVICE_PHYSICAL_PORT_ID "physical-port-id" +#define NM_DEVICE_MTU "mtu" +#define NM_DEVICE_METERED "metered" +#define NM_DEVICE_LLDP_NEIGHBORS "lldp-neighbors" +#define NM_DEVICE_IP4_CONNECTIVITY "ip4-connectivity" +#define NM_DEVICE_IP6_CONNECTIVITY "ip6-connectivity" +#define NM_DEVICE_INTERFACE_FLAGS "interface-flags" +#define NM_DEVICE_HW_ADDRESS "hw-address" + +/** + * NMDevice: + */ +typedef struct _NMDeviceClass NMDeviceClass; + +/** + * NMLldpNeighbor: + * + * Supported attributes are: + * + * - #NM_LLDP_ATTR_CHASSIS_ID_TYPE (type: 'u') + * - #NM_LLDP_ATTR_CHASSIS_ID (type: 's') + * - #NM_LLDP_ATTR_DESTINATION (type: 's') + * - #NM_LLDP_ATTR_IEEE_802_1_PPVID (type: 'u'). This attribute only reports the first PPVID + * and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_PPVIDS which reports + * all the PPVID. + * - #NM_LLDP_ATTR_IEEE_802_1_PPVID_FLAGS (type: 'u'). This attribute only reports the first PPVID + * and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_PPVIDS which reports + * all the PPVID. + * - #NM_LLDP_ATTR_IEEE_802_1_PPVIDS (type: 'aa{sv}') + * + * An array of dictionaries where each element has keys: + * - flags (type: 'u') + * - ppvid (type: 'u') + * - #NM_LLDP_ATTR_IEEE_802_1_PVID (type: 'u') + * - #NM_LLDP_ATTR_IEEE_802_1_VID (type: 'u'). This attribute only reports the first VLAN + * and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_VLANS which reports + * all the VLANs. + * - #NM_LLDP_ATTR_IEEE_802_1_VLAN_NAME (type: 's'). This attribute only reports the first VLAN + * and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_VLANS which reports + * all the VLANs. + * - #NM_LLDP_ATTR_IEEE_802_1_VLANS (type: 'aa{sv}') + * + * An array of dictionaries where each element has keys: + * - name (type: 's') + * - vid (type: 'u') + * - #NM_LLDP_ATTR_IEEE_802_3_MAC_PHY_CONF (type: 'a{sv}') + * + * Dictionary where each element has keys: + * - autoneg (type: 'u') + * - operational-mau-type (type: 'u') + * - pmd-autoneg-cap (type: 'u') + * - #NM_LLDP_ATTR_IEEE_802_3_MAX_FRAME_SIZE (type: 'u') + * - #NM_LLDP_ATTR_IEEE_802_3_POWER_VIA_MDI (type: 'a{sv}') + * + * Dictionary where each element has keys: + * - mdi-power-support (type: 'u') + * - power-class (type: 'u') + * - pse-power-pair (type: 'u') + * - #NM_LLDP_ATTR_MANAGEMENT_ADDRESSES (type: 'aa{sv}') + * + * An array of dictionaries where each element has keys: + * - address (type: 'ay') + * - address-subtype (type: 'u') + * - interface-number (type: 'u') + * - interface-number-subtype (type: 'u') + * - object-id (type: 'ay') + * - #NM_LLDP_ATTR_PORT_DESCRIPTION (type: 's') + * - #NM_LLDP_ATTR_PORT_ID_TYPE (type: 'u') + * - #NM_LLDP_ATTR_PORT_ID (type: 's') + * - #NM_LLDP_ATTR_RAW (type: 'ay') + * - #NM_LLDP_ATTR_SYSTEM_CAPABILITIES (type: 'u') + * - #NM_LLDP_ATTR_SYSTEM_DESCRIPTION (type: 's') + * - #NM_LLDP_ATTR_SYSTEM_NAME (type: 's') + **/ +typedef struct _NMLldpNeighbor NMLldpNeighbor; + +GType nm_device_get_type(void); + +const char * nm_device_get_iface(NMDevice *device); +const char * nm_device_get_ip_iface(NMDevice *device); +NMDeviceType nm_device_get_device_type(NMDevice *device); +const char * nm_device_get_udi(NMDevice *device); +NM_AVAILABLE_IN_1_26 +const char * nm_device_get_path(NMDevice *device); +const char * nm_device_get_driver(NMDevice *device); +const char * nm_device_get_driver_version(NMDevice *device); +const char * nm_device_get_firmware_version(NMDevice *device); +const char * nm_device_get_type_description(NMDevice *device); +const char * nm_device_get_hw_address(NMDevice *device); +NMDeviceCapabilities nm_device_get_capabilities(NMDevice *device); +gboolean nm_device_get_managed(NMDevice *device); + +NM_AVAILABLE_IN_1_2 +NM_DEPRECATED_IN_1_22 +_NM_DEPRECATED_SYNC_METHOD +void nm_device_set_managed(NMDevice *device, gboolean managed); + +gboolean nm_device_get_autoconnect(NMDevice *device); + +NM_DEPRECATED_IN_1_22 +_NM_DEPRECATED_SYNC_METHOD +void nm_device_set_autoconnect(NMDevice *device, gboolean autoconnect); + +gboolean nm_device_get_firmware_missing(NMDevice *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_get_nm_plugin_missing(NMDevice *device); +NMIPConfig * nm_device_get_ip4_config(NMDevice *device); +NMDhcpConfig *nm_device_get_dhcp4_config(NMDevice *device); +NMIPConfig * nm_device_get_ip6_config(NMDevice *device); +NMDhcpConfig *nm_device_get_dhcp6_config(NMDevice *device); +NM_AVAILABLE_IN_1_16 +NMConnectivityState nm_device_get_connectivity(NMDevice *device, int addr_family); +NMDeviceState nm_device_get_state(NMDevice *device); +NMDeviceStateReason nm_device_get_state_reason(NMDevice *device); +NMActiveConnection *nm_device_get_active_connection(NMDevice *device); +const GPtrArray * nm_device_get_available_connections(NMDevice *device); +const char * nm_device_get_physical_port_id(NMDevice *device); +guint32 nm_device_get_mtu(NMDevice *device); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_is_real(NMDevice *device); +gboolean nm_device_is_software(NMDevice *device); + +const char *nm_device_get_product(NMDevice *device); +const char *nm_device_get_vendor(NMDevice *device); +const char *nm_device_get_description(NMDevice *device); +NM_AVAILABLE_IN_1_2 +NMMetered nm_device_get_metered(NMDevice *device); +NM_AVAILABLE_IN_1_2 +GPtrArray *nm_device_get_lldp_neighbors(NMDevice *device); +NM_AVAILABLE_IN_1_22 +NMDeviceInterfaceFlags nm_device_get_interface_flags(NMDevice *device); + +char **nm_device_disambiguate_names(NMDevice **devices, int num_devices); +NM_AVAILABLE_IN_1_2 +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_device_reapply(NMDevice * device, + NMConnection *connection, + guint64 version_id, + guint32 flags, + GCancellable *cancellable, + GError ** error); +NM_AVAILABLE_IN_1_2 +void nm_device_reapply_async(NMDevice * device, + NMConnection * connection, + guint64 version_id, + guint32 flags, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_2 +gboolean nm_device_reapply_finish(NMDevice *device, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_2 +_NM_DEPRECATED_SYNC_METHOD +NMConnection *nm_device_get_applied_connection(NMDevice * device, + guint32 flags, + guint64 * version_id, + GCancellable *cancellable, + GError ** error); +NM_AVAILABLE_IN_1_2 +void nm_device_get_applied_connection_async(NMDevice * device, + guint32 flags, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_2 +NMConnection *nm_device_get_applied_connection_finish(NMDevice * device, + GAsyncResult *result, + guint64 * version_id, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_device_disconnect(NMDevice *device, GCancellable *cancellable, GError **error); +void nm_device_disconnect_async(NMDevice * device, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_device_disconnect_finish(NMDevice *device, GAsyncResult *result, GError **error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_device_delete(NMDevice *device, GCancellable *cancellable, GError **error); +void nm_device_delete_async(NMDevice * device, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_device_delete_finish(NMDevice *device, GAsyncResult *result, GError **error); + +GPtrArray *nm_device_filter_connections(NMDevice *device, const GPtrArray *connections); + +gboolean nm_device_connection_valid(NMDevice *device, NMConnection *connection); + +gboolean +nm_device_connection_compatible(NMDevice *device, NMConnection *connection, GError **error); + +GType nm_device_get_setting_type(NMDevice *device); + +NM_AVAILABLE_IN_1_2 +GType nm_lldp_neighbor_get_type(void); +NM_AVAILABLE_IN_1_2 +void nm_lldp_neighbor_ref(NMLldpNeighbor *neighbor); +NM_AVAILABLE_IN_1_2 +void nm_lldp_neighbor_unref(NMLldpNeighbor *neighbor); +NM_AVAILABLE_IN_1_2 +char **nm_lldp_neighbor_get_attr_names(NMLldpNeighbor *neighbor); +NM_AVAILABLE_IN_1_18 +GVariant *nm_lldp_neighbor_get_attr_value(NMLldpNeighbor *neighbor, const char *name); + +NM_AVAILABLE_IN_1_2 +NMLldpNeighbor *nm_lldp_neighbor_new(void); +NM_AVAILABLE_IN_1_2 +gboolean nm_lldp_neighbor_get_attr_string_value(NMLldpNeighbor *neighbor, + const char * name, + const char ** out_value); +NM_AVAILABLE_IN_1_2 +gboolean +nm_lldp_neighbor_get_attr_uint_value(NMLldpNeighbor *neighbor, const char *name, guint *out_value); +NM_AVAILABLE_IN_1_2 +const GVariantType *nm_lldp_neighbor_get_attr_type(NMLldpNeighbor *neighbor, const char *name); + +G_END_DECLS + +#endif /* __NM_DEVICE_H__ */ diff --git a/src/libnm-client-public/nm-dhcp-config.h b/src/libnm-client-public/nm-dhcp-config.h new file mode 100644 index 00000000..7663fb9a --- /dev/null +++ b/src/libnm-client-public/nm-dhcp-config.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 Novell, Inc. + */ + +#ifndef __NM_DHCP_CONFIG_H__ +#define __NM_DHCP_CONFIG_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DHCP_CONFIG (nm_dhcp_config_get_type()) +#define NM_DHCP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DHCP_CONFIG, NMDhcpConfig)) +#define NM_DHCP_CONFIG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DHCP_CONFIG, NMDhcpConfigClass)) +#define NM_IS_DHCP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DHCP_CONFIG)) +#define NM_IS_DHCP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DHCP_CONFIG)) + +/** + * NMDhcpConfig: + */ +typedef struct _NMDhcpConfigClass NMDhcpConfigClass; + +#define NM_DHCP_CONFIG_FAMILY "family" +#define NM_DHCP_CONFIG_OPTIONS "options" + +GType nm_dhcp_config_get_type(void); + +int nm_dhcp_config_get_family(NMDhcpConfig *config); + +GHashTable *nm_dhcp_config_get_options(NMDhcpConfig *config); +const char *nm_dhcp_config_get_one_option(NMDhcpConfig *config, const char *option); + +G_END_DECLS + +#endif /* __NM_DHCP_CONFIG_H__ */ diff --git a/src/libnm-client-public/nm-enum-types.c.template b/src/libnm-client-public/nm-enum-types.c.template new file mode 100644 index 00000000..c2627f44 --- /dev/null +++ b/src/libnm-client-public/nm-enum-types.c.template @@ -0,0 +1,75 @@ +/*** BEGIN file-header ***/ +#include "libnm-client-impl/nm-default-libnm.h" + +#include "nm-enum-types.h" + +#include "nm-version-macros.h" +#include "NetworkManager.h" +#include "nm-access-point.h" +#include "nm-active-connection.h" +#include "nm-checkpoint.h" +#include "nm-client.h" +#include "nm-device-adsl.h" +#include "nm-device-bond.h" +#include "nm-device-bridge.h" +#include "nm-device-bt.h" +#include "nm-device-dummy.h" +#include "nm-device-ethernet.h" +#include "nm-device-generic.h" +#include "nm-device-infiniband.h" +#include "nm-device-ip-tunnel.h" +#include "nm-device-macsec.h" +#include "nm-device-macvlan.h" +#include "nm-device-modem.h" +#include "nm-device-olpc-mesh.h" +#include "nm-device-ovs-interface.h" +#include "nm-device-ovs-port.h" +#include "nm-device-ovs-bridge.h" +#include "nm-device-ppp.h" +#include "nm-device-team.h" +#include "nm-device-tun.h" +#include "nm-device-vlan.h" +#include "nm-device-vxlan.h" +#include "nm-device-wifi.h" +#include "nm-device-wimax.h" +#include "nm-device.h" +#include "nm-dhcp-config.h" +#include "nm-ip-config.h" +#include "nm-object.h" +#include "nm-remote-connection.h" +#include "nm-types.h" +#include "nm-vpn-connection.h" +#include "nm-vpn-editor.h" +#include "nm-wimax-nsp.h" +#include "nm-secret-agent-old.h" +#include "nm-vpn-plugin-old.h" +#include "nm-vpn-service-plugin.h" +/*** END file-header ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const G@Type@Value values[] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ diff --git a/src/libnm-client-public/nm-enum-types.h.template b/src/libnm-client-public/nm-enum-types.h.template new file mode 100644 index 00000000..bc70af13 --- /dev/null +++ b/src/libnm-client-public/nm-enum-types.h.template @@ -0,0 +1,23 @@ +/*** BEGIN file-header ***/ +#ifndef __NM_ENUM_TYPES_H__ +#define __NM_ENUM_TYPES_H__ + +#include "nm-core-enum-types.h" +# +#include <glib-object.h> + +G_BEGIN_DECLS + +/*** END file-header ***/ + +/*** BEGIN enumeration-production ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) + +/*** END enumeration-production ***/ + +/*** BEGIN file-tail ***/ +G_END_DECLS + +#endif /* __NM_ENUM_TYPES_H__ */ +/*** END file-tail ***/ diff --git a/src/libnm-client-public/nm-ethtool-utils.h b/src/libnm-client-public/nm-ethtool-utils.h new file mode 100644 index 00000000..3656ed3f --- /dev/null +++ b/src/libnm-client-public/nm-ethtool-utils.h @@ -0,0 +1,111 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2018 Red Hat, Inc. + */ + +#ifndef __NM_ETHTOOL_UTILS_H__ /* lgtm[cpp/duplicate-include-guard] */ +#define __NM_ETHTOOL_UTILS_H__ + +G_BEGIN_DECLS + +/*****************************************************************************/ + +#define NM_ETHTOOL_OPTNAME_FEATURE_ESP_HW_OFFLOAD "feature-esp-hw-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_ESP_TX_CSUM_HW_OFFLOAD "feature-esp-tx-csum-hw-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_FCOE_MTU "feature-fcoe-mtu" +#define NM_ETHTOOL_OPTNAME_FEATURE_GRO "feature-gro" +#define NM_ETHTOOL_OPTNAME_FEATURE_GSO "feature-gso" +#define NM_ETHTOOL_OPTNAME_FEATURE_HIGHDMA "feature-highdma" +#define NM_ETHTOOL_OPTNAME_FEATURE_HW_TC_OFFLOAD "feature-hw-tc-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_L2_FWD_OFFLOAD "feature-l2-fwd-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_LOOPBACK "feature-loopback" +#define NM_ETHTOOL_OPTNAME_FEATURE_LRO "feature-lro" +#define NM_ETHTOOL_OPTNAME_FEATURE_MACSEC_HW_OFFLOAD "feature-macsec-hw-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_NTUPLE "feature-ntuple" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX "feature-rx" +#define NM_ETHTOOL_OPTNAME_FEATURE_RXHASH "feature-rxhash" +#define NM_ETHTOOL_OPTNAME_FEATURE_RXVLAN "feature-rxvlan" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_ALL "feature-rx-all" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_FCS "feature-rx-fcs" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_GRO_HW "feature-rx-gro-hw" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_GRO_LIST "feature-rx-gro-list" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_UDP_GRO_FORWARDING "feature-rx-udp-gro-forwarding" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD "feature-rx-udp_tunnel-port-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_VLAN_FILTER "feature-rx-vlan-filter" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_VLAN_STAG_FILTER "feature-rx-vlan-stag-filter" +#define NM_ETHTOOL_OPTNAME_FEATURE_RX_VLAN_STAG_HW_PARSE "feature-rx-vlan-stag-hw-parse" +#define NM_ETHTOOL_OPTNAME_FEATURE_SG "feature-sg" +#define NM_ETHTOOL_OPTNAME_FEATURE_TLS_HW_RECORD "feature-tls-hw-record" +#define NM_ETHTOOL_OPTNAME_FEATURE_TLS_HW_RX_OFFLOAD "feature-tls-hw-rx-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_TLS_HW_TX_OFFLOAD "feature-tls-hw-tx-offload" +#define NM_ETHTOOL_OPTNAME_FEATURE_TSO "feature-tso" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX "feature-tx" +#define NM_ETHTOOL_OPTNAME_FEATURE_TXVLAN "feature-txvlan" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_FCOE_CRC "feature-tx-checksum-fcoe-crc" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_IPV4 "feature-tx-checksum-ipv4" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_IPV6 "feature-tx-checksum-ipv6" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_IP_GENERIC "feature-tx-checksum-ip-generic" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_SCTP "feature-tx-checksum-sctp" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_ESP_SEGMENTATION "feature-tx-esp-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_FCOE_SEGMENTATION "feature-tx-fcoe-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GRE_CSUM_SEGMENTATION "feature-tx-gre-csum-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GRE_SEGMENTATION "feature-tx-gre-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GSO_LIST "feature-tx-gso-list" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GSO_PARTIAL "feature-tx-gso-partial" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GSO_ROBUST "feature-tx-gso-robust" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_IPXIP4_SEGMENTATION "feature-tx-ipxip4-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_IPXIP6_SEGMENTATION "feature-tx-ipxip6-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_NOCACHE_COPY "feature-tx-nocache-copy" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_SCATTER_GATHER "feature-tx-scatter-gather" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_SCATTER_GATHER_FRAGLIST "feature-tx-scatter-gather-fraglist" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_SCTP_SEGMENTATION "feature-tx-sctp-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP6_SEGMENTATION "feature-tx-tcp6-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_ECN_SEGMENTATION "feature-tx-tcp-ecn-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_MANGLEID_SEGMENTATION \ + "feature-tx-tcp-mangleid-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_SEGMENTATION "feature-tx-tcp-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TUNNEL_REMCSUM_SEGMENTATION \ + "feature-tx-tunnel-remcsum-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_UDP_SEGMENTATION "feature-tx-udp-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION \ + "feature-tx-udp_tnl-csum-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_UDP_TNL_SEGMENTATION "feature-tx-udp_tnl-segmentation" +#define NM_ETHTOOL_OPTNAME_FEATURE_TX_VLAN_STAG_HW_INSERT "feature-tx-vlan-stag-hw-insert" + +#define NM_ETHTOOL_OPTNAME_COALESCE_ADAPTIVE_RX "coalesce-adaptive-rx" +#define NM_ETHTOOL_OPTNAME_COALESCE_ADAPTIVE_TX "coalesce-adaptive-tx" +#define NM_ETHTOOL_OPTNAME_COALESCE_PKT_RATE_HIGH "coalesce-pkt-rate-high" +#define NM_ETHTOOL_OPTNAME_COALESCE_PKT_RATE_LOW "coalesce-pkt-rate-low" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_FRAMES "coalesce-rx-frames" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_FRAMES_HIGH "coalesce-rx-frames-high" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_FRAMES_IRQ "coalesce-rx-frames-irq" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_FRAMES_LOW "coalesce-rx-frames-low" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_USECS "coalesce-rx-usecs" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_USECS_HIGH "coalesce-rx-usecs-high" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_USECS_IRQ "coalesce-rx-usecs-irq" +#define NM_ETHTOOL_OPTNAME_COALESCE_RX_USECS_LOW "coalesce-rx-usecs-low" +#define NM_ETHTOOL_OPTNAME_COALESCE_SAMPLE_INTERVAL "coalesce-sample-interval" +#define NM_ETHTOOL_OPTNAME_COALESCE_STATS_BLOCK_USECS "coalesce-stats-block-usecs" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_FRAMES "coalesce-tx-frames" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_FRAMES_HIGH "coalesce-tx-frames-high" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_FRAMES_IRQ "coalesce-tx-frames-irq" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_FRAMES_LOW "coalesce-tx-frames-low" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_USECS "coalesce-tx-usecs" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_USECS_HIGH "coalesce-tx-usecs-high" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_USECS_IRQ "coalesce-tx-usecs-irq" +#define NM_ETHTOOL_OPTNAME_COALESCE_TX_USECS_LOW "coalesce-tx-usecs-low" + +#define NM_ETHTOOL_OPTNAME_RING_RX "ring-rx" +#define NM_ETHTOOL_OPTNAME_RING_RX_JUMBO "ring-rx-jumbo" +#define NM_ETHTOOL_OPTNAME_RING_RX_MINI "ring-rx-mini" +#define NM_ETHTOOL_OPTNAME_RING_TX "ring-tx" + +#define NM_ETHTOOL_OPTNAME_PAUSE_AUTONEG "pause-autoneg" +#define NM_ETHTOOL_OPTNAME_PAUSE_RX "pause-rx" +#define NM_ETHTOOL_OPTNAME_PAUSE_TX "pause-tx" + +/*****************************************************************************/ + +G_END_DECLS + +#endif /* __NM_ETHTOOL_UTILS_H__ */ diff --git a/src/libnm-client-public/nm-ip-config.h b/src/libnm-client-public/nm-ip-config.h new file mode 100644 index 00000000..bdfebb6a --- /dev/null +++ b/src/libnm-client-public/nm-ip-config.h @@ -0,0 +1,54 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2008 - 2014 Red Hat, Inc. + */ + +#ifndef __NM_IP_CONFIG_H__ +#define __NM_IP_CONFIG_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_IP_CONFIG (nm_ip_config_get_type()) +#define NM_IP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_IP_CONFIG, NMIPConfig)) +#define NM_IP_CONFIG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_IP_CONFIG, NMIPConfigClass)) +#define NM_IS_IP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_IP_CONFIG)) +#define NM_IS_IP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_IP_CONFIG)) +#define NM_IP_CONFIG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_IP_CONFIG, NMIPConfigClass)) + +/** + * NMIPConfig: + */ +typedef struct _NMIPConfigClass NMIPConfigClass; + +#define NM_IP_CONFIG_FAMILY "family" +#define NM_IP_CONFIG_GATEWAY "gateway" +#define NM_IP_CONFIG_ADDRESSES "addresses" +#define NM_IP_CONFIG_ROUTES "routes" +#define NM_IP_CONFIG_NAMESERVERS "nameservers" +#define NM_IP_CONFIG_DOMAINS "domains" +#define NM_IP_CONFIG_SEARCHES "searches" +#define NM_IP_CONFIG_WINS_SERVERS "wins-servers" + +GType nm_ip_config_get_type(void); + +int nm_ip_config_get_family(NMIPConfig *config); +const char * nm_ip_config_get_gateway(NMIPConfig *config); +GPtrArray * nm_ip_config_get_addresses(NMIPConfig *config); +GPtrArray * nm_ip_config_get_routes(NMIPConfig *config); +const char *const *nm_ip_config_get_nameservers(NMIPConfig *config); +const char *const *nm_ip_config_get_domains(NMIPConfig *config); +const char *const *nm_ip_config_get_searches(NMIPConfig *config); +const char *const *nm_ip_config_get_wins_servers(NMIPConfig *config); + +G_END_DECLS + +#endif /* __NM_IP_CONFIG_H__ */ diff --git a/src/libnm-client-public/nm-object.h b/src/libnm-client-public/nm-object.h new file mode 100644 index 00000000..7b4a3232 --- /dev/null +++ b/src/libnm-client-public/nm-object.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2012 Red Hat, Inc. + */ + +#ifndef __NM_OBJECT_H__ +#define __NM_OBJECT_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-types.h" + +G_BEGIN_DECLS + +#define NM_TYPE_OBJECT (nm_object_get_type()) +#define NM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_OBJECT, NMObject)) +#define NM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_OBJECT, NMObjectClass)) +#define NM_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_OBJECT)) +#define NM_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_OBJECT)) +#define NM_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_OBJECT, NMObjectClass)) + +#define NM_OBJECT_PATH "path" + +/** + * NMObject: + */ +typedef struct _NMObjectClass NMObjectClass; + +GType nm_object_get_type(void); + +const char *nm_object_get_path(NMObject *object); + +NM_AVAILABLE_IN_1_24 +NMClient *nm_object_get_client(NMObject *object); + +G_END_DECLS + +#endif /* __NM_OBJECT_H__ */ diff --git a/src/libnm-client-public/nm-remote-connection.h b/src/libnm-client-public/nm-remote-connection.h new file mode 100644 index 00000000..e29bf073 --- /dev/null +++ b/src/libnm-client-public/nm-remote-connection.h @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2011 Red Hat, Inc. + */ + +#ifndef __NM_REMOTE_CONNECTION_H__ +#define __NM_REMOTE_CONNECTION_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_REMOTE_CONNECTION (nm_remote_connection_get_type()) +#define NM_REMOTE_CONNECTION(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnection)) +#define NM_REMOTE_CONNECTION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnectionClass)) +#define NM_IS_REMOTE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_REMOTE_CONNECTION)) +#define NM_IS_REMOTE_CONNECTION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_REMOTE_CONNECTION)) +#define NM_REMOTE_CONNECTION_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnectionClass)) + +/* Properties */ +#define NM_REMOTE_CONNECTION_DBUS_CONNECTION "dbus-connection" +#define NM_REMOTE_CONNECTION_PATH "path" +#define NM_REMOTE_CONNECTION_UNSAVED "unsaved" +#define NM_REMOTE_CONNECTION_FLAGS "flags" +#define NM_REMOTE_CONNECTION_FILENAME "filename" +#define NM_REMOTE_CONNECTION_VISIBLE "visible" + +/** + * NMRemoteConnection: + */ +typedef struct _NMRemoteConnectionClass NMRemoteConnectionClass; + +GType nm_remote_connection_get_type(void); + +NM_AVAILABLE_IN_1_12 +void nm_remote_connection_update2(NMRemoteConnection * connection, + GVariant * settings, + NMSettingsUpdate2Flags flags, + GVariant * args, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_12 +GVariant *nm_remote_connection_update2_finish(NMRemoteConnection *connection, + GAsyncResult * result, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_remote_connection_commit_changes(NMRemoteConnection *connection, + gboolean save_to_disk, + GCancellable * cancellable, + GError ** error); + +void nm_remote_connection_commit_changes_async(NMRemoteConnection *connection, + gboolean save_to_disk, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_remote_connection_commit_changes_finish(NMRemoteConnection *connection, + GAsyncResult * result, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_remote_connection_save(NMRemoteConnection *connection, + GCancellable * cancellable, + GError ** error); + +void nm_remote_connection_save_async(NMRemoteConnection *connection, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_remote_connection_save_finish(NMRemoteConnection *connection, + GAsyncResult * result, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +gboolean nm_remote_connection_delete(NMRemoteConnection *connection, + GCancellable * cancellable, + GError ** error); + +void nm_remote_connection_delete_async(NMRemoteConnection *connection, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean nm_remote_connection_delete_finish(NMRemoteConnection *connection, + GAsyncResult * result, + GError ** error); + +_NM_DEPRECATED_SYNC_METHOD +GVariant *nm_remote_connection_get_secrets(NMRemoteConnection *connection, + const char * setting_name, + GCancellable * cancellable, + GError ** error); + +void nm_remote_connection_get_secrets_async(NMRemoteConnection *connection, + const char * setting_name, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GVariant *nm_remote_connection_get_secrets_finish(NMRemoteConnection *connection, + GAsyncResult * result, + GError ** error); + +gboolean nm_remote_connection_get_unsaved(NMRemoteConnection *connection); + +NM_AVAILABLE_IN_1_12 +NMSettingsConnectionFlags nm_remote_connection_get_flags(NMRemoteConnection *connection); + +NM_AVAILABLE_IN_1_12 +const char *nm_remote_connection_get_filename(NMRemoteConnection *connection); + +gboolean nm_remote_connection_get_visible(NMRemoteConnection *connection); + +G_END_DECLS + +#endif /* __NM_REMOTE_CONNECTION__ */ diff --git a/src/libnm-client-public/nm-secret-agent-old.h b/src/libnm-client-public/nm-secret-agent-old.h new file mode 100644 index 00000000..cc33c14a --- /dev/null +++ b/src/libnm-client-public/nm-secret-agent-old.h @@ -0,0 +1,263 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2010 - 2011 Red Hat, Inc. + */ + +#ifndef __NM_SECRET_AGENT_OLD_H__ +#define __NM_SECRET_AGENT_OLD_H__ + +#include "nm-types.h" + +G_BEGIN_DECLS + +#define NM_TYPE_SECRET_AGENT_OLD (nm_secret_agent_old_get_type()) +#define NM_SECRET_AGENT_OLD(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SECRET_AGENT_OLD, NMSecretAgentOld)) +#define NM_SECRET_AGENT_OLD_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SECRET_AGENT_OLD, NMSecretAgentOldClass)) +#define NM_IS_SECRET_AGENT_OLD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SECRET_AGENT_OLD)) +#define NM_IS_SECRET_AGENT_OLD_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SECRET_AGENT_OLD)) +#define NM_SECRET_AGENT_OLD_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SECRET_AGENT_OLD, NMSecretAgentOldClass)) + +#define NM_SECRET_AGENT_OLD_IDENTIFIER "identifier" +#define NM_SECRET_AGENT_OLD_AUTO_REGISTER "auto-register" +#define NM_SECRET_AGENT_OLD_REGISTERED "registered" +#define NM_SECRET_AGENT_OLD_CAPABILITIES "capabilities" +#define NM_SECRET_AGENT_OLD_DBUS_CONNECTION "dbus-connection" + +/** + * NMSecretAgentOld: + */ +typedef struct { + GObject parent; +} NMSecretAgentOld; + +/** + * NMSecretAgentOldGetSecretsFunc: + * @agent: the secret agent object + * @connection: (transfer none): the connection for which secrets were requested, + * note that this object will be unrefed after the callback has returned, use + * g_object_ref()/g_object_unref() if you want to use this object after the callback + * has returned + * @secrets: the #GVariant of type %NM_VARIANT_TYPE_CONNECTION containing the requested + * secrets (as created by nm_connection_to_dbus() for example). Each key in @secrets + * should be the name of a #NMSetting object (like "802-11-wireless-security") + * and each value should be an %NM_VARIANT_TYPE_SETTING variant. The sub-dicts + * map string:value, where the string is the setting property name (like "psk") + * and the value is the secret + * @error: if the secrets request failed, give a descriptive error here + * @user_data: caller-specific data to be passed to the function + * + * Called as a result of a request by NM to retrieve secrets. When the + * #NMSecretAgentOld subclass has finished retrieving secrets and is ready to + * return them, or to return an error, this function should be called with + * those secrets or the error. + * + * To easily create the dictionary to return the Wi-Fi PSK, you could do + * something like this: + * <example> + * <title>Creating a secrets dictionary</title> + * <programlisting> + * NMConnection *secrets; + * NMSettingWirelessSecurity *s_wsec; + * GVariant *secrets_dict; + * + * secrets = nm_simple_connection_new (); + * s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new (); + * g_object_set (G_OBJECT (s_wsec), + * NM_SETTING_WIRELESS_SECURITY_PSK, "my really cool PSK", + * NULL); + * nm_connection_add_setting (secrets, NM_SETTING (s_wsec)); + * secrets_dict = nm_connection_to_dbus (secrets, NM_CONNECTION_SERIALIZE_ALL); + * + * (call the NMSecretAgentOldGetSecretsFunc with secrets_dict) + * + * g_object_unref (secrets); + * g_variant_unref (secrets_dict); + * </programlisting> + * </example> + */ +typedef void (*NMSecretAgentOldGetSecretsFunc)(NMSecretAgentOld *agent, + NMConnection * connection, + GVariant * secrets, + GError * error, + gpointer user_data); + +/** + * NMSecretAgentOldSaveSecretsFunc: + * @agent: the secret agent object + * @connection: (transfer none): the connection for which secrets were to be saved, + * note that this object will be unrefed after the callback has returned, use + * g_object_ref()/g_object_unref() if you want to use this object after the callback + * has returned + * @error: if the saving secrets failed, give a descriptive error here + * @user_data: caller-specific data to be passed to the function + * + * Called as a result of a request by NM to save secrets. When the + * #NMSecretAgentOld subclass has finished saving the secrets, this function + * should be called. + */ +typedef void (*NMSecretAgentOldSaveSecretsFunc)(NMSecretAgentOld *agent, + NMConnection * connection, + GError * error, + gpointer user_data); + +/** + * NMSecretAgentOldDeleteSecretsFunc: + * @agent: the secret agent object + * @connection: (transfer none): the connection for which secrets were to be deleted, + * note that this object will be unrefed after the callback has returned, use + * g_object_ref()/g_object_unref() if you want to use this object after the callback + * has returned + * @error: if the deleting secrets failed, give a descriptive error here + * @user_data: caller-specific data to be passed to the function + * + * Called as a result of a request by NM to delete secrets. When the + * #NMSecretAgentOld subclass has finished deleting the secrets, this function + * should be called. + */ +typedef void (*NMSecretAgentOldDeleteSecretsFunc)(NMSecretAgentOld *agent, + NMConnection * connection, + GError * error, + gpointer user_data); + +typedef struct { + GObjectClass parent; + + /* Virtual methods for subclasses */ + + /* Called when the subclass should retrieve and return secrets. Subclass + * must copy or reference any arguments it may require after returning from + * this method, as the arguments will freed (except for 'self', 'callback', + * and 'user_data' of course). + * + * Before version 1.24, if the request is canceled, the callback + * should still be called, but with the NM_SECRET_AGENT_ERROR_AGENT_CANCELED + * error. Since 1.24, invoking the callback has no effect during cancellation + * and may be omitted. + */ + void (*get_secrets)(NMSecretAgentOld * self, + NMConnection * connection, + const char * connection_path, + const char * setting_name, + const char ** hints, + NMSecretAgentGetSecretsFlags flags, + NMSecretAgentOldGetSecretsFunc callback, + gpointer user_data); + + /* Called when the subclass should cancel an outstanding request to + * get secrets for a given connection. + * + * Before version 1.24, canceling the request MUST call the callback that was + * passed along with the initial get_secrets call, sending the NM_SECRET_AGENT_ERROR/ + * NM_SECRET_AGENT_ERROR_AGENT_CANCELED error to that callback. Since 1.24, + * the get_secrets callback will be ignored during cancellation and may be omitted. + */ + void (*cancel_get_secrets)(NMSecretAgentOld *self, + const char * connection_path, + const char * setting_name); + + /* Called when the subclass should save the secrets contained in the + * connection to backing storage. Subclass must copy or reference any + * arguments it may require after returning from this method, as the + * arguments will freed (except for 'self', 'callback', and 'user_data' + * of course). + */ + void (*save_secrets)(NMSecretAgentOld * self, + NMConnection * connection, + const char * connection_path, + NMSecretAgentOldSaveSecretsFunc callback, + gpointer user_data); + + /* Called when the subclass should delete the secrets contained in the + * connection from backing storage. Subclass must copy or reference any + * arguments it may require after returning from this method, as the + * arguments will freed (except for 'self', 'callback', and 'user_data' + * of course). + */ + void (*delete_secrets)(NMSecretAgentOld * self, + NMConnection * connection, + const char * connection_path, + NMSecretAgentOldDeleteSecretsFunc callback, + gpointer user_data); + + /*< private >*/ + gpointer padding[8]; +} NMSecretAgentOldClass; + +GType nm_secret_agent_old_get_type(void); + +NM_AVAILABLE_IN_1_24 +GDBusConnection *nm_secret_agent_old_get_dbus_connection(NMSecretAgentOld *self); + +NM_AVAILABLE_IN_1_24 +GMainContext *nm_secret_agent_old_get_main_context(NMSecretAgentOld *self); + +NM_AVAILABLE_IN_1_24 +GObject *nm_secret_agent_old_get_context_busy_watcher(NMSecretAgentOld *self); + +NM_AVAILABLE_IN_1_24 +const char *nm_secret_agent_old_get_dbus_name_owner(NMSecretAgentOld *self); + +gboolean nm_secret_agent_old_get_registered(NMSecretAgentOld *self); + +/*****************************************************************************/ + +NM_AVAILABLE_IN_1_24 +void nm_secret_agent_old_enable(NMSecretAgentOld *self, gboolean enable); + +void nm_secret_agent_old_register_async(NMSecretAgentOld * self, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean +nm_secret_agent_old_register_finish(NMSecretAgentOld *self, GAsyncResult *result, GError **error); + +NM_AVAILABLE_IN_1_24 +void nm_secret_agent_old_destroy(NMSecretAgentOld *self); + +/*****************************************************************************/ + +NM_DEPRECATED_IN_1_24_FOR(nm_secret_agent_old_enable) +gboolean +nm_secret_agent_old_register(NMSecretAgentOld *self, GCancellable *cancellable, GError **error); + +NM_DEPRECATED_IN_1_24_FOR(nm_secret_agent_old_enable) +gboolean +nm_secret_agent_old_unregister(NMSecretAgentOld *self, GCancellable *cancellable, GError **error); + +NM_DEPRECATED_IN_1_24_FOR(nm_secret_agent_old_enable) +void nm_secret_agent_old_unregister_async(NMSecretAgentOld * self, + GCancellable * cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +NM_DEPRECATED_IN_1_24_FOR(nm_secret_agent_old_enable) +gboolean +nm_secret_agent_old_unregister_finish(NMSecretAgentOld *self, GAsyncResult *result, GError **error); + +/*****************************************************************************/ + +void nm_secret_agent_old_get_secrets(NMSecretAgentOld * self, + NMConnection * connection, + const char * setting_name, + const char ** hints, + NMSecretAgentGetSecretsFlags flags, + NMSecretAgentOldGetSecretsFunc callback, + gpointer user_data); + +void nm_secret_agent_old_save_secrets(NMSecretAgentOld * self, + NMConnection * connection, + NMSecretAgentOldSaveSecretsFunc callback, + gpointer user_data); + +void nm_secret_agent_old_delete_secrets(NMSecretAgentOld * self, + NMConnection * connection, + NMSecretAgentOldDeleteSecretsFunc callback, + gpointer user_data); + +G_END_DECLS + +#endif /* __NM_SECRET_AGENT_OLD_H__ */ diff --git a/src/libnm-client-public/nm-types.h b/src/libnm-client-public/nm-types.h new file mode 100644 index 00000000..81ffe790 --- /dev/null +++ b/src/libnm-client-public/nm-types.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2014 - 2018 Red Hat, Inc. + */ + +#ifndef __NM_TYPES_H__ +#define __NM_TYPES_H__ + +#include <gio/gio.h> + +#include "nm-dbus-interface.h" +#include "nm-connection.h" + +typedef struct _NMAccessPoint NMAccessPoint; +typedef struct _NMActiveConnection NMActiveConnection; +typedef struct _NMCheckpoint NMCheckpoint; +typedef struct _NMClient NMClient; +typedef struct _NMDevice NMDevice; +typedef struct _NMDevice6Lowpan NMDevice6Lowpan; +typedef struct _NMDeviceAdsl NMDeviceAdsl; +typedef struct _NMDeviceBond NMDeviceBond; +typedef struct _NMDeviceBridge NMDeviceBridge; +typedef struct _NMDeviceBt NMDeviceBt; +typedef struct _NMDeviceDummy NMDeviceDummy; +typedef struct _NMDeviceEthernet NMDeviceEthernet; +typedef struct _NMDeviceGeneric NMDeviceGeneric; +typedef struct _NMDeviceIPTunnel NMDeviceIPTunnel; +typedef struct _NMDeviceInfiniband NMDeviceInfiniband; +typedef struct _NMDeviceMacsec NMDeviceMacsec; +typedef struct _NMDeviceMacvlan NMDeviceMacvlan; +typedef struct _NMDeviceModem NMDeviceModem; +typedef struct _NMDeviceOlpcMesh NMDeviceOlpcMesh; +typedef struct _NMDeviceOvsBridge NMDeviceOvsBridge; +typedef struct _NMDeviceOvsInterface NMDeviceOvsInterface; +typedef struct _NMDeviceOvsPort NMDeviceOvsPort; +typedef struct _NMDevicePpp NMDevicePpp; +typedef struct _NMDeviceTeam NMDeviceTeam; +typedef struct _NMDeviceTun NMDeviceTun; +typedef struct _NMDeviceVeth NMDeviceVeth; +typedef struct _NMDeviceVlan NMDeviceVlan; +typedef struct _NMDeviceVrf NMDeviceVrf; +typedef struct _NMDeviceVxlan NMDeviceVxlan; +typedef struct _NMDeviceWifi NMDeviceWifi; +typedef struct _NMDeviceWifiP2P NMDeviceWifiP2P; +typedef struct _NMDeviceWimax NMDeviceWimax; +typedef struct _NMDeviceWireGuard NMDeviceWireGuard; +typedef struct _NMDeviceWpan NMDeviceWpan; +typedef struct _NMDhcpConfig NMDhcpConfig; +typedef struct _NMIPConfig NMIPConfig; +typedef struct _NMObject NMObject; +typedef struct _NMRemoteConnection NMRemoteConnection; +typedef struct _NMVpnConnection NMVpnConnection; +typedef struct _NMWifiP2PPeer NMWifiP2PPeer; +typedef struct _NMWimaxNsp NMWimaxNsp; + +#endif /* NM_TYPES_H */ diff --git a/src/libnm-client-public/nm-vpn-connection.h b/src/libnm-client-public/nm-vpn-connection.h new file mode 100644 index 00000000..aac259d5 --- /dev/null +++ b/src/libnm-client-public/nm-vpn-connection.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. + */ + +#ifndef __NM_VPN_CONNECTION_H__ +#define __NM_VPN_CONNECTION_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-active-connection.h" +#include "nm-vpn-dbus-interface.h" + +G_BEGIN_DECLS + +#define NM_TYPE_VPN_CONNECTION (nm_vpn_connection_get_type()) +#define NM_VPN_CONNECTION(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_VPN_CONNECTION, NMVpnConnection)) +#define NM_VPN_CONNECTION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_VPN_CONNECTION, NMVpnConnectionClass)) +#define NM_IS_VPN_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_VPN_CONNECTION)) +#define NM_IS_VPN_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_VPN_CONNECTION)) +#define NM_VPN_CONNECTION_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_VPN_CONNECTION, NMVpnConnectionClass)) + +#define NM_VPN_CONNECTION_VPN_STATE "vpn-state" +#define NM_VPN_CONNECTION_BANNER "banner" + +/** + * NMVpnConnection: + */ +typedef struct _NMVpnConnectionClass NMVpnConnectionClass; + +GType nm_vpn_connection_get_type(void); + +NMVpnConnectionState nm_vpn_connection_get_vpn_state(NMVpnConnection *vpn); +const char * nm_vpn_connection_get_banner(NMVpnConnection *vpn); + +G_END_DECLS + +#endif /* __NM_VPN_CONNECTION_H__ */ diff --git a/src/libnm-client-public/nm-vpn-editor.h b/src/libnm-client-public/nm-vpn-editor.h new file mode 100644 index 00000000..8cd7805f --- /dev/null +++ b/src/libnm-client-public/nm-vpn-editor.h @@ -0,0 +1,69 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2008 Novell, Inc. + * Copyright (C) 2008 - 2015 Red Hat, Inc. + */ + +#ifndef __NM_VPN_EDITOR_H__ +#define __NM_VPN_EDITOR_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include <glib.h> +#include <glib-object.h> +#include "nm-types.h" + +#include "nm-vpn-editor-plugin.h" + +G_BEGIN_DECLS + +/*****************************************************************************/ +/* Editor interface */ +/*****************************************************************************/ + +#define NM_TYPE_VPN_EDITOR (nm_vpn_editor_get_type()) +#define NM_VPN_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_VPN_EDITOR, NMVpnEditor)) +#define NM_IS_VPN_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_VPN_EDITOR)) +#define NM_VPN_EDITOR_GET_INTERFACE(obj) \ + (G_TYPE_INSTANCE_GET_INTERFACE((obj), NM_TYPE_VPN_EDITOR, NMVpnEditorInterface)) + +/** + * NMVpnEditorInterface: + * @g_iface: the parent interface + * @get_widget: return the #GtkWidget for the VPN editor's UI + * @placeholder: not currently used + * @update_connection: called to save the user-entered options to the connection + * object. Should return %FALSE and set @error if the current options are + * invalid. @error should contain enough information for the plugin to + * determine which UI widget is invalid at a later point in time. For + * example, creating unique error codes for what error occurred and populating + * the message field of @error with the name of the invalid property. + * @changed: emitted when the value of a UI widget changes. May trigger a + * validity check via @update_connection to write values to the connection. + * + * Interface for editing a specific #NMConnection + */ +typedef struct { + GTypeInterface g_iface; + + GObject *(*get_widget)(NMVpnEditor *editor); + + void (*placeholder)(void); + + gboolean (*update_connection)(NMVpnEditor *editor, NMConnection *connection, GError **error); + + void (*changed)(NMVpnEditor *editor); +} NMVpnEditorInterface; + +GType nm_vpn_editor_get_type(void); + +GObject *nm_vpn_editor_get_widget(NMVpnEditor *editor); + +gboolean +nm_vpn_editor_update_connection(NMVpnEditor *editor, NMConnection *connection, GError **error); + +G_END_DECLS + +#endif /* __NM_VPN_EDITOR_H__ */ diff --git a/src/libnm-client-public/nm-vpn-plugin-old.h b/src/libnm-client-public/nm-vpn-plugin-old.h new file mode 100644 index 00000000..116b8b90 --- /dev/null +++ b/src/libnm-client-public/nm-vpn-plugin-old.h @@ -0,0 +1,135 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2015 Red Hat, Inc. + */ + +#ifndef __NM_VPN_PLUGIN_OLD_H__ +#define __NM_VPN_PLUGIN_OLD_H__ + +#include <gio/gio.h> +#include "nm-vpn-dbus-interface.h" +#include "nm-connection.h" + +G_BEGIN_DECLS + +#define NM_TYPE_VPN_PLUGIN_OLD (nm_vpn_plugin_old_get_type()) +#define NM_VPN_PLUGIN_OLD(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_VPN_PLUGIN_OLD, NMVpnPluginOld)) +#define NM_VPN_PLUGIN_OLD_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_VPN_PLUGIN_OLD, NMVpnPluginOldClass)) +#define NM_IS_VPN_PLUGIN_OLD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_VPN_PLUGIN_OLD)) +#define NM_IS_VPN_PLUGIN_OLD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_VPN_PLUGIN_OLD)) +#define NM_VPN_PLUGIN_OLD_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_VPN_PLUGIN_OLD, NMVpnPluginOldClass)) + +#define NM_VPN_PLUGIN_OLD_DBUS_SERVICE_NAME "service-name" +#define NM_VPN_PLUGIN_OLD_STATE "state" + +/** + * NMVpnPluginOld: + */ +typedef struct { + NM_DEPRECATED_IN_1_2 + GObject parent; +} NMVpnPluginOld NM_DEPRECATED_IN_1_2; + +typedef struct { + NM_DEPRECATED_IN_1_2 + GObjectClass parent; + + /* Signals */ + NM_DEPRECATED_IN_1_2 + void (*state_changed)(NMVpnPluginOld *plugin, NMVpnServiceState state); + + NM_DEPRECATED_IN_1_2 + void (*ip4_config)(NMVpnPluginOld *plugin, GVariant *ip4_config); + + NM_DEPRECATED_IN_1_2 + void (*login_banner)(NMVpnPluginOld *plugin, const char *banner); + + NM_DEPRECATED_IN_1_2 + void (*failure)(NMVpnPluginOld *plugin, NMVpnPluginFailure reason); + + NM_DEPRECATED_IN_1_2 + void (*quit)(NMVpnPluginOld *plugin); + + NM_DEPRECATED_IN_1_2 + void (*config)(NMVpnPluginOld *plugin, GVariant *config); + + NM_DEPRECATED_IN_1_2 + void (*ip6_config)(NMVpnPluginOld *plugin, GVariant *config); + + /* virtual methods */ + NM_DEPRECATED_IN_1_2 + gboolean (*connect)(NMVpnPluginOld *plugin, NMConnection *connection, GError **err); + + NM_DEPRECATED_IN_1_2 + gboolean (*need_secrets)(NMVpnPluginOld *plugin, + NMConnection * connection, + const char ** setting_name, + GError ** error); + + NM_DEPRECATED_IN_1_2 + gboolean (*disconnect)(NMVpnPluginOld *plugin, GError **err); + + NM_DEPRECATED_IN_1_2 + gboolean (*new_secrets)(NMVpnPluginOld *plugin, NMConnection *connection, GError **error); + + NM_DEPRECATED_IN_1_2 + gboolean (*connect_interactive)(NMVpnPluginOld *plugin, + NMConnection * connection, + GVariant * details, + GError ** error); + + /*< private >*/ + NM_DEPRECATED_IN_1_2 + gpointer padding[8]; +} NMVpnPluginOldClass NM_DEPRECATED_IN_1_2; + +NM_DEPRECATED_IN_1_2 +GType nm_vpn_plugin_old_get_type(void); + +NM_DEPRECATED_IN_1_2 +GDBusConnection *nm_vpn_plugin_old_get_connection(NMVpnPluginOld *plugin); +NM_DEPRECATED_IN_1_2 +NMVpnServiceState nm_vpn_plugin_old_get_state(NMVpnPluginOld *plugin); +NM_DEPRECATED_IN_1_2 +void nm_vpn_plugin_old_set_state(NMVpnPluginOld *plugin, NMVpnServiceState state); + +NM_DEPRECATED_IN_1_2 +void +nm_vpn_plugin_old_secrets_required(NMVpnPluginOld *plugin, const char *message, const char **hints); + +NM_DEPRECATED_IN_1_2 +void nm_vpn_plugin_old_set_login_banner(NMVpnPluginOld *plugin, const char *banner); + +NM_DEPRECATED_IN_1_2 +void nm_vpn_plugin_old_failure(NMVpnPluginOld *plugin, NMVpnPluginFailure reason); + +NM_DEPRECATED_IN_1_2 +void nm_vpn_plugin_old_set_config(NMVpnPluginOld *plugin, GVariant *config); + +NM_DEPRECATED_IN_1_2 +void nm_vpn_plugin_old_set_ip4_config(NMVpnPluginOld *plugin, GVariant *ip4_config); + +NM_DEPRECATED_IN_1_2 +void nm_vpn_plugin_old_set_ip6_config(NMVpnPluginOld *plugin, GVariant *ip6_config); + +NM_DEPRECATED_IN_1_2 +gboolean nm_vpn_plugin_old_disconnect(NMVpnPluginOld *plugin, GError **err); + +/* Utility functions */ + +NM_DEPRECATED_IN_1_2 +gboolean +nm_vpn_plugin_old_read_vpn_details(int fd, GHashTable **out_data, GHashTable **out_secrets); + +NM_DEPRECATED_IN_1_2 +gboolean nm_vpn_plugin_old_get_secret_flags(GHashTable * data, + const char * secret_name, + NMSettingSecretFlags *out_flags); + +G_END_DECLS + +#endif /* __NM_VPN_PLUGIN_OLD_H__ */ diff --git a/src/libnm-client-public/nm-vpn-service-plugin.h b/src/libnm-client-public/nm-vpn-service-plugin.h new file mode 100644 index 00000000..e45622aa --- /dev/null +++ b/src/libnm-client-public/nm-vpn-service-plugin.h @@ -0,0 +1,142 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2007 - 2008 Novell, Inc. + * Copyright (C) 2007 - 2015 Red Hat, Inc. + */ + +#ifndef __NM_VPN_SERVICE_PLUGIN_H__ +#define __NM_VPN_SERVICE_PLUGIN_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include <gio/gio.h> +#include "nm-vpn-dbus-interface.h" +#include "nm-connection.h" + +G_BEGIN_DECLS + +#define NM_TYPE_VPN_SERVICE_PLUGIN (nm_vpn_service_plugin_get_type()) +#define NM_VPN_SERVICE_PLUGIN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_VPN_SERVICE_PLUGIN, NMVpnServicePlugin)) +#define NM_VPN_SERVICE_PLUGIN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_VPN_SERVICE_PLUGIN, NMVpnServicePluginClass)) +#define NM_IS_VPN_SERVICE_PLUGIN(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_VPN_SERVICE_PLUGIN)) +#define NM_IS_VPN_SERVICE_PLUGIN_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_VPN_SERVICE_PLUGIN)) +#define NM_VPN_SERVICE_PLUGIN_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_VPN_SERVICE_PLUGIN, NMVpnServicePluginClass)) + +#define NM_VPN_SERVICE_PLUGIN_DBUS_SERVICE_NAME "service-name" +#define NM_VPN_SERVICE_PLUGIN_DBUS_WATCH_PEER "watch-peer" +#define NM_VPN_SERVICE_PLUGIN_STATE "state" + +/** + * NMVpnServicePlugin: + */ +typedef struct { + NM_AVAILABLE_IN_1_2 + GObject parent; +} NMVpnServicePlugin NM_AVAILABLE_IN_1_2; + +typedef struct { + NM_AVAILABLE_IN_1_2 + GObjectClass parent; + + /* Signals */ + NM_AVAILABLE_IN_1_2 + void (*state_changed)(NMVpnServicePlugin *plugin, NMVpnServiceState state); + + NM_AVAILABLE_IN_1_2 + void (*ip4_config)(NMVpnServicePlugin *plugin, GVariant *ip4_config); + + NM_AVAILABLE_IN_1_2 + void (*login_banner)(NMVpnServicePlugin *plugin, const char *banner); + + NM_AVAILABLE_IN_1_2 + void (*failure)(NMVpnServicePlugin *plugin, NMVpnPluginFailure reason); + + NM_AVAILABLE_IN_1_2 + void (*quit)(NMVpnServicePlugin *plugin); + + NM_AVAILABLE_IN_1_2 + void (*config)(NMVpnServicePlugin *plugin, GVariant *config); + + NM_AVAILABLE_IN_1_2 + void (*ip6_config)(NMVpnServicePlugin *plugin, GVariant *config); + + /* virtual methods */ + NM_AVAILABLE_IN_1_2 + gboolean (*connect)(NMVpnServicePlugin *plugin, NMConnection *connection, GError **err); + + NM_AVAILABLE_IN_1_2 + gboolean (*need_secrets)(NMVpnServicePlugin *plugin, + NMConnection * connection, + const char ** setting_name, + GError ** error); + + NM_AVAILABLE_IN_1_2 + gboolean (*disconnect)(NMVpnServicePlugin *plugin, GError **err); + + NM_AVAILABLE_IN_1_2 + gboolean (*new_secrets)(NMVpnServicePlugin *plugin, NMConnection *connection, GError **error); + + NM_AVAILABLE_IN_1_2 + gboolean (*connect_interactive)(NMVpnServicePlugin *plugin, + NMConnection * connection, + GVariant * details, + GError ** error); + + /*< private >*/ + NM_AVAILABLE_IN_1_2 + gpointer padding[8]; +} NMVpnServicePluginClass NM_AVAILABLE_IN_1_2; + +NM_AVAILABLE_IN_1_2 +GType nm_vpn_service_plugin_get_type(void); + +NM_AVAILABLE_IN_1_2 +GDBusConnection *nm_vpn_service_plugin_get_connection(NMVpnServicePlugin *plugin); + +NM_AVAILABLE_IN_1_2 +void nm_vpn_service_plugin_secrets_required(NMVpnServicePlugin *plugin, + const char * message, + const char ** hints); + +NM_AVAILABLE_IN_1_2 +void nm_vpn_service_plugin_set_login_banner(NMVpnServicePlugin *plugin, const char *banner); + +NM_AVAILABLE_IN_1_2 +void nm_vpn_service_plugin_failure(NMVpnServicePlugin *plugin, NMVpnPluginFailure reason); + +NM_AVAILABLE_IN_1_2 +void nm_vpn_service_plugin_set_config(NMVpnServicePlugin *plugin, GVariant *config); + +NM_AVAILABLE_IN_1_2 +void nm_vpn_service_plugin_set_ip4_config(NMVpnServicePlugin *plugin, GVariant *ip4_config); + +NM_AVAILABLE_IN_1_2 +void nm_vpn_service_plugin_set_ip6_config(NMVpnServicePlugin *plugin, GVariant *ip6_config); + +NM_AVAILABLE_IN_1_2 +gboolean nm_vpn_service_plugin_disconnect(NMVpnServicePlugin *plugin, GError **err); + +NM_AVAILABLE_IN_1_12 +void nm_vpn_service_plugin_shutdown(NMVpnServicePlugin *plugin); + +/* Utility functions */ + +NM_AVAILABLE_IN_1_2 +gboolean +nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable **out_secrets); + +NM_AVAILABLE_IN_1_2 +gboolean nm_vpn_service_plugin_get_secret_flags(GHashTable * data, + const char * secret_name, + NMSettingSecretFlags *out_flags); + +G_END_DECLS + +#endif /* __NM_VPN_SERVICE_PLUGIN_H__ */ diff --git a/src/libnm-client-public/nm-wifi-p2p-peer.h b/src/libnm-client-public/nm-wifi-p2p-peer.h new file mode 100644 index 00000000..4ab7c0e6 --- /dev/null +++ b/src/libnm-client-public/nm-wifi-p2p-peer.h @@ -0,0 +1,79 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2018 - 2019 Red Hat, Inc. + */ + +#ifndef __NM_WIFI_P2P_PEER_H__ +#define __NM_WIFI_P2P_PEER_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_WIFI_P2P_PEER (nm_wifi_p2p_peer_get_type()) +#define NM_WIFI_P2P_PEER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeer)) +#define NM_WIFI_P2P_PEER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeerClass)) +#define NM_IS_WIFI_P2P_PEER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_WIFI_P2P_PEER)) +#define NM_IS_WIFI_P2P_PEER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_WIFI_P2P_PEER)) +#define NM_WIFI_P2P_PEER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeerClass)) + +#define NM_WIFI_P2P_PEER_FLAGS "flags" +#define NM_WIFI_P2P_PEER_NAME "name" +#define NM_WIFI_P2P_PEER_MANUFACTURER "manufacturer" +#define NM_WIFI_P2P_PEER_MODEL "model" +#define NM_WIFI_P2P_PEER_MODEL_NUMBER "model-number" +#define NM_WIFI_P2P_PEER_SERIAL "serial" +#define NM_WIFI_P2P_PEER_WFD_IES "wfd-ies" +#define NM_WIFI_P2P_PEER_HW_ADDRESS "hw-address" +#define NM_WIFI_P2P_PEER_STRENGTH "strength" +#define NM_WIFI_P2P_PEER_LAST_SEEN "last-seen" + +/** + * NMWifiP2PPeer: + */ +typedef struct _NMWifiP2PPeerClass NMWifiP2PPeerClass; + +NM_AVAILABLE_IN_1_16 +GType nm_wifi_p2p_peer_get_type(void); + +NM_AVAILABLE_IN_1_16 +NM80211ApFlags nm_wifi_p2p_peer_get_flags(NMWifiP2PPeer *peer); + +NM_AVAILABLE_IN_1_16 +const char *nm_wifi_p2p_peer_get_name(NMWifiP2PPeer *peer); +NM_AVAILABLE_IN_1_16 +const char *nm_wifi_p2p_peer_get_manufacturer(NMWifiP2PPeer *peer); +NM_AVAILABLE_IN_1_16 +const char *nm_wifi_p2p_peer_get_model(NMWifiP2PPeer *peer); +NM_AVAILABLE_IN_1_16 +const char *nm_wifi_p2p_peer_get_model_number(NMWifiP2PPeer *peer); +NM_AVAILABLE_IN_1_16 +const char *nm_wifi_p2p_peer_get_serial(NMWifiP2PPeer *peer); + +NM_AVAILABLE_IN_1_16 +GBytes *nm_wifi_p2p_peer_get_wfd_ies(NMWifiP2PPeer *peer); + +NM_AVAILABLE_IN_1_16 +const char *nm_wifi_p2p_peer_get_hw_address(NMWifiP2PPeer *peer); + +NM_AVAILABLE_IN_1_16 +guint8 nm_wifi_p2p_peer_get_strength(NMWifiP2PPeer *peer); +NM_AVAILABLE_IN_1_16 +int nm_wifi_p2p_peer_get_last_seen(NMWifiP2PPeer *peer); + +NM_AVAILABLE_IN_1_16 +GPtrArray *nm_wifi_p2p_peer_filter_connections(NMWifiP2PPeer *peer, const GPtrArray *connections); + +NM_AVAILABLE_IN_1_16 +gboolean nm_wifi_p2p_peer_connection_valid(NMWifiP2PPeer *peer, NMConnection *connection); + +G_END_DECLS + +#endif /* __NM_WIFI_P2P_PEER_H__ */ diff --git a/src/libnm-client-public/nm-wimax-nsp.h b/src/libnm-client-public/nm-wimax-nsp.h new file mode 100644 index 00000000..15b8daa0 --- /dev/null +++ b/src/libnm-client-public/nm-wimax-nsp.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2009 Novell, Inc. + */ + +#ifndef __NM_WIMAX_NSP_H__ +#define __NM_WIMAX_NSP_H__ + +#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) + #error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-object.h" + +G_BEGIN_DECLS + +#define NM_TYPE_WIMAX_NSP (nm_wimax_nsp_get_type()) +#define NM_WIMAX_NSP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_WIMAX_NSP, NMWimaxNsp)) +#define NM_WIMAX_NSP_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_WIMAX_NSP, NMWimaxNspClass)) +#define NM_IS_WIMAX_NSP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_WIMAX_NSP)) +#define NM_IS_WIMAX_NSP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_WIMAX_NSP)) +#define NM_WIMAX_NSP_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_WIMAX_NSP, NMWimaxNspClass)) + +#define NM_WIMAX_NSP_NAME "name" +#define NM_WIMAX_NSP_SIGNAL_QUALITY "signal-quality" +#define NM_WIMAX_NSP_NETWORK_TYPE "network-type" + +/** + * NMWimaxNsp: + * + * Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0. + */ +typedef struct _NMWimaxNspClass NMWimaxNspClass; + +GType nm_wimax_nsp_get_type(void); + +NM_DEPRECATED_IN_1_22 +const char *nm_wimax_nsp_get_name(NMWimaxNsp *nsp); +NM_DEPRECATED_IN_1_22 +guint32 nm_wimax_nsp_get_signal_quality(NMWimaxNsp *nsp); +NM_DEPRECATED_IN_1_22 +NMWimaxNspNetworkType nm_wimax_nsp_get_network_type(NMWimaxNsp *nsp); + +NM_DEPRECATED_IN_1_22 +GPtrArray *nm_wimax_nsp_filter_connections(NMWimaxNsp *nsp, const GPtrArray *connections); + +NM_DEPRECATED_IN_1_22 +gboolean nm_wimax_nsp_connection_valid(NMWimaxNsp *nsp, NMConnection *connection); + +G_END_DECLS + +#endif /* __NM_WIMAX_NSP_H__ */ |