4 #include "zipios++/zipios-config.h"
8 #include "zipios++/meta-iostreams.h"
25 enum StorageMethod { STORED = 0, SHRUNK, REDUCED1, REDUCED2,
26 REDUCED3, REDUCED4, IMPLODED, RESERVED,
33 typedef SimpleSmartPointer< FileEntry > EntryPointer ;
37 typedef SimpleSmartPointer< const FileEntry > ConstEntryPointer ;
40 typedef vector< EntryPointer > Entries ;
43 typedef vector< EntryPointer > ConstEntries ;
74 virtual uint32
getCrc()
const = 0 ;
80 virtual vector< unsigned char >
getExtra()
const = 0 ;
85 virtual StorageMethod
getMethod()
const = 0 ;
91 virtual string getName()
const = 0 ;
99 virtual uint32
getSize()
const = 0 ;
103 virtual int getTime()
const = 0 ;
109 virtual bool isValid()
const = 0 ;
121 virtual void setComment(
const string &comment ) = 0 ;
129 virtual void setCrc( uint32 crc ) = 0 ;
133 virtual void setExtra(
const vector< unsigned char > &extra ) = 0 ;
137 virtual void setMethod( StorageMethod method ) = 0 ;
141 virtual void setName(
const string &name ) = 0 ;
145 virtual void setSize( uint32 size ) = 0 ;
149 virtual void setTime(
int time ) = 0 ;
154 virtual string toString()
const = 0 ;
167 class MatchFileName ;
171 void ref()
const { _refcount.ref() ; }
172 unsigned int unref()
const {
return _refcount.unref() ; }
174 ReferenceCount< FileEntry > _refcount ;
183 explicit MatchName(
const string &name ) : _name( name ) {}
185 return entry->getName() == _name ;
197 explicit MatchFileName(
const string &name ) : _name( name ) {}
199 return entry->getFileName() == _name ;
205 ostream &operator<< ( ostream &os,
const FileEntry &entry ) ;