1 /***************************************************************************
3 openurl.library - universal URL display and browser launcher library
4 Copyright (C) 1998-2005 by Troels Walsted Hansen, et al.
5 Copyright (C) 2005-2009 by openurl.library Open Source Team
7 This library is free software; it has been placed in the public domain
8 and you can freely redistribute it and/or modify it. Please note, however,
9 that some components may be under the LGPL or GPL license.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 openurl.library project: http://sourceforge.net/projects/openurllib/
19 ***************************************************************************/
24 ULONG
freeBase(struct LibraryHeader
* lib
);
25 ULONG
initBase(struct LibraryHeader
* lib
);
28 #if defined(__amigaos4__) || defined(__MORPHOS__)
29 #define HAVE_ALLOCVECPOOLED 1
30 #define HAVE_FREEVECPOOLED 1
33 #if defined(HAVE_ALLOCVECPOOLED)
34 #define allocVecPooled(pool,size) AllocVecPooled(pool,size)
36 APTR
allocVecPooled(APTR pool
, ULONG size
);
38 #if defined(HAVE_FREEVECPOOLED)
39 #define freeVecPooled(pool,mem) FreeVecPooled(pool,mem)
41 void freeVecPooled(APTR pool
, APTR mem
);
43 APTR
reallocVecPooled(APTR pool
, APTR mem
, ULONG oldSize
, ULONG newSize
);
44 APTR
allocArbitrateVecPooled(ULONG size
);
45 void freeArbitrateVecPooled(APTR mem
);
46 BOOL
sendToBrowser(STRPTR URL
, struct List
*portlist
, ULONG flags
, STRPTR pubScreenName
);
47 BOOL
sendToFTP(STRPTR URL
, struct List
*portlist
, ULONG flags
, STRPTR pubScreenName
);
48 BOOL
sendToMailer(STRPTR URL
, struct List
*portlist
, ULONG flags
, STRPTR pubScreenName
);
49 BOOL
copyList(struct List
*dst
, struct List
*src
, ULONG size
);
50 void freeList(struct List
*list
);
51 BOOL
isdigits(STRPTR str
);
53 #define SENDTOB_SHOW 0
54 #define SENDTOF_SHOW (1<<SENDTOB_SHOW)
55 #define SENDTOB_TOFRONT 1
56 #define SENDTOF_TOFRONT (1<<SENDTOB_TOFRONT)
57 #define SENDTOB_NEWWINDOW 2
58 #define SENDTOF_NEWWINDOW (1<<SENDTOB_NEWWINDOW)
59 #define SENDTOB_LAUNCH 3
60 #define SENDTOF_LAUNCH (1<<SENDTOB_LAUNCH)
63 LIBPROTO(URL_OpenA
, ULONG
, REG(a0
, STRPTR url
), REG(a1
, struct TagItem
*attrs
));
64 LIBPROTOVA(URL_Open
, ULONG
, REG(a0
, STRPTR url
), ...);
65 LIBPROTO(URL_OldGetPrefs
, struct URL_Prefs
*);
66 LIBPROTO(URL_OldFreePrefs
, void, REG(a0
, struct URL_Prefs
*up
));
67 LIBPROTO(URL_OldSetPrefs
, ULONG
, REG(a0
, struct URL_Prefs
*p
), REG(d0
, ULONG permanent
));
68 LIBPROTO(URL_OldGetDefaultPrefs
, struct URL_Prefs
*);
69 LIBPROTO(URL_OldLaunchPrefsApp
, ULONG
);
70 LIBPROTO(dispatch
, LONG
, REG(a0
, struct RexxMsg
*msg
), REG(a1
, STRPTR
*resPtr
));
71 LIBPROTO(URL_GetPrefsA
, struct URL_Prefs
*, REG(a0
, struct TagItem
*attrs
));
72 #if defined(__amigaos4__)
73 LIBPROTOVA(URL_GetPrefs
, struct URL_Prefs
*, ...);
75 LIBPROTOVA(URL_GetPrefs
, struct URL_Prefs
*, REG(a0
, Tag tag1
), ...);
77 LIBPROTO(URL_FreePrefsA
, void, REG(a0
, struct URL_Prefs
*up
), REG(a1
, struct TagItem
*attrs
));
78 LIBPROTOVA(URL_FreePrefs
, void, REG(a0
, struct URL_Prefs
*up
), ...);
79 LIBPROTO(URL_SetPrefsA
, ULONG
, REG(a0
, struct URL_Prefs
*p
), REG(a1
, struct TagItem
*attrs
));
80 LIBPROTOVA(URL_SetPrefs
, ULONG
, REG(a0
, struct URL_Prefs
*p
), ...);
81 LIBPROTO(URL_LaunchPrefsAppA
, ULONG
, REG(a0
, struct TagItem
*attrs
));
82 #if defined(__amigaos4__)
83 LIBPROTOVA(URL_LaunchPrefsApp
, ULONG
, ...);
85 LIBPROTOVA(URL_LaunchPrefsApp
, ULONG
, REG(a0
, Tag tag1
), ...);
87 LIBPROTO(URL_GetAttr
, ULONG
, REG(d0
, ULONG attr
), REG(a0
, IPTR
*storage
));
90 void SAVEDS
handler(void);
93 struct URL_Prefs
*copyPrefs(struct URL_Prefs
*old
);
94 void initPrefs(struct URL_Prefs
*p
);
95 void setDefaultPrefs(struct URL_Prefs
*up
);
96 BOOL
savePrefs(CONST_STRPTR filename
, struct URL_Prefs
*up
);
97 BOOL
loadPrefs(struct URL_Prefs
*p
, ULONG mode
);
98 struct URL_Prefs
*loadPrefsNotFail(void);