C# Класс OpenHome.Net.Device.DvInvocation

Utility class used by providers to read input and write output arguments
Only intended for use by auto-generated providers
Наследование: IDvInvocation
Показать файл Открыть проект

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

Свойство Тип Описание
iHandle System.IntPtr

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

Метод Описание
Adapter ( ) : uint

Get the network adapter an action was invoked using.

DvInvocation ( IntPtr aHandle ) : System

Constructor

GetClientEndpoint ( uint &aAddress, uint &aPort ) : void

Get the endpoint of the client.

ReadBinary ( String aName ) : byte[]

Read the value of a binary input argument for an invocation

ReadBool ( String aName ) : bool

Read the value of a boolean input argument for an invocation

ReadEnd ( ) : void

Complete reading (input arguments for) an invocation

Must be called after the values of all input arguments are read. Must be called for invocations with no input arguments.

ReadInt ( String aName ) : int

Read the value of an integer input argument for an invocation

ReadStart ( ) : void

Begin reading (input arguments for) an invocation

Must be called before the values of any input arguments are read. Must be called for invocations with no input arguments.

ReadString ( String aName ) : String

Read the value of a string input argument for an invocation

ReadUint ( String aName ) : uint

Read the value of an unsigned integer input argument for an invocation

ReportActionError ( ActionError aException, string aActionName ) : void
ReportError ( uint aCode, String aDescription ) : void

Report an error reading or writing an invocation

Must be called if ReadEnd() isn't reached. May be called if WriteStart() or later have been called.

ResourceUriPrefix ( ) : string

Get the prefix to use on any uris to resources offered by the provider.

Version ( ) : uint

Get the version number of the service requested by the caller.

WriteBinary ( String aName, byte aData ) : void

Set the value of a binary output argument for an invocation.

WriteBool ( String aName, bool aValue ) : void

Set the value of a boolean output argument for an invocation.

WriteEnd ( ) : void

Complete writing (output arguments for) an invocation

Must be called after the values of all output arguments are written. Must be called for invocations with no output arguments.

WriteInt ( String aName, int aValue ) : void

Set the value of an integer output argument for an invocation.

WriteStart ( ) : void

Begin reading (output arguments for) an invocation

Must be called before the values of any output arguments are written. Must be called for invocations with no output arguments.

WriteString ( String aName, String aValue ) : void

Set the value of a string output argument for an invocation.

WriteUint ( String aName, uint aValue ) : void

Set the value of an unsigned integer output argument for an invocation.

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

Метод Описание
CheckError ( int aError ) : void
DvInvocationGetAdapter ( IntPtr aInvocation, uint &aAdapter ) : void
DvInvocationGetClientEndpoint ( IntPtr aInvocation, uint &aAddress, uint &aPort ) : void
DvInvocationGetResourceUriPrefix ( IntPtr aInvocation, IntPtr &aPrefix, uint &aLen ) : void
DvInvocationGetVersion ( IntPtr aInvocation, uint &aVersion ) : void
DvInvocationReadBinary ( IntPtr aInvocation, IntPtr aName, IntPtr &aData, uint &aLen ) : int
DvInvocationReadBool ( IntPtr aInvocation, IntPtr aName, uint &aValue ) : int
DvInvocationReadEnd ( IntPtr aInvocation ) : int
DvInvocationReadInt ( IntPtr aInvocation, IntPtr aName, int &aValue ) : int
DvInvocationReadStart ( IntPtr aInvocation ) : int
DvInvocationReadStringAsBuffer ( IntPtr aInvocation, IntPtr aName, IntPtr &aValue, uint &aLen ) : int
DvInvocationReadUint ( IntPtr aInvocation, IntPtr aName, uint &aValue ) : int
DvInvocationReportError ( IntPtr aInvocation, uint aCode, IntPtr aDescription ) : int
DvInvocationWriteBinary ( IntPtr aInvocation, IntPtr aData, uint aLen ) : int
DvInvocationWriteBinaryEnd ( IntPtr aInvocation, IntPtr aName ) : int
DvInvocationWriteBinaryStart ( IntPtr aInvocation, IntPtr aName ) : int
DvInvocationWriteBool ( IntPtr aInvocation, IntPtr aName, uint aValue ) : int
DvInvocationWriteEnd ( IntPtr aInvocation ) : int
DvInvocationWriteInt ( IntPtr aInvocation, IntPtr aName, int aValue ) : int
DvInvocationWriteStart ( IntPtr aInvocation ) : int
DvInvocationWriteString ( IntPtr aInvocation, IntPtr aValue ) : int
DvInvocationWriteStringEnd ( IntPtr aInvocation, IntPtr aName ) : int
DvInvocationWriteStringStart ( IntPtr aInvocation, IntPtr aName ) : int
DvInvocationWriteUint ( IntPtr aInvocation, IntPtr aName, uint aValue ) : int
OhNetFree ( IntPtr aPtr ) : void

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

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

