Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

UMSrequest Struct Reference

UMS Request (from a Client to the UMS server). More...

#include <umsproto.hpp>

List of all members.

Public Types

enum  RequestType {
  MOUSE_CTRL = 1, SEND_EVENT = 2, SEND_MESSAGE = 3, OPEN_WIN = 5,
  CLOSE_WIN = 6, OPEN_CNX = 7, CLOSE_CNX = 8
}
enum  Stat { Error = -1, CloseCnx = 0, Ok = 1, KeepCnx = 2 }

Public Member Functions

 UMSrequest (unsigned char reqtype)
int size ()
 returns the size of the request (which is always a multiple of 8).
void readEvent (unsigned char &event_type, unsigned char &event_flow, long &x, long &y, unsigned long &detail)
void writeEvent (unsigned char event_type, unsigned char event_flow, long x, long y, unsigned long detail)
char readChar ()
void writeChar (char)
short readShort ()
void writeShort (short)
long readLong ()
void writeLong (long)
bool writeString (const char *)
char * getString ()
 NB: writeString() or getString must be the last call (only one string).

Public Attributes

unsigned char data [8 *256]
 data sent to the UMS
int count
 char count


Detailed Description

UMS Request (from a Client to the UMS server).

 size    reqtype    
 (octal) (u_char)   (c = u_char / c* = char* / l = long)
 ----------------------------------------------------------------------
   s   MOUSE_CTRL   (c)evtype (c)evflow (l)x (l)y (l)btn|key|mvm
   s   SEND_EVENT   (c)evtype (c)evflow (l)x (l)y (l)btn|key|mvm (c*)target...
   s   SEND_MESSAGE (c*)target... (c*)message...
   s   OPEN_WIN     (l)win_no
   s   CLOSE_WIN    (l)win_no
   s   OPEN_CNX     (c*)apname...
   s   CLOSE_CNX    (c*)apname...
 ----------------------------------------------------------------------
 target can be:
 winid[:evflow]   with winid = ascii-name-without-blanks or quoted 'asci name'
                  or decimal (1234) or hexa number (0x1234a)
 #win:/[display]/winid[:evflow]    (display is opt and ... never used)
 #ptr:/[display]/ptrid[:evflow]    with ptrid = 0, 1 ... (useless)
 


Member Data Documentation

int UMSrequest::count
 

char count

this variable is used by the write*() and read*() functions to store or retreive the data (but it is not sent to the UMS, the size/8 being eventually stored in data[0]

unsigned char UMSrequest::data[8 *256]
 

data sent to the UMS

Notes:

  • data[0]*8 is the size of the request (we send 8 byte data blocks)
  • data[1] is the RequestType


The documentation for this struct was generated from the following files:
Generated on Tue Mar 8 22:31:33 2005 for Ubit[Eric.Lecolinet@enst.fr] by  doxygen 1.4.1