~ubuntu-branches/ubuntu/lucid/libwpd/lucid

« back to all changes in this revision

Viewing changes to src/lib/WPXStreamImplementation.h

  • Committer: Bazaar Package Importer
  • Author(s): Rene Engelhard
  • Date: 2007-06-15 13:28:41 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20070615132841-00nybwftc708w96n
Tags: 0.8.10-1
* New upstream release
* bump shlibs for libwpd-stream8c2a 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* libwpd
 
2
 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public
 
15
 * License along with this library; if not, write to the 
 
16
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
 
17
 * Boston, MA  02111-1301 USA
 
18
 *
 
19
 * For further information visit http://libwpd.sourceforge.net
 
20
 */
 
21
 
 
22
#ifndef __WPXSTREAMIMPLEMENTATION_H__
 
23
#define __WPXSTREAMIMPLEMENTATION_H__
 
24
 
 
25
#include "WPXStream.h"
 
26
 
 
27
class WPXFileStreamPrivate;
 
28
 
 
29
class WPXFileStream: public WPXInputStream
 
30
{
 
31
public:
 
32
        explicit WPXFileStream(const char* filename);
 
33
        ~WPXFileStream();
 
34
        
 
35
        const uint8_t *read(size_t numBytes, size_t &numBytesRead);
 
36
        long tell();
 
37
        int seek(long offset, WPX_SEEK_TYPE seekType);
 
38
        bool atEOS();
 
39
 
 
40
        bool isOLEStream();
 
41
        WPXInputStream *getDocumentOLEStream(const char * name);
 
42
        /* This method will be replaced by the above method in next release cycle */
 
43
        WPXInputStream *getDocumentOLEStream();
 
44
 
 
45
private:
 
46
        WPXFileStreamPrivate* d;
 
47
        WPXFileStream(const WPXFileStream&); // copy is not allowed
 
48
        WPXFileStream& operator=(const WPXFileStream&); // assignment is not allowed
 
49
};
 
50
 
 
51
class WPXStringStreamPrivate;
 
52
 
 
53
class WPXStringStream: public WPXInputStream
 
54
{
 
55
public:
 
56
        WPXStringStream(const char *data, const unsigned int dataSize);
 
57
        ~WPXStringStream();
 
58
 
 
59
        const uint8_t *read(size_t numBytes, size_t &numBytesRead);
 
60
        long tell();
 
61
        int seek(long offset, WPX_SEEK_TYPE seekType);
 
62
        bool atEOS();
 
63
 
 
64
        bool isOLEStream();
 
65
        WPXInputStream *getDocumentOLEStream(const char * name);
 
66
        /* This method will be replaced by the above method in next release cycle */
 
67
        WPXInputStream *getDocumentOLEStream();
 
68
 
 
69
private:
 
70
        WPXStringStreamPrivate* d;
 
71
        WPXStringStream(const WPXStringStream&); // copy is not allowed
 
72
        WPXStringStream& operator=(const WPXStringStream&); // assignment is not allowed
 
73
};
 
74
 
 
75
#endif // __WPXSTREAMIMPLEMENTATION_H__