webengine/osswebengine/cache/inc/HttpCacheEntry.h
changeset 1 7c90e6132015
parent 0 dd21522fd290
child 10 a359256acfc6
--- a/webengine/osswebengine/cache/inc/HttpCacheEntry.h	Mon Mar 30 12:54:55 2009 +0300
+++ b/webengine/osswebengine/cache/inc/HttpCacheEntry.h	Fri May 08 08:25:06 2009 +0300
@@ -20,8 +20,11 @@
 
 //  INCLUDES
 #include <e32base.h>
+#include <f32file.h>
 
 // CONSTANTS
+const TInt KBufferSize32k = 32768;
+const TInt KBufferSizeZero = 0;
 
 // MACROS
 
@@ -155,7 +158,7 @@
         * @param 
         * @return 
         */
-        inline TUint Size() const { return iSize; }
+        inline TUint BodySize() const { return iBodySize; }
 
         /**
         * 
@@ -163,7 +166,7 @@
         * @param 
         * @return 
         */
-        void SetSize( TUint aSize );
+        void SetBodySize( TUint aSize );
 
         /**
         * 
@@ -183,6 +186,38 @@
 
         /**
         * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        inline RFile& HeaderFile() { return iHeaderFile; }
+
+        /**
+        * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        inline RFile& BodyFile() { return iBodyFile; }
+
+        /**
+        * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        TPtr8 CacheBuffer();
+        
+        /**
+        * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        void SetCacheBufferL( TInt aCacheBufferSize );
+
+        /**
+        * 
         * @since 3.1
         * @param 
         * @return 
@@ -221,6 +256,41 @@
         */
         void Accessed(TInt64 aLastAccessed, TUint16 aRef);
 
+        /**
+        * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        inline TBool BodyFileDeleteNeeded() { return iBodyFileDeleteNeeded; }
+
+        /**
+        * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        inline void SetBodyFileDeleteNeeded( TBool aBodyFileDeleteNeeded )
+                    {
+                    iBodyFileDeleteNeeded = aBodyFileDeleteNeeded;
+                    }
+
+        /**
+        * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        TBool CacheFilesOpened() { return iCacheFilesOpened; }
+
+        /**
+        * 
+        * @since 7.1
+        * @param 
+        * @return 
+        */
+        void SetCacheFilesOpened( TBool aCacheFilesOpened );
+
     public : 
 
         // support linked list
@@ -245,9 +315,9 @@
     private:    // Data
 
         //
-        HBufC8*                         iUrl;       // owned
+        HBufC8*                         iUrl;               // owned
         // if empty, then use url to get filename
-        HBufC*                          iFileName; // owned
+        HBufC*                          iFileName;          // owned
         //
         TCacheEntryState                iState;
         //
@@ -255,17 +325,27 @@
         // ref counter
         TUint16                         iRef;
         // content size
-        TUint                           iSize;
+        TUint                           iBodySize;
         // header size
         TUint16                         iHeaderSize;
         // protected content like css, script
         TUint8                          iProtected;
         //
-        TSglQueLink                     iSlink;
+        TSglQueLink                     iSqlQueLink;
+        //
+        CHttpCacheEvictionHandler*      iEvictionHandler;   // not owned
+        // Etrue if added to the eviction table
+        TUint8                          iEvictionCandidate;
+        //
+        TBool                           iBodyFileDeleteNeeded;
         //
-        CHttpCacheEvictionHandler*      iEvictionHandler;         // not owned
-        // Etrue if added to the eviction table
-        TUint8                          iVictim;
+        RFile                           iHeaderFile;        // owned
+        //
+        RFile                           iBodyFile;          // owned
+        //
+        HBufC8*                         iCacheBuffer;       // owned
+        // ETrue if files open (and attached to StreamHandler) for read/write
+        TBool                           iCacheFilesOpened;
     };
 
 #endif      // CHTTPCACHEENTRY_H