1 // Copyright (C) 2001 Neil Stevens <neil@qualityassistant.com>
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 // Except as contained in this notice, the name(s) of the author(s) shall not be
21 // used in advertising or otherwise to promote the sale, use or other dealings
22 // in this Software without prior written authorization from the author(s).
30 * KLoader provides a way to load files in the most efficient way for
31 * both local and remote URLs.
37 * The constructor takes the url and decides the best way to save,
38 * which will mean using something like KIO::NetAccess or QFile.
40 KLoader(const KURL
&_target
);
43 * The destructor closes if necessary.
48 * open actually tries to open the file
50 * true on success, false on failure (get the error in @ref error)
55 * close closes the file.
60 * If open or close returns false, there was an error, and error
61 * returns what the error was, when available.
66 * file returns a QFile open for reading, which may be for a temporary
67 * file on the local filesystem.
69 * If this is called before the file is opened, you will crash.
74 * You can use this to read in your data.
76 * If this is called before the file is opened, you will crash.
78 QTextStream
&textStream(void);
81 * You can use this to read in your data.
83 * If this is called before the file is opened, you will crash.
85 QDataStream
&dataStream(void);