Get the network adapter an action was invoked using.
public Adapter ( ) : uint
Результат uint

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

Constructor
public DvInvocation ( IntPtr aHandle ) : System
aHandle System.IntPtr 'aInvocation' argument to ActionDelegate
Результат System

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

Get the endpoint of the client.
public GetClientEndpoint ( uint &aAddress, uint &aPort ) : void
aAddress uint IPv4 address in network byte order
aPort uint Client's port [1..65535]
Результат void

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

Read the value of a binary input argument for an invocation
public ReadBinary ( String aName ) : byte[]
aName String Name of the parameter associated with this input argument
Результат byte[]

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

Read the value of a boolean input argument for an invocation
public ReadBool ( String aName ) : bool
aName String Name of the parameter associated with this input argument
Результат bool

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

Complete reading (input arguments for) an invocation
Must be called after the values of all input arguments are read. Must be called for invocations with no input arguments.
public ReadEnd ( ) : void
Результат void

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

Read the value of an integer input argument for an invocation
public ReadInt ( String aName ) : int
aName String Name of the parameter associated with this input argument
Результат int

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

Begin reading (input arguments for) an invocation
Must be called before the values of any input arguments are read. Must be called for invocations with no input arguments.
public ReadStart ( ) : void
Результат void

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

Read the value of a string input argument for an invocation
public ReadString ( String aName ) : String
aName String Name of the parameter associated with this input argument
Результат String

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

Read the value of an unsigned integer input argument for an invocation
public ReadUint ( String aName ) : uint
aName String Name of the parameter associated with this input argument
Результат uint

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

public ReportActionError ( ActionError aException, string aActionName ) : void
aException ActionError
aActionName string
Результат void

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

Report an error reading or writing an invocation
Must be called if ReadEnd() isn't reached. May be called if WriteStart() or later have been called.
public ReportError ( uint aCode, String aDescription ) : void
aCode uint Error code
aDescription String Error description
Результат void

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

Get the prefix to use on any uris to resources offered by the provider.
public ResourceUriPrefix ( ) : string
Результат string

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

Get the version number of the service requested by the caller.
public Version ( ) : uint
Результат uint

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

Set the value of a binary output argument for an invocation.
public WriteBinary ( String aName, byte aData ) : void
aName String Name of the parameter associated with this output argument
aData byte Value of the output argument
Результат void

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

Set the value of a boolean output argument for an invocation.
public WriteBool ( String aName, bool aValue ) : void
aName String Name of the parameter associated with this output argument
aValue bool Value of the output argument
Результат void

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

Complete writing (output arguments for) an invocation
Must be called after the values of all output arguments are written. Must be called for invocations with no output arguments.
public WriteEnd ( ) : void
Результат void

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

Set the value of an integer output argument for an invocation.
public WriteInt ( String aName, int aValue ) : void
aName String Name of the parameter associated with this output argument
aValue int Value of the output argument
Результат void

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

Begin reading (output arguments for) an invocation
Must be called before the values of any output arguments are written. Must be called for invocations with no output arguments.
public WriteStart ( ) : void
Результат void

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

Set the value of a string output argument for an invocation.
public WriteString ( String aName, String aValue ) : void
aName String Name of the parameter associated with this output argument
aValue String Value of the output argument
Результат void

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

Set the value of an unsigned integer output argument for an invocation.
public WriteUint ( String aName, uint aValue ) : void
aName String Name of the parameter associated with this output argument
aValue uint Value of the output argument
Результат void

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

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

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