Table of Contents

Class WifiP2pManager.WifiP2pListener

Namespace
Android.Net.Wifi.P2p
Assembly
MASES.Netdroid.dll
public class WifiP2pManager.WifiP2pListener : JVMBridgeListener, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition
Inheritance
WifiP2pManager.WifiP2pListener
Implements
Derived
Extension Methods

Constructors

WifiP2pListener(IJVMBridgeBaseInitializer)

Initializer used internally by JCOBridge. Do not use directly.

[Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentifiable behaviors.")]
public WifiP2pListener(IJVMBridgeBaseInitializer initializer)

Parameters

initializer IJVMBridgeBaseInitializer

WifiP2pListener(params object[])

Generic constructor used by JCOBridge when a derived class needs to forward arguments to the base JVMBridgeBase class.

public WifiP2pListener(params object[] args)

Parameters

args object[]

Properties

BridgeClassName

Java class name to be instantiated

public override string BridgeClassName { get; }

Property Value

string

OnOnDeviceConfigurationChanged

public Action<WifiP2pDevice> OnOnDeviceConfigurationChanged { get; set; }

Property Value

Action<WifiP2pDevice>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnDiscoveryStateChanged

public Action<int> OnOnDiscoveryStateChanged { get; set; }

Property Value

Action<int>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnFrequencyChanged

public Action<WifiP2pInfo, WifiP2pGroup> OnOnFrequencyChanged { get; set; }

Property Value

Action<WifiP2pInfo, WifiP2pGroup>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnGroupCreated

public Action<WifiP2pInfo, WifiP2pGroup> OnOnGroupCreated { get; set; }

Property Value

Action<WifiP2pInfo, WifiP2pGroup>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnGroupCreating

public Action OnOnGroupCreating { get; set; }

Property Value

Action

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnGroupCreationFailed

public Action<int> OnOnGroupCreationFailed { get; set; }

Property Value

Action<int>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnGroupNegotiationRejectedByUser

public Action OnOnGroupNegotiationRejectedByUser { get; set; }

Property Value

Action

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnGroupRemoved

public Action OnOnGroupRemoved { get; set; }

Property Value

Action

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnListenStateChanged

public Action<int> OnOnListenStateChanged { get; set; }

Property Value

Action<int>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnP2pStateChanged

public Action<int> OnOnP2pStateChanged { get; set; }

Property Value

Action<int>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnPeerClientDisconnected

public Action<WifiP2pInfo, WifiP2pGroup> OnOnPeerClientDisconnected { get; set; }

Property Value

Action<WifiP2pInfo, WifiP2pGroup>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnPeerClientJoined

public Action<WifiP2pInfo, WifiP2pGroup> OnOnPeerClientJoined { get; set; }

Property Value

Action<WifiP2pInfo, WifiP2pGroup>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnOnPeerListChanged

public Action<WifiP2pDeviceList> OnOnPeerListChanged { get; set; }

Property Value

Action<WifiP2pDeviceList>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

Methods

InitializeHandlers(Type)

Handlers initializer for WifiP2pManager.WifiP2pListener

protected virtual void InitializeHandlers(Type listenerRuntimeType)

Parameters

listenerRuntimeType Type

ListenerShallManageEvent(int)

Invoked from the JVMBridgeListener on each received event to notify the user which can decide to abort the execution for the specific event returning false

protected override bool ListenerShallManageEvent(int eventIndex)

Parameters

eventIndex int

The index of the event triggered as returned from AddEventHandler(string, EventHandler) or AddEventHandler<TDataClass>(string, EventHandler<CLRListenerEventArgs<TDataClass>>)

Returns

bool

Returns true to continue event evaluation, false to return the control to the JVM

Remarks

By default every event continues the execution and reads the data from JVM; this implies an extra cost which can be limited using ListenerShallManageEvent(int) or the ListenerShallManageEventIndex/ListenerShallManageEventName handlers. Returning false the control is immediately returned to the JVM, anyway the user has received the notification. It can be useful in scenarios where the user is interested in few events and the other are simply discarded to optimize the execution speed. By default, this function invokes ListenerShallManageEventIndex, then try ListenerShallManageEventName if they are set or return true

ListenerShallManageEventHandlers(int)

protected virtual bool ListenerShallManageEventHandlers(int eventIndex)

Parameters

eventIndex int

Returns

bool

OnDeviceConfigurationChanged(WifiP2pDevice)

public virtual void OnDeviceConfigurationChanged(WifiP2pDevice arg0)

Parameters

arg0 WifiP2pDevice

WifiP2pDevice

Remarks

The method invokes the default implementation in the JVM interface using OnDeviceConfigurationChangedDefault(WifiP2pDevice); override the method to implement a different behavior

OnDeviceConfigurationChangedDefault(WifiP2pDevice)

public void OnDeviceConfigurationChangedDefault(WifiP2pDevice arg0)

Parameters

arg0 WifiP2pDevice

WifiP2pDevice

Remarks

The method invokes the default implementation in the JVM interface

OnDiscoveryStateChanged(int)

public virtual void OnDiscoveryStateChanged(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface using OnDiscoveryStateChangedDefault(int); override the method to implement a different behavior

OnDiscoveryStateChangedDefault(int)

public void OnDiscoveryStateChangedDefault(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface

OnFrequencyChanged(WifiP2pInfo, WifiP2pGroup)

public virtual void OnFrequencyChanged(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface using OnFrequencyChangedDefault(WifiP2pInfo, WifiP2pGroup); override the method to implement a different behavior

OnFrequencyChangedDefault(WifiP2pInfo, WifiP2pGroup)

public void OnFrequencyChangedDefault(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface

OnGroupCreated(WifiP2pInfo, WifiP2pGroup)

public virtual void OnGroupCreated(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface using OnGroupCreatedDefault(WifiP2pInfo, WifiP2pGroup); override the method to implement a different behavior

OnGroupCreatedDefault(WifiP2pInfo, WifiP2pGroup)

public void OnGroupCreatedDefault(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface

OnGroupCreating()

public virtual void OnGroupCreating()

Remarks

The method invokes the default implementation in the JVM interface using OnGroupCreatingDefault(); override the method to implement a different behavior

OnGroupCreatingDefault()

public void OnGroupCreatingDefault()

Remarks

The method invokes the default implementation in the JVM interface

OnGroupCreationFailed(int)

public virtual void OnGroupCreationFailed(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface using OnGroupCreationFailedDefault(int); override the method to implement a different behavior

OnGroupCreationFailedDefault(int)

public void OnGroupCreationFailedDefault(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface

OnGroupNegotiationRejectedByUser()

public virtual void OnGroupNegotiationRejectedByUser()

Remarks

The method invokes the default implementation in the JVM interface using OnGroupNegotiationRejectedByUserDefault(); override the method to implement a different behavior

OnGroupNegotiationRejectedByUserDefault()

public void OnGroupNegotiationRejectedByUserDefault()

Remarks

The method invokes the default implementation in the JVM interface

OnGroupRemoved()

public virtual void OnGroupRemoved()

Remarks

The method invokes the default implementation in the JVM interface using OnGroupRemovedDefault(); override the method to implement a different behavior

OnGroupRemovedDefault()

public void OnGroupRemovedDefault()

Remarks

The method invokes the default implementation in the JVM interface

OnListenStateChanged(int)

public virtual void OnListenStateChanged(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface using OnListenStateChangedDefault(int); override the method to implement a different behavior

OnListenStateChangedDefault(int)

public void OnListenStateChangedDefault(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface

OnP2pStateChanged(int)

public virtual void OnP2pStateChanged(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface using OnP2pStateChangedDefault(int); override the method to implement a different behavior

OnP2pStateChangedDefault(int)

public void OnP2pStateChangedDefault(int arg0)

Parameters

arg0 int

int

Remarks

The method invokes the default implementation in the JVM interface

OnPeerClientDisconnected(WifiP2pInfo, WifiP2pGroup)

public virtual void OnPeerClientDisconnected(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface using OnPeerClientDisconnectedDefault(WifiP2pInfo, WifiP2pGroup); override the method to implement a different behavior

OnPeerClientDisconnectedDefault(WifiP2pInfo, WifiP2pGroup)

public void OnPeerClientDisconnectedDefault(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface

OnPeerClientJoined(WifiP2pInfo, WifiP2pGroup)

public virtual void OnPeerClientJoined(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface using OnPeerClientJoinedDefault(WifiP2pInfo, WifiP2pGroup); override the method to implement a different behavior

OnPeerClientJoinedDefault(WifiP2pInfo, WifiP2pGroup)

public void OnPeerClientJoinedDefault(WifiP2pInfo arg0, WifiP2pGroup arg1)

Parameters

arg0 WifiP2pInfo

WifiP2pInfo

arg1 WifiP2pGroup

WifiP2pGroup

Remarks

The method invokes the default implementation in the JVM interface

OnPeerListChanged(WifiP2pDeviceList)

public virtual void OnPeerListChanged(WifiP2pDeviceList arg0)

Parameters

arg0 WifiP2pDeviceList

WifiP2pDeviceList

Remarks

The method invokes the default implementation in the JVM interface using OnPeerListChangedDefault(WifiP2pDeviceList); override the method to implement a different behavior

OnPeerListChangedDefault(WifiP2pDeviceList)

public void OnPeerListChangedDefault(WifiP2pDeviceList arg0)

Parameters

arg0 WifiP2pDeviceList

WifiP2pDeviceList

Remarks

The method invokes the default implementation in the JVM interface