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.
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 ClientActions 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.

NameSpace: StarMicronics.CloudPrnt.CpMessage

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)

Type

Name

Description

ClientActions

type

Specify the ClientAction request type as a ClientActions Enum.

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 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(string request, string options)

Type

Name

Description

System.String

request

Specify the ClientAction request type type as a string.

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

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.