httpfilters/cookie/ManagerInc/CookieManagerSession.h
changeset 0 b16258d2340f
child 7 2611c08ee28e
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Declaration of class CookieManagerSession
       
    15 *               
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __COOKIEMANAGER_SESSION_H__
       
    21 #define __COOKIEMANAGER_SESSION_H__
       
    22 
       
    23 // INCLUDE FILES
       
    24 	// System includes
       
    25 #include <e32base.h>
       
    26 #include <e32def.h>
       
    27 
       
    28 	// User includes
       
    29 #include "CookieClientPanic.h"
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 
       
    33 class CCookie;
       
    34 class CCookieArray;
       
    35 class CCookieManagerServer;
       
    36 class CCookieServer;
       
    37 class RMessage;
       
    38 class RThread;
       
    39 class TCookiePacker;
       
    40 class TUriC8;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45 *
       
    46 */
       
    47 NONSHARABLE_CLASS( CCookieManagerSession ) : public CSession2
       
    48 	{
       
    49 	public:
       
    50 		/**
       
    51 		*
       
    52 		*/
       
    53 		static CCookieManagerSession* NewL( CCookieManagerServer& aServer );
       
    54 
       
    55 		/**
       
    56 		*
       
    57 		*/
       
    58 		~CCookieManagerSession();
       
    59 
       
    60 	public :	// from CSession2
       
    61 		/**
       
    62 		*
       
    63 		*/
       
    64 		virtual void ServiceL( const RMessage2& aMessage );
       
    65 
       
    66 	private :	// construction
       
    67 
       
    68 		/**
       
    69 		*
       
    70 		*/
       
    71 		CCookieManagerSession( CCookieManagerServer& aServer );
       
    72 
       
    73 		/**
       
    74 		* Second-phase constructor.
       
    75 		*/
       
    76 		void ConstructL();
       
    77 
       
    78 	private :	// internal methods
       
    79 
       
    80 		/**
       
    81 		*
       
    82 		*/
       
    83 		TInt ClearAllCookies( const RMessage2& aMessage );
       
    84 
       
    85 		/**
       
    86 		*
       
    87 		*/
       
    88 		TInt DoClearAllCookies( const RMessage2& aMessage );
       
    89 
       
    90 		/**
       
    91 		*
       
    92 		*/
       
    93 		TInt DoGetCookieSize( const RMessage2& aMessage );
       
    94 
       
    95 		/**
       
    96 		*
       
    97 		*/
       
    98 		TInt DoGetCookies( const RMessage2& aMessage );
       
    99 
       
   100 		/**
       
   101 		*
       
   102 		*/
       
   103 		void DoStoreCookieL( const RMessage2& aMessage );
       
   104 
       
   105 		/**
       
   106 		*
       
   107 		*/
       
   108 		TInt GetCookieSize( const RMessage2& aMessage );
       
   109 
       
   110 		/**
       
   111 		*
       
   112 		*/
       
   113 		TInt GetCookies( const RMessage2& aMessage );
       
   114 
       
   115 		/**
       
   116 		*
       
   117 		*/
       
   118 		void PanicClient( const RMessage2& aMessage, 
       
   119                           TCookieClientPanic aPanic ) const;
       
   120 
       
   121 		/**
       
   122 		*
       
   123 		*/
       
   124 		TInt StoreCookie( const RMessage2& aMessage );
       
   125 		
       
   126 		
       
   127 		/**
       
   128 		*
       
   129 		*/
       
   130 		TInt SetAppUidL(const RMessage2& aMessage );
       
   131 
       
   132 	private:
       
   133 		CCookieManagerServer&   iCookieServer;
       
   134 		// TODO : RStringPool* --> RStringPool&
       
   135 		RStringPool*            iStringPool;	///< does not own it,
       
   136 												///< reads from the server
       
   137 
       
   138 		TCookiePacker iCookiePacker;
       
   139 
       
   140 		// As a 'get cookies' request consists of two steps (size inquiry and
       
   141 		// passing cookies), we have to store the resulting cookie list
       
   142 		// temporarily between the two calls.
       
   143 		RPointerArray<CCookie> iGetCookieList;
       
   144 
       
   145 		// The size of the temporary cookie list in bytes
       
   146 		TInt iGetCookieListSize;
       
   147 
       
   148 //		CCookieArray* iTransientCookies;
       
   149 	};
       
   150 
       
   151 #endif //__COOKIEMANAGER_SESSION_H__