NM.DeviceWifiP2P

g GObject.Object GObject.Object NM.Object NM.Object GObject.Object->NM.Object NM.Device NM.Device NM.DeviceWifiP2P NM.DeviceWifiP2P NM.Device->NM.DeviceWifiP2P NM.Object->NM.Device

Subclasses:

None

Methods

Inherited:

NM.Device (54), NM.Object (2), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_peer_by_path (path)

get_peers ()

start_find (options, cancellable, callback, *user_data)

start_find_finish (result)

stop_find (cancellable, callback, *user_data)

stop_find_finish (result)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Device (32), NM.Object (2)

Name

Type

Flags

Short Description

peers

GLib.PtrArray

r

Signals

Inherited:

NM.Device (1), GObject.Object (1)

Name

Short Description

peer-added

Notifies that a NM.WifiP2PPeer is added to the Wi-Fi P2P device.

peer-removed

Notifies that a NM.WifiP2PPeer is removed from the Wi-Fi P2P device.

Fields

Inherited:

NM.Device (1), GObject.Object (1)

Class Details

class NM.DeviceWifiP2P(**kwargs)
Bases:

NM.Device

Abstract:

No

Structure:

NM.DeviceWifiP2PClass

New in version 1.16.

get_peer_by_path(path)
Parameters:

path (str) – the object path of the peer

Returns:

the peer or None if none is found.

Return type:

NM.WifiP2PPeer

Gets a NM.WifiP2PPeer by path.

New in version 1.42.

get_peers()
Returns:

a GLib.PtrArray containing all the found NM.WifiP2PPeers. The returned array is owned by the client and should not be modified.

Return type:

[NM.WifiP2PPeer]

Gets all the found peers of the NM.DeviceWifiP2P.

New in version 1.16.

start_find(options, cancellable, callback, *user_data)
Parameters:

Request NM to search for Wi-Fi P2P peers on self. Note that the call returns immediately after requesting the find, and it may take some time after that for peers to be found.

The find operation will run for 30s by default. You can stop it earlier using nm_device_p2p_wifi_stop_find().

New in version 1.16.

start_find_finish(result)
Parameters:

result (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the call was successful

Return type:

bool

Finish an operation started by NM.DeviceWifiP2P.start_find().

New in version 1.16.

stop_find(cancellable, callback, *user_data)
Parameters:

Request NM to stop any ongoing find operation for Wi-Fi P2P peers on self.

New in version 1.16.

stop_find_finish(result)
Parameters:

result (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the call was successful

Return type:

bool

Finish an operation started by NM.DeviceWifiP2P.stop_find().

New in version 1.16.

Signal Details

NM.DeviceWifiP2P.signals.peer_added(device_wifi_p2_p, peer)
Signal Name:

peer-added

Flags:

RUN_FIRST

Parameters:

Notifies that a NM.WifiP2PPeer is added to the Wi-Fi P2P device.

New in version 1.16.

NM.DeviceWifiP2P.signals.peer_removed(device_wifi_p2_p, peer)
Signal Name:

peer-removed

Flags:

RUN_FIRST

Parameters:

Notifies that a NM.WifiP2PPeer is removed from the Wi-Fi P2P device.

New in version 1.16.

Property Details

NM.DeviceWifiP2P.props.peers
Name:

peers

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE

List of all Wi-Fi P2P peers the device can see.

New in version 1.16.