pushmtm/Plugins/PushContentHandler/CCOContentHandler.h
changeset 0 84ad3b177aa3
child 25 92a061761a7b
equal deleted inserted replaced
-1:000000000000 0:84ad3b177aa3
       
     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 the License "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 CCOContentHandler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CCOCONTENTHANDLER_H__
       
    21 #define __CCOCONTENTHANDLER_H__
       
    22 
       
    23 // INCLUDE FILES
       
    24 
       
    25 //#include "PushMtmDef.hrh"
       
    26 #include "PushContentHandlerDef.hrh"
       
    27 #include <CContentHandlerBase.h>
       
    28 #include <E32Base.h>
       
    29 //#include <msvstd.h>
       
    30 //#include <msvapi.h>
       
    31 
       
    32 // CONSTANTS
       
    33 
       
    34 const TUid KUidPushCOContentHandler	= { EUidPushCOContentHandler };
       
    35 _LIT( KCOContentHandlerData, "text/vnd.wap.co||application/vnd.wap.coc" );
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 /*class CMsvSession;
       
    40 class CSLPushMsgEntry;
       
    41 class CPushMtmUtil;
       
    42 class CPushMtmSettings;*/
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /** 
       
    47 * CCOContentHandler Handles Cache Operation Content  
       
    48 *
       
    49 * This handler takes ownership of the CO message and processes it
       
    50 * according to the processing rules 
       
    51 * [WAP Cache Operation version 31-July-2001].
       
    52 * Also S60 specific requirements are applied.
       
    53 *
       
    54 * NB. Currently all CO push messages are discarded!
       
    55 */
       
    56 class CCOContentHandler : public CContentHandlerBase
       
    57 	{
       
    58     public: // Constructors and destructor
       
    59 
       
    60         /**
       
    61         * Two-phased constructor. Leaves on failure.
       
    62         * @return The constructed object.
       
    63         */
       
    64 	    static CCOContentHandler* NewL();
       
    65 
       
    66         /**
       
    67         * D'tor.
       
    68         */
       
    69 	    virtual ~CCOContentHandler();
       
    70 
       
    71     private: // Constructors
       
    72 
       
    73         /**
       
    74         * Constructor.
       
    75         */
       
    76 	    CCOContentHandler();
       
    77 
       
    78         /**
       
    79         * Symbian OS constructor.
       
    80         */
       
    81 	    void ConstructL();
       
    82 
       
    83     private: // Methods from CPushHandlerBase
       
    84 	    
       
    85         /**
       
    86         * HandleMessage Async. Version. Takes ownership of Push Message and 
       
    87         * sets self active to continue processing message.
       
    88         * @param aPushMsg CPushMessage to process.
       
    89         * @param aStatus Request status variable for use in asynchronous 
       
    90         *        operations.
       
    91         * @return None.
       
    92         */
       
    93 	    void HandleMessageL( CPushMessage* aPushMsg, TRequestStatus& aStatus );
       
    94 
       
    95         /**
       
    96         * HandleMessage Sync. Version. Takes ownership of Push Message and 
       
    97         * sets self active to continue processing message.
       
    98         * Initial State: Set data members then go to the next state 
       
    99         * @param aPushMsg CPushMessage to process.
       
   100         */
       
   101 	    void HandleMessageL( CPushMessage* aPushMsg );
       
   102 
       
   103         /** 
       
   104         * Same functionality as DoCancel()
       
   105         */
       
   106 	    void CancelHandleMessage();
       
   107 
       
   108         /**
       
   109         * Reserved function.
       
   110         */
       
   111 	    void CPushHandlerBase_Reserved1();
       
   112 
       
   113         /**
       
   114         * Reserved function.
       
   115         */
       
   116 	    void CPushHandlerBase_Reserved2();
       
   117 
       
   118     private: // Methods from CActive
       
   119 
       
   120         /**
       
   121         * Current implementation does nothing. TODO on 2.1.
       
   122         * @return None.
       
   123         */
       
   124 	    void DoCancel();
       
   125 
       
   126         /**
       
   127         * Current implementation does nothing. TODO on 2.1.
       
   128         * @return None.
       
   129         */
       
   130 	    void RunL();
       
   131 
       
   132         /**
       
   133         * Current implementation does nothing. TODO on 2.1.
       
   134         * @return Error code to scheduler.
       
   135         */
       
   136 	    TInt RunError( TInt aError );
       
   137 
       
   138     private: // Data
       
   139 
       
   140 	    enum TState
       
   141             {
       
   142             EDone
       
   143             };
       
   144     };
       
   145 
       
   146 #endif	// __CCOCONTENTHANDLER_H__
       
   147