Re: [RFC][PATCH resourceproto] Protocol description of X Resource Extension version 1.2.

2010-11-10 Thread Gaetan Nadon
On Wed, 2010-11-10 at 16:34 +0200, Rami Ylimäki wrote:

> Signed-off-by: Rami Ylimäki 
> ---
>  RESproto.txt |  268
> ++
>  1 files changed, 268 insertions(+), 0 deletions(-)
>  create mode 100644 RESproto.txt
> 


Acked-by: Gaetan Nadon 

We recently converted the xorg docs to DocBook/XML format and there is
no traces of such a document.
I cannot review the content, but I can push the patch once you are happy
with it.

About the filename. All other protocols text file are all lowercase.


signature.asc
Description: This is a digitally signed message part
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[RFC][PATCH resourceproto] Protocol description of X Resource Extension version 1.2.

2010-11-10 Thread Rami Ylimäki
Signed-off-by: Rami Ylimäki 
---
 RESproto.txt |  268 ++
 1 files changed, 268 insertions(+), 0 deletions(-)
 create mode 100644 RESproto.txt

diff --git a/RESproto.txt b/RESproto.txt
new file mode 100644
index 000..74193bb
--- /dev/null
+++ b/RESproto.txt
@@ -0,0 +1,268 @@
+   DRAFT FOR REVIEW
+   The X Resource Extension
+ Version 1.2
+ Rami Ylimäki
+rami.ylim...@vincit.fi
+
+ ❧❧❧
+
+1. Introduction
+
+The protocol description of X Resource Extension version 1.1 has been
+either lost or has never been written. This specification documents
+only the changes from version 1.1 to version 1.2. The X Resource
+Extension is quite simple and therefore the description of version 1.1
+could be reverse engineered into this document later if the need
+arises.
+
+Version 1.2 is a minor release and therefore the changes are
+compatible with the previous version. Main enhacements over version
+1.1 are:
+
+- Client identification is now possible. For example, servers
+  supporting version 1.2 may report PID of local clients.
+
+- Size of any resource can be queried from the server. Servers may not
+  necessarily support size calculation for every resource. However,
+  clients have now at least the chance to let the server do resource
+  size estimation for them.
+
+ ❧❧❧
+
+2. Notations used in this document
+
+Notation for data types and requests follows the guidelines set in
+sections 2-4 of X Window System Protocol standard.
+
+ ❧❧❧
+
+3. Interoperability between version 1.1 and 1.2
+
+Version 1.2 only introduces two new requests. However, these requests
+could be seen as extended versions of existing requests. Even though
+we aren't deprecating any old requests, libraries could implement some
+old requests using the new ones.
+
+The new XResQueryClientIds request could be used instead of
+XResQueryClients.
+
+The new XResQueryResourceBytes request could be used instead of
+XResQueryClientPixmapBytes.
+
+Using the old requests is still acceptable though because we don't
+want to change the existing requests between version 1.1 and 1.2.
+
+ ❧❧❧
+
+4. Data types
+
+4.1 Types in version 1.1
+
+CLIENTXIDRANGE [ resource_base: CARD32
+ resource_mask: CARD32 ]
+This type is used for reply of XResQueryClients in version 1.1.
+resource_base
+First resource ID reserved for a client. Used also to identify the
+clients themselves.
+resource_mask
+Mask that can be used to identify a client from some resource
+ID. Just zero the bits indicated by this mask from any resource ID
+to identify the client that owns the resource.
+
+4.2 Types in version 1.2
+
+4.2.1 Types used by XResQueryClientIds
+
+CLIENTIDMASK { ClientXid = 0x1, LocalClientPid = 0x2 }
+A bitmask specifying a client identification method. Currently
+only the PID of local clients is supported in the form of
+LocalClientPid. ClientXid is provided for backward compatibility
+with version 1.1 so that the new 1.2 requests (XResQueryClientIds)
+can be used in place of the older ones (XResQueryClients).
+
+CLIENTIDSPEC [ client: XID or None
+   mask:   SETofCLIENTIDMASK or None ]
+A data structure for selecting client IDs.
+client
+ID of a resource allocated for some client. Only the part
+identifying a client is actually used. The resource_base of
+CLIENTXIDRANGE can be used if the client doesn't own any
+resources. However, any resource ID is accepted because that makes
+identifying the owners of existing resources easy. The null
+resource None can be used to select all clients.
+mask
+Collection of identification methods that should be applied on the
+client. The special value None can be used to apply all supported
+identification methods.
+
+CLIENTIDVALUE [ spec:   CLIENTIDSPEC
+   length: CARD32
+value:  LISTofCARD32 ]
+A data structure specifying a single client ID.
+spec
+A unique identifier for a specific ID of some client. Wildcards
+such as None and bitmask unions aren't allowed. The data structure
+must always identify a single client and single ID type. However,
+the client doesn't have to be specified as the resource_base of
+CLIENTXIDRANGE and can be any resource owned by the client.
+length
+
+Specifies the length of an ID in units of CARD32. The length
+depends on the ID type. In version 1.2 the lengths are 0 for
+ClientXid and 4 for LocalClientPid.  The length of ClientXid is 0
+because that is already stored in the spec field.
+value
+Actual ID data. In version 1.2 this is missing for ClientXid and
+consists of a single CARD32 for LocalClientPid.
+
+