tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / external / openurl / developer / C / include / libraries / openurl.h
blob6e287838944a83dc0878ff59c4535e60ea1cf305
1 #ifndef LIBRARIES_OPENURL_H
2 #define LIBRARIES_OPENURL_H
4 /***************************************************************************
6 openurl.library - universal URL display and browser launcher library
7 Copyright (C) 1998-2005 by Troels Walsted Hansen, et al.
8 Copyright (C) 2005-2013 by openurl.library Open Source Team
10 This library is free software; it has been placed in the public domain
11 and you can freely redistribute it and/or modify it. Please note, however,
12 that some components may be under the LGPL or GPL license.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 openurl.library project: http://sourceforge.net/projects/openurllib/
20 $Id$
22 ***************************************************************************/
24 #ifndef EXEC_TYPES_H
25 #include <exec/types.h>
26 #endif
28 #ifndef EXEC_LISTS_H
29 #include <exec/lists.h>
30 #endif
32 #ifndef EXEC_NODES_H
33 #include <exec/nodes.h>
34 #endif
36 #ifndef UTILITY_TAGITEM_H
37 #include <utility/tagitem.h>
38 #endif
40 #if defined(__PPC__)
41 #if defined(__GNUC__)
42 #pragma pack(2)
43 #elif defined(__VBCC__)
44 #pragma amiga-align
45 #endif
46 #endif
48 /**************************************************************************/
50 ** Names
53 #define OPENURLNAME "openurl.library"
54 #define OPENURLVER 7
55 #define OPENURLREV 5
57 /**************************************************************************/
59 ** Tags
62 #define URL_Tagbase (0x81480000UL)
64 #define URL_Show (URL_Tagbase + 1) /* BOOL - Uniconify browser */
65 #define URL_BringToFront (URL_Tagbase + 2) /* BOOL - Bring browser to front */
66 #define URL_NewWindow (URL_Tagbase + 3) /* BOOL - Open URL in new window */
67 #define URL_Launch (URL_Tagbase + 4) /* BOOL - Launch browser when not running */
68 #define URL_PubScreenName (URL_Tagbase + 5) /* UBYTE * - Name of public screen to launch at */
70 #define URL_GetPrefs_Mode (URL_Tagbase + 20) /* BOOL - Get default prefs */
71 #define URL_GetPrefs_FallBack (URL_Tagbase + 21) /* BOOL - Do not fail (TRUE) */
73 #define URL_SetPrefs_Save (URL_Tagbase + 30) /* BOOL - Save prefs to ENVARC: also */
75 #define URL_GetAttr_Version (URL_Tagbase + 60) /* ULONG - Library version */
76 #define URL_GetAttr_Revision (URL_Tagbase + 61) /* ULONG - Library revision */
77 #define URL_GetAttr_VerString (URL_Tagbase + 62) /* STRPTR - "openurl.library 6.4 (27.7.2005)" */
78 #define URL_GetAttr_PrefsVer (URL_Tagbase + 63) /* ULONG - Library preferences version */
80 #define URL_GetAttr_HandlerVersion (URL_Tagbase + 64) /* Obsolete !!! DON'T USE !!! */
81 #define URL_GetAttr_HandlerRevision (URL_Tagbase + 65) /* Obsolete !!! DON'T USE !!! */
82 #define URL_GetAttr_HandlerVerString (URL_Tagbase + 66) /* Obsolete !!! DON'T USE !!! */
84 enum
86 URL_GetPrefs_Mode_Env,
87 URL_GetPrefs_Mode_Envarc,
88 URL_GetPrefs_Mode_Default,
89 URL_GetPrefs_Mode_InUse,
92 /**************************************************************************/
94 #define REXX_CMD_LEN 64
95 #define NAME_LEN 32
96 #define PATH_LEN 256
97 #define PORT_LEN 32
99 #define SHOWCMD_LEN REXX_CMD_LEN
100 #define TOFRONTCMD_LEN REXX_CMD_LEN
101 #define OPENURLCMD_LEN REXX_CMD_LEN
102 #define OPENURLWCMD_LEN REXX_CMD_LEN
103 #define WRITEMAILCMD_LEN (REXX_CMD_LEN*2)
105 /**************************************************************************/
107 ** Version 4 Prefs
110 #define PREFS_VERSION ((UBYTE)4)
112 struct URL_Prefs
114 UBYTE up_Version; /* always check this version number! */
115 struct MinList up_BrowserList; /* list of struct URL_BrowserNodes */
116 struct MinList up_MailerList; /* list of struct URL_MailerNodes */
117 struct MinList up_FTPList; /* list of struct URL_MailerNodes */
119 ULONG up_Flags; /* flags, see below */
121 ULONG up_DefShow; /* these BOOLs are the defaults for */
122 ULONG up_DefBringToFront; /* the similarly named tags */
123 ULONG up_DefNewWindow; /* they are all new with Version 2 */
124 ULONG up_DefLaunch;
127 /* up_Flags */
128 enum
130 UPF_ISDEFAULTS = 1<<0, /* structure contains the default settings */
131 UPF_PREPENDHTTP = 1<<1, /* prepend "http://" to URLs w/o scheme */
132 UPF_DOMAILTO = 1<<2, /* mailto: URLs get special treatment */
133 UPF_DOFTP = 1<<3, /* ftp:// URLs get special treatment */
136 /**************************************************************************/
138 ** Common #?_Flags values
141 enum
143 UNF_DISABLED = 1<<1, /* The entry is disabled */
145 UNF_NEW = 1<<16, /* Reserved for OpenURL preferences application */
146 UNF_NTALLOC = 1<<17, /* Reserved for OpenURL preferences application */
149 /**************************************************************************/
151 ** Browsers
154 struct URL_BrowserNode
156 struct MinNode ubn_Node;
157 ULONG ubn_Flags; /* flags, see below */
158 char ubn_Name[NAME_LEN]; /* name of webbrowser */
159 char ubn_Path[PATH_LEN]; /* complete path to browser */
160 char ubn_Port[PORT_LEN]; /* webbrowser arexx port */
161 char ubn_ShowCmd[SHOWCMD_LEN]; /* command to show/uniconify browser */
162 char ubn_ToFrontCmd[TOFRONTCMD_LEN]; /* command to bring browser to front */
163 char ubn_OpenURLCmd[OPENURLCMD_LEN]; /* command to open url */
164 char ubn_OpenURLWCmd[OPENURLWCMD_LEN]; /* command to open url in new window */
167 /* ubn_Flags */
168 enum
171 ** If set, browser supports getting an URL on
172 ** the commandline when launched. obsolete as
173 ** of V3 - use %u on commandline instead
175 UBNF_URLONCMDLINE = 1<<0,
178 /**************************************************************************/
180 ** Mailers
183 struct URL_MailerNode
185 struct MinNode umn_Node;
186 ULONG umn_Flags; /* flags, none defined */
187 char umn_Name[NAME_LEN]; /* name of mailer */
188 char umn_Path[PATH_LEN]; /* complete path to mailer */
189 char umn_Port[PORT_LEN]; /* mailer arexx port */
190 char umn_ShowCmd[SHOWCMD_LEN]; /* command to show/uniconify mailer */
191 char umn_ToFrontCmd[TOFRONTCMD_LEN]; /* command to bring mailer to front */
192 char umn_WriteMailCmd[WRITEMAILCMD_LEN]; /* command to write mail */
195 /**************************************************************************/
197 ** FTPs
200 struct URL_FTPNode
202 struct MinNode ufn_Node;
203 ULONG ufn_Flags; /* flags, see below */
204 char ufn_Name[NAME_LEN]; /* name of ftp client */
205 char ufn_Path[PATH_LEN]; /* complete path to ftp client */
206 char ufn_Port[PORT_LEN]; /* webbrowser arexx port */
207 char ufn_ShowCmd[SHOWCMD_LEN]; /* command to show/uniconify ftp client */
208 char ufn_ToFrontCmd[TOFRONTCMD_LEN]; /* command to bring ftp client to front */
209 char ufn_OpenURLCmd[OPENURLCMD_LEN]; /* command to open url */
210 char ufn_OpenURLWCmd[OPENURLWCMD_LEN]; /* command to open url in new window */
213 /* ufn_Flags */
214 enum
216 /* If set, ftp:// ise removed from the URL */
217 UFNF_REMOVEFTP = 1<<0,
220 /**************************************************************************/
222 #if defined(__PPC__)
223 #if defined(__GNUC__)
224 #pragma pack()
225 #elif defined(__VBCC__)
226 #pragma default-align
227 #endif
228 #endif
230 #endif /* LIBRARIES_OPENURL_H */