Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CascadeFile.h

Go to the documentation of this file.
00001 //
00002 // CascadeFile.h - header file for class CascadeFile
00003 //
00004 // Copyright (c) 2002, Roku, LLC.  All rights reserved.
00005 //
00008 
00009 #ifndef _ROKU_INCLUDE_CASCADE_UTIL_CASCADEFILE_H
00010 #define _ROKU_INCLUDE_CASCADE_UTIL_CASCADEFILE_H
00011 
00012 #include <cascade/util/CascadeFSObject.h>
00013 #include <cascade/util/CascadeString.h>
00014 
00015 // Forward declaration
00016 class CascadeDirectory;
00017 
00028 class CascadeFile : public CascadeFSObject
00029 {
00030 public:
00031         CascadeFile();
00035         
00036     CascadeFile(const char * pName);
00043         
00044         virtual ~CascadeFile();
00051 
00052 public:
00053     virtual bool Open(const char * pMode);
00061         
00062     virtual bool Close();
00068 
00069     virtual bool Delete();
00074     
00075     typedef bool (FileCopyCallback)(u64 inTotal, 
00076                                     u64 inComplete, 
00077                                     void *pClientData );
00092 
00093     virtual bool CopyInto( CascadeDirectory &inDestination,
00094                            FSCopyError &outError,
00095                            FileCopyCallback *inCallback = NULL,
00096                            void *inClientData = NULL,
00097                            bool inReplace = false );
00111         
00112     virtual bool IsOpen() const;
00117     
00118     virtual bool SetName(const char * pName);
00126         
00127     virtual bool Read(void * pBuff, u32 nBytes);
00135         
00136     virtual bool Write(void * pBuff, u32 nBytes);
00144 
00145     virtual u64 GetFileSize() const;
00153 
00154     virtual bool SeekToBeginning();
00160 
00161         
00162     virtual bool SeekForward(u32 nBytes);
00169         
00170     virtual bool SeekBackward(u32 nBytes);
00177         
00178     virtual bool SeekToEnd();
00184         
00185     virtual bool SeekToPosition(u64 nPosition);
00194 
00195     virtual void * GetHandle() const;
00203 
00204     virtual bool IsDirectory( void ) const { return false; }
00209 
00210 private:
00211     void * m_pFileInternal;
00212 };
00213 
00214 
00215 #endif // #ifndef _ROKU_INCLUDE_CASCADE_UTIL_CASCADEFILE_H
00216 
00218 // LOG
00220 // 21-Jan-03    dwoodward       created
00221 // 28-Jul-03    mjkobb      Fixed IsDirectory to be const
00222 // 10-Aug-03    mjkobb      Added CopyInto
00223 
00224 

Generated on Sun Jul 24 14:27:17 2005 for Cascade Library by  doxygen 1.4.1