%ents; ]>
Remote Controlling Clients This document specifies recommended best practices for remote controlling clients using Ad-Hoc Commands. &LEGALNOTICE; 0146 Active Informational Standards XMPP Core XEP-0050 None None rc Remko Tronçon remko@el-tramo.be remko@fab4.be &stpeter; 1.0 2006-03-23 psa

Per a vote of the Jabber Council, advanced to Active.

0.3 2006-01-25 rt Using XEP-0033 (Extended Stanza Addressing) for Forwarding use case. 0.2 2005-03-16 rt Minor modifications; completed Set Options use case; completed Leave Groupchats use case. 0.1 2004-11-12 rt Initial version.

When one has multiple clients at different locations logged in simultaneously, it is often desirable to control these clients from the client you are currently using. There are a number of common tasks one might want to perform remotely on clients: change the status of the client, forward all received unread messages to this client, and so on. Therefore, it makes sense to define a protocol for performing these tasks.

This document describes a protocol to perform a set of common tasks on a remote client, by specifying a profile of &xep0050;.

This document addresses the following requirements:

A client MUST advertise any remote controlling commands it supports via &xep0030; (as described in XEP-0050: Ad-Hoc Commands). &xep0115; can be used to query capability of remote controlling commands in a client.

This document defines a profile of XEP-0050: Ad-Hoc Commands that enables a user to perform the following tasks on a remote client:

  1. Change status
  2. Forward unread messages residing at the remote client to the local client
  3. Change run-time options
  4. Accept pending file transfer requests
  5. Leave groupchats

Although this document aims to define common use cases for remote controlling clients, an implementation or deployment MAY support any subset and MAY support additional commands not defined herein.

Note: The text that follows assumes that implementors have read and understood XEP-0050: Ad-Hoc Commands.

It is common to forget changing the status of a resource when leaving the client for a longer period. When realizing this while at another location, it might be desirable to change the status from there, to avoid contacts thinking that resource is attended and sending it messages.

]]>

Unless an error occurs (see the Error Handling section below), the service SHOULD return the appropriate form.

Change Status Choose the status and status message http://jabber.org/protocol/rc online 5 ]]> http://jabber.org/protocol/rc xa -1 In my chamber. ]]>

If the 'status-priority' variable is omitted, the client SHOULD NOT change the priority of the client

]]>

Notification of completion MAY include the processed data in a data form of type 'result'.

A user might want to forward all the unread messages residing at the remote client to the local client (e.g. when the remote client was accidentally left on-line, and has received messages in the meantime).

For example, suppose Romeo sends a message to Juliet, thinking she is still on her balcony. The balcony client receives the message: Just saying hi Hello Juliet! ]]> However, Juliet is in her chamber, so she doesn't know about the message (yet). Realizing she left her balcony client unattended, she sends a request to the remote client to forward all unread messages. ]]> The client forwards all unread messages to the local client, adding information about the origin of the message (using the 'ofrom' &xep0033; address). The chamber client receives both these messages and a confirmation that the command was completed. Just saying hi Hello Juliet!
]]> ]]> A client MAY provide a more fine-grained implementation, e.g. by presenting the requester an extra form to select which messages have to be forwarded.

It might be desirable to remotely set some run-time options of a client. For example, when neighbours complain about the sounds your client makes while you're at another location, you could turn the sounds off at the remote client.

]]>

Unless an error occurs (see the Error Handling section below), the service SHOULD return the appropriate form.

Set Options Set the desired options http://jabber.org/protocol/rc 1 0 0 0 0 ]]> http://jabber.org/protocol/rc 0 0 0 0 0 ]]>

The remote client sets the values of the options to their requested value. If a variable is omitted, the client SHOULD NOT change the value of the corresponding option.

]]>

Notification of completion MAY include the processed data in a data form of type 'result'.

]]>

Unless an error occurs (see the Error Handling section below), the service SHOULD return the appropriate form.

Pending File Transfers Select the pending file transfers to accept http://jabber.org/protocol/rc ]]> http://jabber.org/protocol/rc romeo@example.com/orchard:2 ]]> The remote client accepts the selected file transfers, and informs the local client of completion. ]]>
]]> Leave Groupchats Choose the groupchats you want to leave http://jabber.org/protocol/rc ]]> http://jabber.org/protocol/rc jdev@conference.jabber.org/juliet girlsonly@jabber.com/juliet ]]>

The remote client leaves the requested groupchats, and informs the local client of completion.

]]>

Several error conditions are possible when an entity sends a command request to the service, as defined in the following table. If one of these errors occurs, the service MUST return an error stanza to the requesting entity.

Condition Cause
&feature; The specific command is not supported (even though the ad-hoc commands protocol is)
&forbidden; The requesting entity does not have sufficient privileges to perform the command
&unavailable; The ad-hoc commands protocol is not supported

For the syntax of these errors, see &xep0086;. Naturally, other errors may be returned as well.

Implementations of this protocol MAY add or remove fields to forms as they see fit. For example, when setting the status of a remote client that supports multiple accounts, the client may choose to add a boolean field to allow the user to specify whether the status change should be applied globally or only to the receiving account.

Implementations MAY also introduce extra forms for commands. For example, when forwarding unread messages, a client could return a form containing a list of short descriptions of unread messages, allowing the user to select the messages he wants to forward.

The ability to complete the tasks specified herein MUST NOT be granted to users who lack privileges to control a client. A sensible access policy is to only allow remote controlling by other resources of the same account used by the client. If other accounts are to be able to remote control the client, the client needs more complex access right management.

This document requires no interaction with &IANA;.

The XMPP Registrar includes 'http://jabber.org/protocol/rc' in its registry of protocol namespaces (see &NAMESPACES;).

&xep0068; defines a process for standardizing the fields used within Data Forms scoped by a particular namespace (see also &FORMTYPES;). The reserved fields for the 'http://jabber.org/protocol/rc' namespace are specified below.

http://jabber.org/protocol/rc XEP-0146 Forms used for remote controlling clients ]]>

Because the protocol defined here is a profile of XEP-0050: Ad-Hoc Commands, no schema definition is needed.