emailservices/emailframework/commonlib/inc/cmailboxstateext.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Message extension interface
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CMAILBOXSTATEEXT_H
       
    19 #define CMAILBOXSTATEEXT_H
       
    20 
       
    21 #include "cemailextensionbase.h"
       
    22 #include "emailextensionuids.hrh"
       
    23 #include "cfsmailcommon.h"
       
    24 
       
    25 // interface UID value passed to CFSMailClient::ExtensionL
       
    26 
       
    27 /**
       
    28 * Data providider interface.
       
    29 */
       
    30 class MEmailMailboxState
       
    31 {
       
    32 public:
       
    33     /**
       
    34     * Returns currently active folder and related mailbox that
       
    35     * is currently being used.
       
    36     * @param aActiveMailboxId id of currently active mailbox 
       
    37     * @param aActiveFolderId id of currently active mail folder
       
    38     * @return Symbian OS error code
       
    39     */
       
    40     virtual TInt GetActiveFolderId( 
       
    41         TFSMailMsgId& aActiveMailboxId,
       
    42         TFSMailMsgId& aActiveFolderId ) const = 0;
       
    43 };
       
    44 
       
    45 /**
       
    46  * Extension interface for passing UI context data to protocol plugins. 
       
    47  */
       
    48 class CMailboxStateExtension : public CEmailExtension
       
    49 {
       
    50 public:
       
    51     
       
    52     /**
       
    53      * Sets data provider interface
       
    54      * @param aDataProvider data provider
       
    55      */
       
    56     virtual void SetStateDataProvider( MEmailMailboxState* aDataProvider ) = 0;
       
    57 
       
    58 protected:    
       
    59     inline CMailboxStateExtension();
       
    60 
       
    61 protected:
       
    62     MEmailMailboxState* iDataProvider;
       
    63 };
       
    64 
       
    65 inline CMailboxStateExtension::CMailboxStateExtension() :
       
    66          CEmailExtension( KEmailMailboxStateExtensionUid )
       
    67     {
       
    68     }
       
    69          
       
    70 #endif // CMAILBOXSTATEEXT_H