34 #ifndef CPL_VSI_VIRTUAL_H_INCLUDED 35 #define CPL_VSI_VIRTUAL_H_INCLUDED 41 # include "cpl_wince.h" 42 # include <wce_errno.h> 43 # pragma warning(disable:4786) 56 virtual int Seek( vsi_l_offset nOffset,
int nWhence ) = 0;
57 virtual vsi_l_offset Tell() = 0;
58 virtual size_t Read(
void *pBuffer,
size_t nSize,
size_t nMemb ) = 0;
59 virtual int ReadMultiRange(
int nRanges,
void ** ppData,
const vsi_l_offset* panOffsets,
const size_t* panSizes );
60 virtual size_t Write(
const void *pBuffer,
size_t nSize,
size_t nMemb)=0;
61 virtual int Eof() = 0;
62 virtual int Flush() {
return 0;}
63 virtual int Close() = 0;
64 virtual int Truncate( CPL_UNUSED vsi_l_offset nNewSize ) {
return -1; }
65 virtual void *GetNativeFileDescriptor() {
return NULL; }
80 const char *pszAccess) = 0;
81 virtual int Stat(
const char *pszFilename, VSIStatBufL *pStatBuf,
int nFlags) = 0;
82 virtual int Unlink(
const char *pszFilename )
83 { (void) pszFilename; errno=ENOENT;
return -1; }
84 virtual int Mkdir(
const char *pszDirname,
long nMode )
85 {(void)pszDirname; (void)nMode; errno=ENOENT;
return -1;}
86 virtual int Rmdir(
const char *pszDirname )
87 { (void) pszDirname; errno=ENOENT;
return -1; }
88 virtual char **ReadDir(
const char *pszDirname )
89 { (void) pszDirname;
return NULL; }
90 virtual int Rename(
const char *oldpath,
const char *newpath )
91 { (void) oldpath; (void)newpath; errno=ENOENT;
return -1; }
92 virtual int IsCaseSensitive(
const char* pszFilename )
93 { (void) pszFilename;
return TRUE; }
104 std::map<std::string, VSIFilesystemHandler *> oHandlers;
114 static void InstallHandler(
const std::string& osPrefix,
116 static void RemoveHandler(
const std::string& osPrefix );
135 vsi_l_offset uncompressed_size;
138 GIntBig nModifiedTime;
152 virtual int GotoFirstFile() = 0;
153 virtual int GotoNextFile() = 0;
155 virtual GUIntBig GetFileSize() = 0;
157 virtual GIntBig GetModifiedTime() = 0;
168 std::map<CPLString,VSIArchiveContent*> oFileList;
170 virtual const char* GetPrefix() = 0;
171 virtual std::vector<CPLString> GetExtensions() = 0;
178 virtual int Stat(
const char *pszFilename, VSIStatBufL *pStatBuf,
int nFlags );
179 virtual int Unlink(
const char *pszFilename );
180 virtual int Rename(
const char *oldpath,
const char *newpath );
181 virtual int Mkdir(
const char *pszDirname,
long nMode );
182 virtual int Rmdir(
const char *pszDirname );
183 virtual char **ReadDir(
const char *pszDirname );
186 virtual char* SplitFilename(
const char *pszFilename,
CPLString &osFileInArchive,
int bCheckMainFileExists);
187 virtual VSIArchiveReader* OpenArchiveFile(
const char* archiveFilename,
const char* fileInArchiveName);
188 virtual int FindFileInArchive(
const char* archiveFilename,
const char* fileInArchiveName,
const VSIArchiveEntry** archiveEntry);
Definition: cpl_vsi_virtual.h:73
Definition: cpl_vsi_virtual.h:161
Definition: cpl_vsi_virtual.h:54
Convenient string class based on std::string.
Definition: cpl_string.h:226
Definition: cpl_vsi_virtual.h:141
Definition: cpl_vsi_virtual.h:132
Definition: cpl_vsi_virtual.h:147
Definition: cpl_vsi_virtual.h:100
Definition: cpl_vsi_virtual.h:126