C# Class OpenHome.Net.ControlPoint.CpDeviceList

List of devices available on the current subnet
Runs callbacks when a device is detected on or removed from a network. Clients can't iterate the list's contents so must take note of the device in their 'added' callback and remove the device in their 'removed' callback. Since CpDevice instances are reference counted, a reference must be claimed inside the 'added' callback and removed inside the 'removed' callback. This class can't be directly instantiated. Clients should instead use subclasses which will define policy on how to detect devices etc. Dispose() must be called before Core.Library.Close().
Inheritance: ICpDeviceList, IDisposable
Afficher le fichier Open project: openhome/ohNet Class Usage Examples

Protected Properties

Свойство Type Description
iAdded ChangeHandler
iFnAdded CallbackDevice
iFnRemoved CallbackDevice
iGch System.Runtime.InteropServices.GCHandle
iHandle System.IntPtr
iRemoved ChangeHandler

Méthodes publiques

Méthode Description
Dispose ( ) : void

Must be called for each class instance. Must be called before Core.Library.Close().

Refresh ( ) : void

Refresh the contents of the list.

This may be a useful way to quickly update a list after a device has been removed abruptly from the network (without announcing its removal). The 'added' callback may run any time after this is called to notify new devices. Any removed devices will be notified by a burst of calls to the 'removed' callback Core.InitParams::MsearchTimeSecs() seconds after this call is made. There is no notification that a refresh has completed. Existing CpDevice instances can be used as normal throughout the refresh.

Méthodes protégées

Méthode Description
CpDeviceList ( ) : System

Private Methods

Méthode Description
Added ( IntPtr aPtr, IntPtr aHandle ) : void
CallListChangedDelegate ( ChangeHandler aDelegate, CpDeviceList aList, CpDevice aDevice ) : void
CpDeviceListDestroy ( IntPtr aListHandle ) : void
CpDeviceListRefresh ( IntPtr aListHandle ) : void
Removed ( IntPtr aPtr, IntPtr aHandle ) : void

Method Details

CpDeviceList() protected méthode

protected CpDeviceList ( ) : System
Résultat System

Dispose() public méthode

Must be called for each class instance. Must be called before Core.Library.Close().
public Dispose ( ) : void
Résultat void

Refresh() public méthode

Refresh the contents of the list.
This may be a useful way to quickly update a list after a device has been removed abruptly from the network (without announcing its removal). The 'added' callback may run any time after this is called to notify new devices. Any removed devices will be notified by a burst of calls to the 'removed' callback Core.InitParams::MsearchTimeSecs() seconds after this call is made. There is no notification that a refresh has completed. Existing CpDevice instances can be used as normal throughout the refresh.
public Refresh ( ) : void
Résultat void

Property Details

iAdded protected_oe property

protected ChangeHandler iAdded
Résultat ChangeHandler

iFnAdded protected_oe property

protected CallbackDevice iFnAdded
Résultat CallbackDevice

iFnRemoved protected_oe property

protected CallbackDevice iFnRemoved
Résultat CallbackDevice

iGch protected_oe property

protected GCHandle,System.Runtime.InteropServices iGch
Résultat System.Runtime.InteropServices.GCHandle

iHandle protected_oe property

protected IntPtr,System iHandle
Résultat System.IntPtr

iRemoved protected_oe property

protected ChangeHandler iRemoved
Résultat ChangeHandler