ipsservices/ipssosplugin/inc/ipsstateextension.h
changeset 53 bf7eb7911fc5
equal deleted inserted replaced
30:759dc5235cdb 53:bf7eb7911fc5
       
     1 /*
       
     2 * Copyright (c) 2007 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: This file defines class CIpsPlgSosBasePlugin.
       
    15 *
       
    16 */
       
    17 #ifndef IPSSTATEEXTENSION_H
       
    18 #define IPSSTATEEXTENSION_H
       
    19 
       
    20 #include <cmailboxstateext.h>
       
    21 #include "ipsplgcommon.h"
       
    22 
       
    23 class MEmailMailboxState;
       
    24 
       
    25 class MStateObserverCallback
       
    26     {
       
    27 public:
       
    28     virtual void ActiveFolderChanged(
       
    29             const TFSMailMsgId& aActiveMailboxId,
       
    30             const TFSMailMsgId& aActiveFolderId)=0;
       
    31     };
       
    32 
       
    33 NONSHARABLE_CLASS ( CIpsStateExtension ) :
       
    34     public CMailboxStateExtension
       
    35     {
       
    36 public: //from CMailboxStateExtension
       
    37 
       
    38     static CIpsStateExtension* NewL(MStateObserverCallback& aCallback);
       
    39 
       
    40     /**
       
    41      * Sets data provider interface.
       
    42      * @param aDataProvider data provider.
       
    43      */
       
    44     void SetStateDataProvider( MEmailMailboxState* aDataProvider );
       
    45     
       
    46     /**
       
    47     * Notification that folder has changed in email application.
       
    48     * @param aActiveMailboxId id of the mailbox container the folder
       
    49     * @param aActiveFolderId currently active folder id or null id if
       
    50     *        there's currently no active folder (e.g. application is closed)
       
    51     */
       
    52     void NotifyActiveFolderChanged(
       
    53         const TFSMailMsgId& aActiveMailboxId,
       
    54         const TFSMailMsgId& aActiveFolderId);
       
    55     
       
    56     virtual ~CIpsStateExtension();
       
    57 private:
       
    58     CIpsStateExtension(MStateObserverCallback& aCallback);
       
    59     void ConstructL();
       
    60     
       
    61 private:
       
    62     MEmailMailboxState*         iDataProvider;//not owned    
       
    63     MStateObserverCallback&     iCallback;
       
    64     };
       
    65 
       
    66 #endif //IPSSTATEEXTENSION_H