home *** CD-ROM | disk | FTP | other *** search
- /*
- * 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_ArcwebXferControl = (msg_Arcweb__base + 18),
- Message_ArcwebXferControlAck = (msg_Arcweb__base + 19),
-
- Message_ArcwebQuit = (msg_Arcweb__base + 32),
- Message_ArcwebExpire = (msg_Arcweb__base + 33),
- Message_ArcwebAbortRequest = (msg_Arcweb__base + 34),
- Message_ArcwebTransferStatus = (msg_Arcweb__base + 35),
- Message_ArcwebConfigure = (msg_Arcweb__base + 36),
- Message_ArcwebExternalLaunch = (msg_Arcweb__base + 37),
- Message_ArcwebLaunchDone = (msg_Arcweb__base + 38),
- Message_ArcwebWebBrowser = (msg_Arcweb__base + 39)
-
- } 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_reload 0x00100000
- #define arcweb_FLAGS_load_to_disc 0x00080000
- #define arcweb_FLAGS_reserved_mask 0x00060000
- #define arcweb_FLAGS_extended_type 0x00010000
- #define arcweb_FLAGS_typemask 0x0001ffff
- #define arcweb_FLAGS_xfer_control 0x00000020
- #define arcweb_FLAGS_images_disabled 0x00000010
- #define arcweb_FLAGS_post_was_put 0x00000008
- #define arcweb_FLAGS_fast_images 0x00000004
- #define arcweb_FLAGS_local_launch 0x00000002
- #define arcweb_FLAGS_document_fetch 0x00000000
-
- #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_image_png 0x00010107
- #define arcweb_TYPES_video_mpeg 0x00010200
- #define arcweb_TYPES_video_armovie 0x00010201
- #define arcweb_TYPES_audio_misc 0x00010300
- #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:
- *
- * Responses only:
- * bits 0 to 15 : RISC OS/ArcWeb filetype indicator
- * bit 16 : if set, type is arcweb_TYPES_*, else RISC OS type
- *
- * Requests only:
- * bit 1 : the previous page was a local: URL
- * bit 2 : if set, 'fast images' are being used - not implemented yet
- * bit 3 : if set, the POST request should be sent as a PUT instead
- * bit 4 : if set, user has disabled image fetching
- * bit 5 : if set, control transfer protocol is available
- *
- * Both:
- *
- * bits 17 and 18 : reserved (must be preserved in replies)
- * bit 19 : if set, user has requested a 'load to disc'
- * bit 20 : if set, this is a reload, so flush any cache
- * 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 localfile;
- int formfile;
- union {
- int url_file; /* if bit 22 set */
- char URL[arcweb_MAXURL]; /* if bit 22 clr */
- } url;
- } post_request;
-
- struct {
- int localsrc;
- int localtmp;
- int localdiag;
- int locallink;
- int size_in_msg;
- char fileheader[228-5*sizeof(int)];
- } render_request;
-
- union {
- struct {
- int x_pix;
- int y_pix;
- } size;
- 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;
-
- 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;
-
- struct {
- char application[228];
- } configure;
-
- struct {
- union {
- int url_file; /* if bit 22 set */
- char URL[arcweb_MAXURL]; /* if bit 22 clear */
- } url;
- } launch_request;
-
- struct {
- char error[228];
- } launch_done;
-
- struct {
- int localfile; /* *RISC OS* file handle */
- union {
- int url_file; /* if bit 22 set */
- char URL[arcweb_MAXURL]; /* if bit 22 clr */
- } url;
- } xfer_request;
-
- struct {
- char error[228];
- } xfer_request_ack;
-
- struct {
- char browser[228];
- } web_browser;
-
- } data;
- } arcweb_msg; /* use as a wimp_msgstr */
-
- #ifdef __cplusplus
- }
- #endif
- #endif
-