pushmtm/Plugins/PushContentHandler/CPushContentHandlerBase.h
branchRCL_3
changeset 48 8e6fa1719340
equal deleted inserted replaced
47:6385c4c93049 48:8e6fa1719340
       
     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 CPushContentHandlerBase.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CPUSHCONTENTHANDLERBASE_H__
       
    21 #define __CPUSHCONTENTHANDLERBASE_H__
       
    22 
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include <push/CContentHandlerBase.h>
       
    27 #include <E32Base.h>
       
    28 #include <msvstd.h>
       
    29 #include <msvapi.h>
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 
       
    33 class CMsvSession;
       
    34 class CPushMtmUtil;
       
    35 class CPushMtmSettings;
       
    36 class CStringResourceReader;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 * CPushContentHandlerBase class stands as a base class for almost all push
       
    42 * content handlers of the Push MTM. It collects the generic functionality of
       
    43 * a push content handler, such as garbage collection when receiving new
       
    44 * service message, supporting CMsvSession, CPushMtmUtil and CPushMtmSettings
       
    45 * objects.
       
    46 */
       
    47 class CPushContentHandlerBase : public CContentHandlerBase,
       
    48                                 public MMsvSessionObserver
       
    49 	{
       
    50     protected: // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * Constructor.
       
    54         */
       
    55 	    CPushContentHandlerBase();
       
    56 
       
    57         /**
       
    58         * Symbian OS constructor. CActiveScheduler::Add( this ) is called in
       
    59         * this method!!
       
    60         */
       
    61 	    void ConstructL();
       
    62 
       
    63         /**
       
    64         * Destructor.
       
    65         */
       
    66 	    virtual ~CPushContentHandlerBase();
       
    67 
       
    68     protected: // New functions
       
    69 
       
    70         /**
       
    71         * Do Garbage Collection synchronously.
       
    72         * @return None.
       
    73         */
       
    74 	    void DoCollectGarbageL();
       
    75 
       
    76         /**
       
    77         * Apply Push MTM settings on the message.
       
    78         * @return ETrue if the message passed the filtering.
       
    79         */
       
    80         TBool FilterPushMsgL();
       
    81 
       
    82     protected: // From MMsvSessionObserver
       
    83 
       
    84         /**
       
    85         * Msv session events are handled by this method. This implementation
       
    86         * is empty.
       
    87         * @return None.
       
    88         */
       
    89         void HandleSessionEventL( TMsvSessionEvent aEvent,
       
    90                                   TAny* aArg1,
       
    91                                   TAny* aArg2,
       
    92                                   TAny* aArg3);
       
    93 
       
    94     protected: // Data
       
    95 
       
    96         CMsvSession* iMsvSession; ///< Session to Message Server. Has.
       
    97         CPushMtmUtil* iWapPushUtils; ///< Push Utility. Has.
       
    98         CPushMtmSettings* iMtmSettings; ///< Push Settings. Has.
       
    99         /// Owned. It uses iMsvSession's RFs!
       
   100         CStringResourceReader* iStrRscReader;
       
   101     };
       
   102 
       
   103 #endif	// __CPUSHCONTENTHANDLERBASE_H__
       
   104