~ubuntu-branches/ubuntu/saucy/libwpd/saucy-proposed

« back to all changes in this revision

Viewing changes to src/lib/WPXOLEStream.h

  • Committer: Package Import Robot
  • Author(s): Rene Engelhard
  • Date: 2013-04-19 00:47:04 UTC
  • mfrom: (11.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130419004704-j04jp8dan8plg630
Tags: 0.9.7-2
upload to unstable 

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include <string>
34
34
#include <fstream>
35
 
#include <sstream>
 
35
#include <vector>
36
36
#include <list>
37
37
 
 
38
class WPXInputStream;
 
39
 
38
40
namespace libwpd
39
41
{
40
42
 
41
 
class StorageIO;
 
43
class IStorage;
42
44
class Stream;
43
 
class StreamIO;
 
45
class IStream;
44
46
 
45
47
class Storage
46
48
{
49
51
public:
50
52
 
51
53
        // for Storage::result()
52
 
        enum { Ok, OpenFailed, NotOLE, BadOLE, UnknownError };
 
54
        enum Result { Ok, OpenFailed, NotOLE, BadOLE, UnknownError };
53
55
 
54
56
        /**
55
57
         * Constructs a storage with data.
56
58
         **/
57
 
        Storage( const std::stringstream &memorystream );
 
59
        Storage( WPXInputStream *is );
58
60
 
59
61
        /**
60
62
         * Destroys the storage.
69
71
        /**
70
72
         * Returns the error code of last operation.
71
73
         **/
72
 
        int result();
 
74
        Result result();
73
75
 
74
76
private:
75
 
        StorageIO *io;
 
77
        IStorage *m_io;
76
78
 
77
79
        // no copy or assign
78
80
        Storage( const Storage & );
83
85
class Stream
84
86
{
85
87
        friend class Storage;
86
 
        friend class StorageIO;
 
88
        friend class IStorage;
87
89
 
88
90
public:
89
91
 
90
92
        /**
91
93
         * Creates a new stream.
92
94
         */
93
 
        // name must be absolute, e.g "/PerfectOffice_MAIN"
94
95
        Stream( Storage *storage, const std::string &name );
95
96
 
96
97
        /**
109
110
        unsigned long read( unsigned char *data, unsigned long maxlen );
110
111
 
111
112
private:
112
 
        StreamIO *io;
 
113
        IStream *m_io;
113
114
 
114
115
        // no copy or assign
115
116
        Stream( const Stream & );