Class ClientActionRequest
ClientActionRequest objects represent a special request from the server to a particular client that is outside of the typical ClOUDPRNT printing/peripheral control flow. Example requests include setting a client side ID, getting the Client type or version. ClientActions are client device specific and optional, not all requests will be supported by all devices, please check the official CloudPRNT specification for your device.
To issue a ClientAction request to a device, first wait for the device to issue a PollRequest
to your server via http POST. When preparing the PollResponse
response to the device
any required ClientActionRequest objects can be added in a list to the PollResponse.clientAction
property.
A Client will provide a response/acknowledgement of the ClientActionRequests by including a list of ClientActionResult
objects in the
PollRequest.clientAction
property of a subsequent poll message.
Inheritance
Inherited Members
Namespace: StarMicronics.CloudPrnt.CpMessage
Assembly: cs.temp.dll.dll
Syntax
public class ClientActionRequest
Constructors
ClientActionRequest()
Create a ClientActionRequest object, used by a CloudPRNT server to request special functions from a CloudPRNT client device.
Created ClientActionRequest objects should be added to the List ClientActionRequest of clientAction
property of a PollResponse
object, and sent to the device in responce to receiving a PollRequest
.
Declaration
public ClientActionRequest()
ClientActionRequest(ClientActions, String)
Create a ClientActionRequest object, used by a CloudPRNT server to request special functions from a CloudPRNT client device.
Created ClientActionRequest objects should be added to the List ClientActionRequest of clientAction
property of a PollResponse
object, and sent to the device in responce to receiving a PollRequest
.
Declaration
public ClientActionRequest(ClientActions type, string options)
Parameters
Type | Name | Description |
---|---|---|
ClientActions | type | Specify the ClientAction request type as a |
System.String | options | Specify any options required by this ClientAction (for example SetID types should specify the required ID ad an option value). |
ClientActionRequest(String, String)
Create a ClientActionRequest opbect, used by a CloudPRNT server to request special functions from a CloudPRNT client device.
Created ClientActionRequest objects should be added to the List ClientActionRequest clientAction
property of a PollResponse
opvect, and sent to the device in responce to receiving a PollRequest
.
Declaration
public ClientActionRequest(string request, string options)
Parameters
Type | Name | Description |
---|---|---|
System.String | request | Specify the ClientAction request type type as a string. Please refer to the CloudPRNT specification for details of supported string values. |
System.String | options | Specify any options required by this ClientAction (for example SetID types should specify the required ID ad an option value). |
Properties
Options
Specify any options required by this ClientAction (for example SetID types should specify the required ID ad an option value).
Declaration
public string Options { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Request
Specify the ClientAction request type as a string. Please refer to the CloudPRNT specification for details of supported string values.
String values are passed directly to the client device and can be used to access (usually device specific)ClientAction behaviour that are not available through the ClientActions
Enum.
Declaration
public string Request { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Type
Specify the ClientAction request type as a ClientActions
Enum.
Declaration
public ClientActions Type { get; set; }
Property Value
Type | Description |
---|---|
ClientActions |
Methods
ClientActionFromRequestString(String)
Map a CloudPRNT ClientAction string into a ClientActions Enum value.
Declaration
public static ClientActions ClientActionFromRequestString(string request)
Parameters
Type | Name | Description |
---|---|---|
System.String | request | CloudPRNT ClientAction request value. |
Returns
Type | Description |
---|---|
ClientActions | A ClientActions Enum value that corresponds to the sgiven 'request' string, or ClientActions.Other tor any unknown strings (including strings that may be supported by the device butare not recognised by this method.) |
ClientActionRequestString(ClientActions)
Map a ClientActions Enum into the correcsponding CloudPRNT request string
Declaration
public static string ClientActionRequestString(ClientActions type)
Parameters
Type | Name | Description |
---|---|---|
ClientActions | type |
Returns
Type | Description |
---|---|
System.String | Request string that corresponds to 'type', returns an empty string if un recognised or if 'type' holds the value ClientAction.Other. |