next up previous contents index
次へ: SANE_NET_GET_PARAMETERS 上へ: Remote Procedure Call Requests 戻る: SANE_NET_GET_OPTION_DESCRIPTORS   目次   索引


SANE_NET_CONTROL_OPTION

This RPC is used to control (inquire, set, or set to automatic) a specific option of a remote SANE device.

request: reply:
SANE_Word handle SANE_Status status
SANE_Word option SANE_Word info
SANE_Word action SANE_Word value_type
SANE_Word value_type SANE_Word value_size
SANE_Word value_size void *value
void *value SANE_String *resource
The handle argument identifies the remote device whose option should be controlled. Argument option is the number (index) of the option that should be controlled. Argument action specifies what action should be taken (get, set, or set automatic). Argument value_type specifies the type of the option value (must be one of SANE_TYPE_BOOL, SANE_TYPE_INT, SANE_TYPE_FIXED, SANE_TYPE_STRING, SANE_TYPE_BUTTON). Argument value_size specifies the size of the option value in number of bytes (see Section 4.2.9 for the precise meaning of this value). Finally, argument value is a pointer to the option value. It must be a writeable area that is at least value_size bytes large. (Note that this area must be writable even if the action is to set the option value. This is because the backend may not be able to set the exact option value, in which case the option value is used to return the next best value that the backend has chosen.)

In the reply, argument resource is set to the name of the resource that must be authorized before this call can be retried. If this value is non-NULL, all other arguments have undefined values (see Section 5.2.10 for details on how to authorize a resource). Argument status indicates the completion status. If the value is anything other than SANE_STATUS_SUCCESS, the remainder of the reply has undefined values. The info argument returns the information on how well the backend was able to satisfy the request. For details, see the description of the corresponding argument in Section 4.3.7. Arguments value_type and value_size have the same values as the arguments by the same name in corresponding request. The values are repeated here to ensure that both the request and the reply are self-contained (i.e., they can be encoded and decoded independently). Argument value is holds the value of the option that has become effective as a result of this RPC.


next up previous contents index
次へ: SANE_NET_GET_PARAMETERS 上へ: Remote Procedure Call Requests 戻る: SANE_NET_GET_OPTION_DESCRIPTORS   目次   索引
MATSUBAYASHI 'Shaolin' Kohji 平成14年10月29日