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
Показать файл Открыть проект Примеры использования класса

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

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