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
파일 보기 프로젝트 열기: openhome/ohNet 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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