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