C# Class OpenHome.Net.Device.DvInvocation

Utility class used by providers to read input and write output arguments
Only intended for use by auto-generated providers
Inheritance: IDvInvocation
Datei anzeigen Open project: openhome/ohNet

Protected Properties

Property Type Description
iHandle System.IntPtr

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

Adapter() public method

Get the network adapter an action was invoked using.
public Adapter ( ) : uint
return uint

DvInvocation() public method

Constructor
public DvInvocation ( IntPtr aHandle ) : System
aHandle System.IntPtr 'aInvocation' argument to ActionDelegate
return System

GetClientEndpoint() public method

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]
return void

ReadBinary() public method

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
return byte[]

ReadBool() public method

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
return bool

ReadEnd() public method

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
return void

ReadInt() public method

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
return int

ReadStart() public method

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
return void

ReadString() public method

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
return String

ReadUint() public method

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
return uint

ReportActionError() public method

public ReportActionError ( ActionError aException, string aActionName ) : void
aException ActionError
aActionName string
return void

ReportError() public method

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
return void

ResourceUriPrefix() public method

Get the prefix to use on any uris to resources offered by the provider.
public ResourceUriPrefix ( ) : string
return string

Version() public method

Get the version number of the service requested by the caller.
public Version ( ) : uint
return uint

WriteBinary() public method

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
return void

WriteBool() public method

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
return void

WriteEnd() public method

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
return void

WriteInt() public method

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
return void

WriteStart() public method

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
return void

WriteString() public method

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
return void

WriteUint() public method

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
return void

Property Details

iHandle protected_oe property

protected IntPtr,System iHandle
return System.IntPtr