NM.WifiP2PPeer

g GObject.Object GObject.Object NM.Object NM.Object GObject.Object->NM.Object NM.WifiP2PPeer NM.WifiP2PPeer NM.Object->NM.WifiP2PPeer

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

connection_valid (connection)

filter_connections (connections)

get_flags ()

get_hw_address ()

get_last_seen ()

get_manufacturer ()

get_model ()

get_model_number ()

get_name ()

get_serial ()

get_strength ()

get_wfd_ies ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Object (2)

Name

Type

Flags

Short Description

flags

NM.80211ApFlags

r

hw-address

str

r

last-seen

int

r

manufacturer

str

r

model

str

r

model-number

str

r

name

str

r

serial

str

r

strength

r

wfd-ies

GLib.Bytes

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.WifiP2PPeer(**kwargs)
Bases:

NM.Object

Abstract:

No

Structure:

NM.WifiP2PPeerClass

New in version 1.16.

connection_valid(connection)
Parameters:

connection (NM.Connection) – an NM.Connection to validate against self

Returns:

True if the connection may be activated with this Wi-Fi P2P Peer, False if it cannot be.

Return type:

bool

Validates a given connection against a given Wi-Fi P2P peer to ensure that the connection may be activated with that peer. The connection must match the self's address and in the future possibly other attributes.

New in version 1.16.

filter_connections(connections)
Parameters:

connections ([NM.Connection]) – an array of NM.Connections to filter

Returns:

an array of NM.Connections that could be activated with the given self. The array should be freed with g_ptr_array_unref() when it is no longer required.

Return type:

[NM.Connection]

Filters a given array of connections for a given NM.WifiP2PPeer object and returns connections which may be activated with the P2P peer. Any returned connections will match the peers's HW address and in the future possibly other attributes.

To obtain the list of connections that are compatible with this P2P peer, use NM.Client.get_connections() and then filter the returned list for a given NM.Device using NM.Device.filter_connections() and finally filter that list with this function.

New in version 1.16.

get_flags()
Returns:

the flags

Return type:

NM.80211ApFlags

Gets the flags of the P2P peer.

New in version 1.16.

get_hw_address()
Returns:

the hardware address

Return type:

str

Gets the hardware address of the P2P peer.

New in version 1.16.

get_last_seen()
Returns:

the last seen time in seconds

Return type:

int

Returns the timestamp (in CLOCK_BOOTTIME seconds) for the last time the P2P peer was seen. A value of -1 means the P2P peer has never been seen.

New in version 1.16.

get_manufacturer()
Returns:

the manufacturer

Return type:

str

Gets the manufacturer of the P2P peer.

New in version 1.16.

get_model()
Returns:

the model

Return type:

str

Gets the model of the P2P peer.

New in version 1.16.

get_model_number()
Returns:

the model number

Return type:

str

Gets the model number of the P2P peer.

New in version 1.16.

get_name()
Returns:

the name

Return type:

str

Gets the name of the P2P peer.

New in version 1.16.

get_serial()
Returns:

the serial number

Return type:

str

Gets the serial number of the P2P peer.

New in version 1.16.

get_strength()
Returns:

the signal strength (0 to 100)

Return type:

int

Gets the current signal strength of the P2P peer as a percentage.

New in version 1.16.

get_wfd_ies()
Returns:

the GLib.Bytes containing the WFD IEs, or None.

Return type:

GLib.Bytes

Gets the WFD information elements of the P2P peer.

New in version 1.16.

Property Details

NM.WifiP2PPeer.props.flags
Name:

flags

Type:

NM.80211ApFlags

Default Value:

NM.80211ApFlags.NONE

Flags:

READABLE

The flags of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.hw_address
Name:

hw-address

Type:

str

Default Value:

None

Flags:

READABLE

The hardware address of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.last_seen
Name:

last-seen

Type:

int

Default Value:

-1

Flags:

READABLE

The timestamp (in CLOCK_BOOTTIME seconds) for the last time the P2P peer was found. A value of -1 means the peer has never been seen.

New in version 1.16.

NM.WifiP2PPeer.props.manufacturer
Name:

manufacturer

Type:

str

Default Value:

None

Flags:

READABLE

The manufacturer of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.model
Name:

model

Type:

str

Default Value:

None

Flags:

READABLE

The model of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.model_number
Name:

model-number

Type:

str

Default Value:

None

Flags:

READABLE

The hardware address of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE

The name of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.serial
Name:

serial

Type:

str

Default Value:

None

Flags:

READABLE

The serial number of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.strength
Name:

strength

Type:

Default Value:

0

Flags:

READABLE

The current signal strength of the P2P peer.

New in version 1.16.

NM.WifiP2PPeer.props.wfd_ies
Name:

wfd-ies

Type:

GLib.Bytes

Default Value:

None

Flags:

READABLE

The WFD information elements of the P2P peer.

New in version 1.16.