C# Класс 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().
Наследование: ICpDeviceList, IDisposable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
iAdded ChangeHandler
iFnAdded CallbackDevice
iFnRemoved CallbackDevice
iGch System.Runtime.InteropServices.GCHandle
iHandle System.IntPtr
iRemoved ChangeHandler

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
CpDeviceList ( ) : System

Приватные методы

Метод Описание
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

Описание методов

CpDeviceList() защищенный Метод

protected CpDeviceList ( ) : System
Результат System

Dispose() публичный Метод

Must be called for each class instance. Must be called before Core.Library.Close().
public Dispose ( ) : void
Результат void

Refresh() публичный Метод

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
Результат void

Описание свойств

iAdded защищенное свойство

protected ChangeHandler iAdded
Результат ChangeHandler

iFnAdded защищенное свойство

protected CallbackDevice iFnAdded
Результат CallbackDevice

iFnRemoved защищенное свойство

protected CallbackDevice iFnRemoved
Результат CallbackDevice

iGch защищенное свойство

protected GCHandle,System.Runtime.InteropServices iGch
Результат System.Runtime.InteropServices.GCHandle

iHandle защищенное свойство

protected IntPtr,System iHandle
Результат System.IntPtr

iRemoved защищенное свойство

protected ChangeHandler iRemoved
Результат ChangeHandler