alsa.audio: add additional read cycle if there is more than 20ms space in buffer
[AROS.git] / external / openurl / include / libraries / openurl.h
blob66f24cb2f19728347903c23df77d40943ac8089a
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(__AROS__) && 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 */
134 UPF_VALID_MASK = ((1<<4)-1), /* used to mask out any unused flags */
137 /**************************************************************************/
139 ** Common #?_Flags values
142 enum
144 UNF_DISABLED = (1<<1), /* The entry is disabled */
145 UNF_VALID_MASK = ((1<<2)-1), /* used to mask out any unused flags */
147 UNF_NEW = (1<<16), /* Reserved for OpenURL preferences application */
148 UNF_NTALLOC = (1<<17), /* Reserved for OpenURL preferences application */
151 /**************************************************************************/
153 ** Browsers
156 struct URL_BrowserNode
158 struct MinNode ubn_Node;
159 ULONG ubn_Flags; /* flags, see below */
160 char ubn_Name[NAME_LEN]; /* name of webbrowser */
161 char ubn_Path[PATH_LEN]; /* complete path to browser */
162 char ubn_Port[PORT_LEN]; /* webbrowser arexx port */
163 char ubn_ShowCmd[SHOWCMD_LEN]; /* command to show/uniconify browser */
164 char ubn_ToFrontCmd[TOFRONTCMD_LEN]; /* command to bring browser to front */
165 char ubn_OpenURLCmd[OPENURLCMD_LEN]; /* command to open url */
166 char ubn_OpenURLWCmd[OPENURLWCMD_LEN]; /* command to open url in new window */
169 /* ubn_Flags */
170 enum
173 ** If set, browser supports getting an URL on
174 ** the commandline when launched. obsolete as
175 ** of V3 - use %u on commandline instead
177 UBNF_URLONCMDLINE = 1<<0,
180 /**************************************************************************/
182 ** Mailers
185 struct URL_MailerNode
187 struct MinNode umn_Node;
188 ULONG umn_Flags; /* flags, none defined */
189 char umn_Name[NAME_LEN]; /* name of mailer */
190 char umn_Path[PATH_LEN]; /* complete path to mailer */
191 char umn_Port[PORT_LEN]; /* mailer arexx port */
192 char umn_ShowCmd[SHOWCMD_LEN]; /* command to show/uniconify mailer */
193 char umn_ToFrontCmd[TOFRONTCMD_LEN]; /* command to bring mailer to front */
194 char umn_WriteMailCmd[WRITEMAILCMD_LEN]; /* command to write mail */
197 /**************************************************************************/
199 ** FTPs
202 struct URL_FTPNode
204 struct MinNode ufn_Node;
205 ULONG ufn_Flags; /* flags, see below */
206 char ufn_Name[NAME_LEN]; /* name of ftp client */
207 char ufn_Path[PATH_LEN]; /* complete path to ftp client */
208 char ufn_Port[PORT_LEN]; /* webbrowser arexx port */
209 char ufn_ShowCmd[SHOWCMD_LEN]; /* command to show/uniconify ftp client */
210 char ufn_ToFrontCmd[TOFRONTCMD_LEN]; /* command to bring ftp client to front */
211 char ufn_OpenURLCmd[OPENURLCMD_LEN]; /* command to open url */
212 char ufn_OpenURLWCmd[OPENURLWCMD_LEN]; /* command to open url in new window */
215 /* ufn_Flags */
216 enum
218 /* If set, ftp:// ise removed from the URL */
219 UFNF_REMOVEFTP = 1<<0,
222 /**************************************************************************/
224 #if !defined(__AROS__) && defined(__PPC__)
225 #if defined(__GNUC__)
226 #pragma pack()
227 #elif defined(__VBCC__)
228 #pragma default-align
229 #endif
230 #endif
232 #endif /* LIBRARIES_OPENURL_H */