•  Back 
  •  XAcc 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - das Betriebssystem
Author      : 
Version     : tos.hyp (5. März 2013)
Subject     : Programmieren/Atari
Nodes       : 3001
Index Size  : 93602
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Titel
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File15.13.2  XACC.H                                                    TOS

/*==================================================================*/
/*                                                                  */
/*                XAcc definitions (PureC 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 1 */
# define ACC_ACK            0x500
# define ACC_TEXT           0x501
# define ACC_KEY            0x502

/* Level 2 */
# define ACC_META           0x503
# define ACC_IMG            0x504

/*
 * extended XACC Message-Types:
 * Diese Messages sind relativ "unabhängig" vom XACC-Level der
 * Applikationen, d.h. sie sollten nur verwendet werden,
 * wenn der Kommunikationspartner in seiner XDSC-Beschreibung
 * über das ensprechende Extended-Feature verfügt!
 */

/* Reuest/Reply Protokoll: (Extended-Feature "RQ")      */
/*        ACC_ACK Messages sind Teil des Protokolls und */
/*        müssen deshalb verstanden werden!             */
# define ACC_REQUEST        0x480
# define ACC_REPLY          0x481

/* Inquiery Protokoll: (Extended-Feature "DI")          */
/*        ACC_ACK Messages sind Teil des Protokolls und */
/*        müssen deshalb verstanden werden!             */
#define ACC_GETDSI          0x510
#define ACC_DSINFO          0x511
#define ACC_FILEINFO        0x512
#define ACC_GETFIELDS       0x513
#define ACC_FIELDINFO       0x514

/* Remote MailMerge Protokoll: (Extended-Feature "RM")  */
/*        ACC_ACK Messages sind Teil des Protokolls und */
/*        müssen deshalb verstanden werden!             */
#define ACC_FORCESDF        0x520
#define ACC_GETSDF          0x521


/*--------------------------------------------------------------------
    definitions for the Request/Reply protocol
--------------------------------------------------------------------*/
/* Datentypen des 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 Inquiery 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.                */
                             /* dflt: 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                    */
#define FT_SHORT       0x82  /* 4  byte HEX-string                    */
#define FT_USHORT      0x83  /* 4  byte HEX-string                    */
#define FT_LONG        0x84  /* 8  byte HEX-string                    */
#define FT_ULONG       0x85  /* 8  byte HEX-string                    */
#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  /* at 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 fieldtypes 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 data bases         */
} Xacc_Dsinfo;

typedef struct {
    long    db_id;           /* ID of the data base                   */
    char    fname[32];       /* Filename of the data base. 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 data base.                        */
    time_t  crea_time;       /* The creation date/time of the data    */
                             /* base file.                            */
    time_t  mod_time;        /* The last modification date/time of    */
                             /* the data base structure.              */
    int     n_fields;        /* The number of fields that are         */
                             /* available corresponding to the        */
                             /* requested field typs given by the     */
                             /* ACC_GETDSI message                    */
} Xacc_File_Info;

typedef struct {
    int     fld_size;        /* the count of bits into 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 a info-  */
                             /* struct if the type is a special one   */
                             /* like enum or other user-defined types */
} Xacc_Field_Info;


#endif    /* #ifndef __XACC__ */