34 #ifndef CPL_VSI_VIRTUAL_H_INCLUDED
35 #define CPL_VSI_VIRTUAL_H_INCLUDED
39 #include "cpl_multiproc.h"
42 # include "cpl_wince.h"
43 # include <wce_errno.h>
44 # pragma warning(disable:4786)
57 virtual int Seek( vsi_l_offset nOffset,
int nWhence ) = 0;
58 virtual vsi_l_offset Tell() = 0;
59 virtual size_t Read(
void *pBuffer,
size_t nSize,
size_t nMemb ) = 0;
60 virtual int ReadMultiRange(
int nRanges,
void ** ppData,
const vsi_l_offset* panOffsets,
const size_t* panSizes );
61 virtual size_t Write(
const void *pBuffer,
size_t nSize,
size_t nMemb)=0;
62 virtual int Eof() = 0;
63 virtual int Flush() {
return 0;}
64 virtual int Close() = 0;
65 virtual int Truncate( CPL_UNUSED vsi_l_offset nNewSize ) {
return -1; }
66 virtual void *GetNativeFileDescriptor() {
return NULL; }
81 const char *pszAccess) = 0;
82 virtual int Stat(
const char *pszFilename, VSIStatBufL *pStatBuf,
int nFlags) = 0;
83 virtual int Unlink(
const char *pszFilename )
84 { (void) pszFilename; errno=ENOENT;
return -1; }
85 virtual int Mkdir(
const char *pszDirname,
long nMode )
86 {(void)pszDirname; (void)nMode; errno=ENOENT;
return -1;}
87 virtual int Rmdir(
const char *pszDirname )
88 { (void) pszDirname; errno=ENOENT;
return -1; }
89 virtual char **ReadDir(
const char *pszDirname )
90 { (void) pszDirname;
return NULL; }
91 virtual int Rename(
const char *oldpath,
const char *newpath )
92 { (void) oldpath; (void)newpath; errno=ENOENT;
return -1; }
93 virtual int IsCaseSensitive(
const char* pszFilename )
94 { (void) pszFilename;
return TRUE; }
105 std::map<std::string, VSIFilesystemHandler *> oHandlers;
115 static void InstallHandler(
const std::string& osPrefix,
137 vsi_l_offset uncompressed_size;
140 GIntBig nModifiedTime;
146 vsi_l_offset nFileSize;
156 virtual int GotoFirstFile() = 0;
157 virtual int GotoNextFile() = 0;
159 virtual GUIntBig GetFileSize() = 0;
161 virtual GIntBig GetModifiedTime() = 0;
172 std::map<CPLString,VSIArchiveContent*> oFileList;
174 virtual const char* GetPrefix() = 0;
175 virtual std::vector<CPLString> GetExtensions() = 0;
182 virtual int Stat(
const char *pszFilename, VSIStatBufL *pStatBuf,
int nFlags );
183 virtual int Unlink(
const char *pszFilename );
184 virtual int Rename(
const char *oldpath,
const char *newpath );
185 virtual int Mkdir(
const char *pszDirname,
long nMode );
186 virtual int Rmdir(
const char *pszDirname );
187 virtual char **ReadDir(
const char *pszDirname );
190 virtual char* SplitFilename(
const char *pszFilename,
CPLString &osFileInArchive,
int bCheckMainFileExists);
191 virtual VSIArchiveReader* OpenArchiveFile(
const char* archiveFilename,
const char* fileInArchiveName);
192 virtual int FindFileInArchive(
const char* archiveFilename,
const char* fileInArchiveName,
const VSIArchiveEntry** archiveEntry);
197 const GByte* pabyBeginningContent,
198 vsi_l_offset nSheatFileSize);
Definition: cpl_vsi_virtual.h:74
Definition: cpl_vsi_virtual.h:165
Definition: cpl_vsi_virtual.h:55
Convenient string class based on std::string.
Definition: cpl_string.h:236
Definition: cpl_vsi_virtual.h:143
Definition: cpl_vsi_virtual.h:134
Definition: cpl_vsi_virtual.h:151
Definition: cpl_vsi_virtual.h:101
Definition: cpl_vsi_virtual.h:128