messagingappbase/mce/inc/MceEmailNotifHandler.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2005 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:   Active object for marking the e-mails as read and resetting
       
    15 *				 the count of the unread e-mails.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MCE_EMAIL_NOTIF_HANDLER_H
       
    23 #define MCE_EMAIL_NOTIF_HANDLER_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <MNcnInternalNotification.h>
       
    28 #include <NcnNotificationDefs.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Active object for marking the e-mails as read and resetting
       
    37 *  the count of the unread e-mails.
       
    38 *  @lib Mce.exe
       
    39 *  @since Series 60 3.0
       
    40 */
       
    41 class CMceEmailNotifHandler : public CActive
       
    42 	{
       
    43     public:  // Constructors and destructor
       
    44 
       
    45         /**
       
    46         * Two-phased constructor.
       
    47         */
       
    48 	    static CMceEmailNotifHandler* NewLC();
       
    49 	    
       
    50 	    /**
       
    51         * Two-phased constructor.
       
    52         */
       
    53 	    static CMceEmailNotifHandler* NewL();
       
    54 	    
       
    55         /**
       
    56         * Destructor.
       
    57         */
       
    58 	    ~CMceEmailNotifHandler();
       
    59 	    
       
    60     public: // New functions	    
       
    61     
       
    62         /**
       
    63         * Starts the operation for marking all the e-mails as read and
       
    64         * resetting the count of the unread e-mails. Operation runs in
       
    65         * the background
       
    66         * @since Series 60 3.0
       
    67         * @param  None.
       
    68         * @return None.
       
    69         */
       
    70         void HandleNotif();
       
    71         
       
    72         /**
       
    73          * Starts the operation for marking the e-mails of specific account as read and
       
    74          * resetting the count of the unread e-mails. Operation runs in
       
    75          * the background
       
    76          * @since Series 60 3.0
       
    77          * @param aMailBox The id for mail msg type identifying mailbox or mail
       
    78          *                 folder containing message(s) to be marked as unread.
       
    79          * @return None.
       
    80          */
       
    81         void HandleNotif(const TMsvId& aMailbox);
       
    82 
       
    83     public:  // Functions from base classes
       
    84     
       
    85         /**
       
    86         * From CActive, completion of the asyncronous request
       
    87         * @since Series 60 3.0
       
    88         * @return None.
       
    89         */ 
       
    90 	    void RunL();
       
    91 	    
       
    92 	    /**
       
    93         * From CActive, cancellation of the asyncronous request
       
    94         * @since Series 60 3.0
       
    95         * @return None.
       
    96         */        
       
    97         void DoCancel();
       
    98         
       
    99         /**
       
   100         * From CActive, handles the leaves from RunL
       
   101         * @since Series 60 3.0
       
   102         * @param aError: Error code
       
   103         * @return None.
       
   104         */
       
   105         TInt RunError( TInt );
       
   106 
       
   107     private:
       
   108 
       
   109         /**
       
   110         * C++ default constructor.
       
   111         */
       
   112 	    CMceEmailNotifHandler();
       
   113 	
       
   114 		/**
       
   115         * Second phase constructor.
       
   116         */
       
   117 		void ConstructL();
       
   118 	
       
   119     private:     // Data
       
   120 
       
   121         MNcnInternalNotification*	iNcnNotification;
       
   122 	};
       
   123 
       
   124 #endif      // MCE_EMAIL_NOTIF_HANDLER_H
       
   125             
       
   126 // End of File