Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File13.13.4 XACC.H TOS /*==================================================================*/ /* */ /* XAcc definitions (Pure-C syntax) */ /* */ /*==================================================================*/ #ifndef __XACC__ # define __XACC__ /*-------------------------------------------------------------------- XAcc message types --------------------------------------------------------------------*/ /* Level 0 */ # define ACC_ID 0x400 # define ACC_OPEN 0x401 # define ACC_CLOSE 0x402 # define ACC_ACC 0x403 # define ACC_EXIT 0x404 /* Level/Message group 1 */ # define ACC_ACK 0x500 # define ACC_TEXT 0x501 # define ACC_KEY 0x502 /* Level/Message group 2 */ # define ACC_META 0x503 # define ACC_IMG 0x504 /* * Extended XACC message types: * These messages are relatively 'independent' of the XACC-level * of the applications, i.e. they should be used only if the * communication partner in its XDSC description signals that it * participates in the relevant Extended feature! */ /* Reuest/Reply protocol: (Extended feature 'RQ') */ /* ACC_ACK messages are a part of the protocol */ /* and therefore must be understood! */ # define ACC_REQUEST 0x480 # define ACC_REPLY 0x481 /* Inquiry protocol: (Extended feature 'DI') */ /* ACC_ACK messages are a part of the protocol */ /* and therefore must be understood! */ #define ACC_GETDSI 0x510 #define ACC_DSINFO 0x511 #define ACC_FILEINFO 0x512 #define ACC_GETFIELDS 0x513 #define ACC_FIELDINFO 0x514 /* Remote MailMerge protocol: (Extended feature 'RM') */ /* ACC_ACK messages are a part of the protocol */ /* and therefore must be understood! */ #define ACC_FORCESDF 0x520 #define ACC_GETSDF 0x521 /*---------------------------------------------------------------------- Definitions for the Request/Reply protocol ----------------------------------------------------------------------*/ /* Data-types of the Request/Reply: */ #define RQREP_TYPE_STRING 1 #define RQREP_TYPE_ENVSTR 2 #define RQREP_TYPE_BIN 3 #define RQREP_TYPE_CODE 4 /*---------------------------------------------------------------------- Definitions for the Inquiry protocol ----------------------------------------------------------------------*/ #define DSI_VERSION 0x0100 /* Field data-types: * Values lower than 128 are 'human-readable types' and * values greater/equal 128 are 'machine-readable types' */ #define FT_CHAR 0x00 /* String */ #define FT_DATE 0x02 /* String in _IDT format */ /* Deflt: DD.MM.YY if no _IDT available; */ /* for more about _IDT see MINT */ #define FT_TIME 0x03 /* String: HH:MM:SS */ #define FT_BYTE 0x80 /* 2-byte HEX-string */ #define FT_UBYTE 0x81 /* 2-byte HEX-string, unsigned */ #define FT_SHORT 0x82 /* 4-byte HEX-string */ #define FT_USHORT 0x83 /* 4-byte HEX-string, unsigned */ #define FT_LONG 0x84 /* 8-byte HEX-string */ #define FT_ULONG 0x85 /* 8-byte HEX-string, unsigned */ #define FT_FLOAT 0x86 /* 8-byte HEX-string */ #define FT_DOUBLE 0x87 /* 20-byte HEX-string */ #define FT_ENUM 0x88 /* 4-byte HEX-string */ #define FT_BOOL 0x89 /* String: 'T' or 'F' */ #define FT_BITFLD 0x8A /* An 8-bit aligned HEX-string */ #define FT_TIME_T 0x90 /* 8-byte HEX-string (time_t, see UNIX) */ typedef struct { int version; char field_types[32]; /* Max. count of 256 field-types are */ /* available (see definements above); */ /* each bit in this field represents a */ /* valid field-type, where type 0 is */ /* the lowest bit of the first character */ /* and type 255 the highest bit of the */ /* last character */ } Xacc_Dsi_Request; typedef struct { int db_anz; /* Count of available databases */ } Xacc_Dsinfo; typedef struct { long db_id; /* ID of the database */ char fname[32]; /* Filename of the database; if you */ /* are using a GEMDOS or DOS filesystem */ /* it must have a <8.3> format. */ char title[32]; /* A max. 32 byte long description of */ /* the database */ time_t crea_time; /* The creation date/time of the */ /* database file */ time_t mod_time; /* The last modification date/time of */ /* the database structure */ int n_fields; /* The number of fields that are */ /* available corresponding to the */ /* requested field types given by the */ /* ACC_GETDSI message */ } Xacc_File_Info; typedef struct { int fld_size; /* The count of bits in the field */ int n_fields; /* The count of field elements */ int elem_size; /* The length of one field element */ char field_buff[0]; /* From here the list of the n_fields */ /* elements follows in this format: */ /* 2 byte bitno and elem_size byte- */ /* description, e.g. (elem_size=10): */ /* "\0\1private\0\0\0" */ /* "\0\2sex\0\0\0\0\0\0\0" */ /* "\0\4dealer\0\0\0\0" */ /* The value '06' identifies the 2nd */ /* and the 3rd element; */ /* NOTE that you can't use sizeof */ /* because of this declaration */ } Bitfld_Info; typedef struct { int n_enums; /* The count of enum-elements */ int elem_size; /* The length of one enum element */ char enum_buff[0]; /* From here the list of the n_enums */ /* elements follows in this format: */ /* 2 byte id and elem_size byte- */ /* description, e.g. (elem_size=10): */ /* "\0Aprivate\0\0\0" */ /* "\0Bsex\0\0\0\0\0\0\0" */ /* "\0Edealer\0\0\0\0" */ /* The value '0042' identifies the 2nd */ /* element; */ /* NOTE that you can't use sizeof */ /* because of this declaration */ } Enum_Info; typedef union { ulong n_elems; /* For types like char, uchar this is */ /* the length of the field */ Enum_Info *enum_info; /* enum is a special type, which needs */ /* more description than the length! */ Bitfld_Info *bitfld_info; /* A bitfield like used in TA2 for the */ /* info-flags */ } Type_Desc; typedef struct { char id[8]; /* The export-identifier of the corres- */ /* ponding field, i.e. 'A1' for the */ /* first address field of Clever or TA2 */ char name[16]; /* A short description */ char desc[32]; /* A long description */ int type; /* The data-type; must be one of the */ /* constants defined at the top of this */ /* file */ Type_Desc t_desc; /* This union contains either the length */ /* of the field or a pointer to an info- */ /* struct if the type is a special one */ /* like enum or other user-defined types */ } Xacc_Field_Info; #endif /* #ifndef __XACC__ */