/* urldefs.h
 *
 * Wimp function library
 *  Joseph Heenan, 1998.
 *
 * #defines and message structures for URL / URI Messages:
 *
 *  + the Acorn URI protocol, as defined in <http://www.acorn.com/browser/uri/funcspec.html>
 *  + the ANT URL protocol, as defined in <http://www.ant.co.uk/support/tech/notes/url.html>
 *
 * Used from urlsend.c and urlrecv.c
 *
 * $Log: urldefs,v $
 * Revision 1.1  1998/08/13 15:29:34  joseph
 * Added url/uri sending & receiving, and setinfover
 *
 *
 */


#ifndef URLDEFS_H
#define URLDEFS_H

typedef union
{
  char *ptr;
  int offset;
}
string_value;


typedef struct
{
  int size;
  int sender;
  int my_ref;
  int your_ref;
  int action_code;
}
wimp_msghdr;


typedef struct
{
  wimp_msghdr hdr;
  union
  {
    char url[236];
    struct
    {
      int tag;
      string_value url;
      int flags;
      string_value body_file;
      string_value target;
      string_value body_mimetype;
    }
    indirect;
  }
  data;
}
url_message;


typedef struct
{
  wimp_msghdr  hdr;
  int          flags;
  const char   *uri;
  unsigned int uri_handle;
}
uri_processmessage;


typedef struct
{
  wimp_msghdr  hdr;
  int          flags;
  unsigned int uri_handle;
}
uri_returnresultmessage;


/* swis */
#define URI_Dispatch 0x4E381
#define URI_RequestURI 0x4E382

/* -- Flags to URI_Dispatch in R0 -- */
#define URI_inform_caller       0x01
#define URI_check_only          0x02
#define URI_no_external_process 0x04


#endif
