home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / internet / www / !HTTP / h / requester < prev   
Text File  |  1994-10-16  |  3KB  |  95 lines

  1. #ifndef __requester_h_included
  2. #define __requester_h_included
  3.  
  4. #define arcweb_MAXURL           (200)
  5.  
  6. #define msg_ArcWeb__base        (0x4A240)
  7.  
  8. typedef enum
  9. {
  10.   message_ARCWEBFETCH = (msg_ArcWeb__base +  0),
  11.   message_ARCWEBDONE  = (msg_ArcWeb__base +  1)
  12. } arcweb_msgid;
  13.  
  14.  
  15.   /* Use these constants in the flag words in the messages below */
  16.  
  17. #define arcweb_FLAGS_error              0x80000000
  18. #define arcweb_FLAGS_typeknown          0x40000000
  19. #define arcweb_FLAGS_inhibit_render     0x20000000
  20. #define arcweb_FLAGS_want_symlink       0x10000000
  21. #define arcweb_FLAGS_url_changed        0x08000000
  22. #define arcweb_FLAGS_close_previous     0x04000000
  23. #define arcweb_FLAGS_image_fetch        0x02000000
  24. #define arcweb_FLAGS_error_handled      0x01000000
  25. #define arcweb_FLAGS_inhibit_display    0x00800000
  26. #define arcweb_FLAGS_extended_url       0x00400000
  27. #define arcweb_FLAGS_reserved_mask      0x003e0000
  28. #define arcweb_FLAGS_typemask           0x0001ffff
  29.  
  30. #define arcweb_TYPES_plaintext          0x00010000
  31. #define arcweb_TYPES_html               0x00010001
  32. #define arcweb_TYPES_image              0x00010002
  33. #define arcweb_TYPES_audio              0x00010003
  34. #define arcweb_TYPES_video              0x00010004
  35. #define arcweb_TYPES_binary             0x00010005
  36. #define arcweb_TYPES_image_jpeg         0x00010100
  37. #define arcweb_TYPES_image_gif          0x00010101
  38. #define arcweb_TYPES_image_jfif         0x00010102
  39. #define arcweb_TYPES_image_mswinbitmap  0x00010103
  40. #define arcweb_TYPES_image_xbm          0x00010104
  41. #define arcweb_TYPES_image_clear        0x00010105
  42. #define arcweb_TYPES_image_tiff         0x00010106
  43. #define arcweb_TYPES_unknown            0x0001ffff
  44.  
  45.   /* Flag bit meanings:
  46.  
  47.    bits 0 to 15  : RISC OS/Arcweb filetype indicator
  48.    bit 16        : if set, type is arcweb_TYPES_. if clear, RISC OS type
  49.    bits 17 to 21 : reserved (must be preserved in replies)
  50.    bit 22        : if set, this is an extended URL
  51.    bit 23        : if set, Arcweb will not display the results of the render
  52.    bit 24        : if set, Arcweb wont raise any error to user
  53.    bit 25        : if set, this is an inline image fetch, not a page fetch
  54.    bit 26        : if set, the previous ArcWeb window should be closed
  55.    bit 27        : if set, URL has been changed (+ is in reply buffer)
  56.    bit 28        : if set, request use of symbolic link in host filesystem
  57.    bit 29        : if set in ..fetch_done msg, ArcWeb will not render it
  58.    bit 30        : if set, bits 0-16 are valid, else they are invalid
  59.    bit 31        : if set, the buffer contains an error message
  60.  
  61.  */
  62.  
  63. typedef struct
  64. {
  65.   void           *handle;         /* MUST be preserved */
  66.   int             flags;          /* See above */
  67.   union
  68.   {
  69.     int  __arcweb_words[57]; /* Ensure the right size */
  70.     char __arcweb_data[228]; /* a char version        */
  71.  
  72.     struct
  73.     {
  74.       int     localfile;  /* *RISC OS* file handle */
  75.       char    URL[arcweb_MAXURL];  /* The URL */
  76.     } 
  77.     fetch_request;
  78.  
  79.     union
  80.     {
  81.       struct
  82.       {
  83.         int     use_given_expiry;
  84.         int     use_default_expiry;
  85.         char    date[5];
  86.       } expiry;
  87.       char    error[228];
  88.     } 
  89.     fetch_done;
  90.   } 
  91.   data;
  92. } arcweb_msg;
  93.  
  94. #endif
  95.