home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 1
/
AU_CD1.iso
/
internet
/
arcweb
/
!ArcWeb
/
h
/
requester
Wrap
Text File
|
1995-02-16
|
9KB
|
224 lines
/*
* ArcWeb
*
* Copyright (C) Stewart Brodie, 1994,1995
*
* This product is supplied under the terms laid down in the `Terms' file.
*
* This file may be distributed freely with any ArcWeb related software,
* provided it meets with the definition of 'free' in the 'Terms' file.
*
* This file: requester.h
*
* A WIMP-library-independent interface definition. All structures are
* defined in terms of basic types.
*
*/
#ifndef _requester_h_included
#define _requester_h_included
#ifdef __cplusplus
extern "C" {
#endif
#define arcweb_MAXURL (200)
#define msg_Arcweb__base (0x4A240)
#define swi_Arcweb__base (msg_Arcweb__base)
#define err_Arcweb__base (0x80D200)
typedef enum {
Message_ArcwebFetchRequest = (msg_Arcweb__base + 0),
Message_ArcwebFetchDone = (msg_Arcweb__base + 1),
Message_ArcwebRenderRequest = (msg_Arcweb__base + 2),
Message_ArcwebRenderDone = (msg_Arcweb__base + 3),
Message_ArcwebPostRequest = (msg_Arcweb__base + 4),
Message_ArcwebPostDone = (msg_Arcweb__base + 5),
Message_ArcwebEMailRequest = (msg_Arcweb__base + 6),
Message_ArcwebEMailDone = (msg_Arcweb__base + 7),
Message_ArcwebImageSize = (msg_Arcweb__base + 16),
Message_ArcwebImageComplete = (msg_Arcweb__base + 17),
Message_ArcwebQuit = (msg_Arcweb__base + 32),
Message_ArcwebExpire = (msg_Arcweb__base + 33),
Message_ArcwebAbortRequest = (msg_Arcweb__base + 34),
Message_ArcwebTransferStatus = (msg_Arcweb__base + 35)
} arcweb_msgid;
/* Use these constants in the flag words in the messages below */
#define arcweb_FLAGS_error 0x80000000
#define arcweb_FLAGS_typeknown 0x40000000
#define arcweb_FLAGS_inhibit_render 0x20000000
#define arcweb_FLAGS_want_symlink 0x10000000
#define arcweb_FLAGS_url_changed 0x08000000
#define arcweb_FLAGS_close_previous 0x04000000
#define arcweb_FLAGS_image_fetch 0x02000000
#define arcweb_FLAGS_error_handled 0x01000000
#define arcweb_FLAGS_inhibit_display 0x00800000
#define arcweb_FLAGS_extended_url 0x00400000
#define arcweb_FLAGS_email_complete 0x00200000
#define arcweb_FLAGS_images_disabled 0x00100000
#define arcweb_FLAGS_reserved_mask 0x000e0000
#define arcweb_FLAGS_extended_type 0x00010000
#define arcweb_FLAGS_typemask 0x0001ffff
#define arcweb_TYPES_plaintext 0x00010000
#define arcweb_TYPES_html 0x00010001
#define arcweb_TYPES_image 0x00010002
#define arcweb_TYPES_audio 0x00010003
#define arcweb_TYPES_video 0x00010004
#define arcweb_TYPES_binary 0x00010005
#define arcweb_TYPES_image_jpeg 0x00010100
#define arcweb_TYPES_image_gif 0x00010101
#define arcweb_TYPES_image_jfif 0x00010102
#define arcweb_TYPES_image_mswinbitmap 0x00010103
#define arcweb_TYPES_image_xbm 0x00010104
#define arcweb_TYPES_image_clear 0x00010105
#define arcweb_TYPES_image_tiff 0x00010106
#define arcweb_TYPES_video_mpeg 0x00010200
#define arcweb_TYPES_video_armovie 0x00010201
#define arcweb_TYPES_audio_simple 0x00010301
#define arcweb_TYPES_audio_aiff 0x00010302
#define arcweb_TYPES_unknown 0x0001ffff
#define arcweb_XFER_xmit_running 0x00000001
#define arcweb_XFER_recv_running 0x00000002
#define arcweb_XFER_xmit_complete 0x00000004
#define arcweb_XFER_recv_complete 0x00000008
#define arcweb_XFER_misc_running 0x00000010
#define arcweb_XFER_reserved 0xffffffe0
/* Flag bit meanings:
*
* bits 0 to 15 : RISC OS/Arcweb filetype indicator
* bit 16 : if set, type is arcweb_TYPES_*, else RISC OS type
* bits 17 to 19 : reserved (must be preserved in replies)
* bit 20 : If set, user has disabled image fetching
* bit 21 : if set, the e-mail message is complete
* bit 22 : if set, this is an extended URL
* bit 23 : if set, Arcweb will not display the results of the render
* bit 24 : if set, Arcweb wont raise any error to user
* bit 25 : if set, this is an inline image fetch, not a page fetch
* bit 26 : if set, the previous Arcweb window should be closed
* bit 27 : if set, URL has been changed (+ is in URL file)
* bit 28 : if set, request use of symbolic link in host filesystem
* bit 29 : if set, (in FetchDone), Arcweb will not render it
* bit 30 : if set, bits 0-16 are valid, else they are invalid
* bit 31 : if set, the buffer contains an error message
*
*/
typedef struct {
struct arcweb_msghdr { /* message block header. */
int size; /* 20<=size<=256, multiple of 4 */
int task; /* task handle of sender (filled in by wimp) */
int my_ref; /* unique ref number (filled in by wimp) */
int your_ref; /* (0==>none) if non-zero, acknowledge */
arcweb_msgid action; /* message action code */
} hdr;
void *handle; /* MUST be preserved */
int flags; /* See above */
union {
int _arcweb_words[57]; /* Ensure the right size */
char _arcweb_data[228]; /* a char version */
struct {
int localfile; /* *RISC OS* file handle */
union {
int url_file; /* if bit 22 set */
char URL[arcweb_MAXURL]; /* if bit 22 clr */
} url;
} fetch_request;
union {
struct {
int use_given_expiry;
int use_default_expiry;
char date[8]; /* to stop Cv5 warnings */
} expiry;
char error[228];
} fetch_done;
struct {
int localsrc;
int localtmp;
int localdiag;
int locallink;
int size_in_msg;
char fileheader[228-5*sizeof(int)];
} render_request;
struct {
char error[228];
} render_done;
struct {
int formfile;
} email_request;
struct {
char error[228]; /* Do I want this? */
} email_done;
struct {
union {
int url_file; /* if bit 22 set */
char URL[arcweb_MAXURL]; /* if bit 22 clear */
} url;
} expire;
struct {
int localfile;
int formfile;
union {
int url_file; /* If bit 22 set */
char URL[arcweb_MAXURL]; /* If bit 22 clear */
} url;
} post_request;
union {
struct {
int use_given_expiry;
int use_default_expiry;
char date[5];
} expiry;
char error[228];
} post_done;
struct {
int flags;
int transmit_total;
int transmit_sofar;
int receive_total;
int receive_sofar;
char message[208];
} status_report;
struct {
char reason[228];
} abort_request;
struct {
int renderer_handle;
int x_os_units;
int y_os_units;
} image_size;
struct {
int renderer_handle;
} image_complete;
} data;
} arcweb_msg; /* use as a wimp_msgstr */
#ifdef __cplusplus
}
#endif
#endif