Commit 6420a2c1 authored by Benjamin Berg's avatar Benjamin Berg Committed by Thomas Haller

libnm: Add NMDeviceP2PWifi

parent adb83384
......@@ -1044,6 +1044,7 @@ libnm_lib_h_pub_real = \
libnm/nm-device-ovs-interface.h \
libnm/nm-device-ovs-port.h \
libnm/nm-device-ovs-bridge.h \
libnm/nm-device-p2p-wifi.h \
libnm/nm-device-ppp.h \
libnm/nm-device-team.h \
libnm/nm-device-tun.h \
......@@ -1104,6 +1105,7 @@ libnm_lib_c_real = \
libnm/nm-device-ovs-interface.c \
libnm/nm-device-ovs-port.c \
libnm/nm-device-ovs-bridge.c \
libnm/nm-device-p2p-wifi.c \
libnm/nm-device-ppp.c \
libnm/nm-device-team.c \
libnm/nm-device-tun.c \
......
......@@ -261,6 +261,7 @@ print ("NetworkManager version " + client.get_version())]]></programlisting></in
<xi:include href="xml/nm-device-ovs-bridge.xml"/>
<xi:include href="xml/nm-device-ovs-interface.xml"/>
<xi:include href="xml/nm-device-ovs-port.xml"/>
<xi:include href="xml/nm-device-p2p-wifi.xml"/>
<xi:include href="xml/nm-device-ppp.xml"/>
<xi:include href="xml/nm-device-team.xml"/>
<xi:include href="xml/nm-device-tun.xml"/>
......
......@@ -46,6 +46,7 @@
#include "nm-device-ovs-interface.h"
#include "nm-device-ovs-port.h"
#include "nm-device-ovs-bridge.h"
#include "nm-device-p2p-wifi.h"
#include "nm-device-ppp.h"
#include "nm-device-team.h"
#include "nm-device-tun.h"
......
......@@ -1450,6 +1450,10 @@ global:
nm_client_add_and_activate_connection2;
nm_client_add_and_activate_connection2_finish;
nm_device_get_connectivity;
nm_device_p2p_wifi_get_group_owner;
nm_device_p2p_wifi_get_hw_address;
nm_device_p2p_wifi_get_peers;
nm_device_p2p_wifi_get_type;
nm_p2p_peer_connection_valid;
nm_p2p_peer_filter_connections;
nm_p2p_peer_get_flags;
......
......@@ -50,6 +50,7 @@ libnm_headers = files(
'nm-device-ovs-interface.h',
'nm-device-ovs-port.h',
'nm-device-ovs-bridge.h',
'nm-device-p2p-wifi.h',
'nm-device-ppp.h',
'nm-device-team.h',
'nm-device-tun.h',
......@@ -115,6 +116,7 @@ libnm_sources = files(
'nm-device-ovs-interface.c',
'nm-device-ovs-port.c',
'nm-device-ovs-bridge.c',
'nm-device-p2p-wifi.c',
'nm-device-ppp.c',
'nm-device-team.c',
'nm-device-tun.c',
......
......@@ -41,6 +41,7 @@
#include "introspection/org.freedesktop.NetworkManager.h"
#include "introspection/org.freedesktop.NetworkManager.Device.Wireless.h"
#include "introspection/org.freedesktop.NetworkManager.Device.P2PWireless.h"
#include "introspection/org.freedesktop.NetworkManager.Device.h"
#include "introspection/org.freedesktop.NetworkManager.DnsManager.h"
#include "introspection/org.freedesktop.NetworkManager.Settings.h"
......@@ -68,6 +69,7 @@
#include "nm-device-ovs-interface.h"
#include "nm-device-ovs-port.h"
#include "nm-device-ovs-bridge.h"
#include "nm-device-p2p-wifi.h"
#include "nm-device-ppp.h"
#include "nm-device-team.h"
#include "nm-device-tun.h"
......@@ -2612,6 +2614,8 @@ proxy_type (GDBusObjectManagerClient *manager,
return NMDBUS_TYPE_MANAGER_PROXY;
else if (strcmp (interface_name, NM_DBUS_INTERFACE_DEVICE_WIRELESS) == 0)
return NMDBUS_TYPE_DEVICE_WIFI_PROXY;
else if (strcmp (interface_name, NM_DBUS_INTERFACE_DEVICE_P2P_WIRELESS) == 0)
return NMDBUS_TYPE_DEVICE_P2P_WIFI_PROXY;
else if (strcmp (interface_name, NM_DBUS_INTERFACE_DEVICE) == 0)
return NMDBUS_TYPE_DEVICE_PROXY;
else if (strcmp (interface_name, NM_DBUS_INTERFACE_SETTINGS_CONNECTION) == 0)
......@@ -2690,6 +2694,8 @@ obj_nm_for_gdbus_object (NMClient *self, GDBusObject *object, GDBusObjectManager
type = NM_TYPE_DEVICE_OVS_PORT;
else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_OVS_BRIDGE) == 0)
type = NM_TYPE_DEVICE_OVS_BRIDGE;
else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_P2P_WIRELESS) == 0)
type = NM_TYPE_DEVICE_P2P_WIFI;
else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_PPP) == 0)
type = NM_TYPE_DEVICE_PPP;
else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_TEAM) == 0)
......
This diff is collapsed.
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
* Copyright 2007 - 2008 Novell, Inc.
* Copyright 2007 - 2018 Red Hat, Inc.
*/
#ifndef __NM_DEVICE_P2P_WIFI_H__
#define __NM_DEVICE_P2P_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_P2P_WIFI (nm_device_p2p_wifi_get_type ())
#define NM_DEVICE_P2P_WIFI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_P2P_WIFI, NMDeviceP2PWifi))
#define NM_DEVICE_P2P_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_P2P_WIFI, NMDeviceP2PWifiClass))
#define NM_IS_DEVICE_P2P_WIFI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_P2P_WIFI))
#define NM_IS_DEVICE_P2P_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_P2P_WIFI))
#define NM_DEVICE_P2P_WIFI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_P2P_WIFI, NMDeviceP2PWifiClass))
#define NM_DEVICE_P2P_WIFI_HW_ADDRESS "hw-address"
#define NM_DEVICE_P2P_WIFI_GROUP_OWNER "group-owner"
#define NM_DEVICE_P2P_WIFI_PEERS "peers"
#define NM_DEVICE_P2P_WIFI_WFDIES "wfdies"
/**
* NMDeviceP2PWifi:
*/
struct _NMDeviceP2PWifi {
NMDevice parent;
};
typedef struct {
NMDeviceClass parent;
/* Signals */
void (*peer_added) (NMDeviceP2PWifi *device, NMP2PPeer *peer);
void (*peer_removed) (NMDeviceP2PWifi *device, NMP2PPeer *peer);
/*< private >*/
gpointer padding[4];
} NMDeviceP2PWifiClass;
GType nm_device_p2p_wifi_get_type (void);
const char * nm_device_p2p_wifi_get_hw_address (NMDeviceP2PWifi *device);
gboolean nm_device_p2p_wifi_get_group_owner (NMDeviceP2PWifi *device);
#if 0
gboolean nm_device_p2p_wifi_get_wfdies (NMDeviceP2PWifi *device);
#endif
NMP2PPeer * nm_device_p2p_wifi_get_peer_by_path (NMDeviceP2PWifi *device,
const char *path);
const GPtrArray * nm_device_p2p_wifi_get_peers (NMDeviceP2PWifi *device);
G_END_DECLS
#endif /* __NM_DEVICE_P2P_WIFI_H__ */
......@@ -54,6 +54,7 @@ typedef struct _NMDeviceTun NMDeviceTun;
typedef struct _NMDeviceVlan NMDeviceVlan;
typedef struct _NMDeviceVxlan NMDeviceVxlan;
typedef struct _NMDeviceWifi NMDeviceWifi;
typedef struct _NMDeviceP2PWifi NMDeviceP2PWifi;
typedef struct _NMDeviceWimax NMDeviceWimax;
typedef struct _NMDeviceWireGuard NMDeviceWireGuard;
typedef struct _NMDeviceWpan NMDeviceWpan;
......
......@@ -152,6 +152,7 @@ libnm/nm-device-olpc-mesh.c
libnm/nm-device-ovs-bridge.c
libnm/nm-device-ovs-interface.c
libnm/nm-device-ovs-port.c
libnm/nm-device-p2p-wifi.c
libnm/nm-device-team.c
libnm/nm-device-vlan.c
libnm/nm-device-vxlan.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment