C# 클래스 OpenHome.Net.ControlPoint.CpDevice

Protocol-independent device
Instance of this class are reference counted and are automatically deleted when the reference count falls to zero. All references to class instances must have been removed before Core.Library.Close() is called.
상속: ICpDevice
파일 보기 프로젝트 열기: openhome/ohNet 1 사용 예제들

공개 메소드들

메소드 설명
AddRef ( ) : void

Claim a reference to a device.

Can only be called from code that can guarantee another reference is already held. Each call to AddRef() must later have exactly one matching call to RemoveRef().

CpDevice ( IntPtr aHandle ) : System

Constructor. Not intended for external use.

Devices should be constructed via CpDevice or CpDeviceList subclasses.

GetAttribute ( string aKey, string &aValue ) : bool

Query the value of one of the device's attributes

Handle ( ) : IntPtr

Get the handle to the underlying native device

RemoveRef ( ) : void

Remove a reference to a device.

Removing the final reference causes a device to be deleted.

Udn ( ) : String

Query the unique identifier associated with a device

비공개 메소드들

메소드 설명
CpDeviceCAddRef ( IntPtr aDevice ) : void
CpDeviceCGetAttribute ( IntPtr aDevice, IntPtr aKey, IntPtr &aValue ) : int
CpDeviceCGetUdn ( IntPtr aDevice, IntPtr &aUdn, uint &aLen ) : void
CpDeviceCRemoveRef ( IntPtr aDevice ) : void
OhNetFree ( IntPtr aPtr ) : void

메소드 상세

AddRef() 공개 메소드

Claim a reference to a device.
Can only be called from code that can guarantee another reference is already held. Each call to AddRef() must later have exactly one matching call to RemoveRef().
public AddRef ( ) : void
리턴 void

CpDevice() 공개 메소드

Constructor. Not intended for external use.
Devices should be constructed via CpDevice or CpDeviceList subclasses.
public CpDevice ( IntPtr aHandle ) : System
aHandle System.IntPtr Handle to the underlying native device
리턴 System

GetAttribute() 공개 메소드

Query the value of one of the device's attributes
public GetAttribute ( string aKey, string &aValue ) : bool
aKey string The name of the attribute being queried. Available attributes /// will be listed in a protocol-specific header
aValue string The value of the attribute
리턴 bool

Handle() 공개 메소드

Get the handle to the underlying native device
public Handle ( ) : IntPtr
리턴 System.IntPtr

RemoveRef() 공개 메소드

Remove a reference to a device.
Removing the final reference causes a device to be deleted.
public RemoveRef ( ) : void
리턴 void

Udn() 공개 메소드

Query the unique identifier associated with a device
public Udn ( ) : String
리턴 String