ipsservices/ipssosplugin/inc/ipsstateextension.h
author hgs
Thu, 10 Jun 2010 16:14:05 +0300
changeset 44 c2d07d913565
permissions -rw-r--r--
201023
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description: This file defines class CIpsPlgSosBasePlugin.
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
#ifndef IPSSTATEEXTENSION_H
hgs
parents:
diff changeset
    18
#define IPSSTATEEXTENSION_H
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#include <cmailboxstateext.h>
hgs
parents:
diff changeset
    21
#include "ipsplgcommon.h"
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
class MEmailMailboxState;
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
class MStateObserverCallback
hgs
parents:
diff changeset
    26
    {
hgs
parents:
diff changeset
    27
public:
hgs
parents:
diff changeset
    28
    virtual void ActiveFolderChanged(
hgs
parents:
diff changeset
    29
            const TFSMailMsgId& aActiveMailboxId,
hgs
parents:
diff changeset
    30
            const TFSMailMsgId& aActiveFolderId)=0;
hgs
parents:
diff changeset
    31
    };
hgs
parents:
diff changeset
    32
hgs
parents:
diff changeset
    33
NONSHARABLE_CLASS ( CIpsStateExtension ) :
hgs
parents:
diff changeset
    34
    public CMailboxStateExtension
hgs
parents:
diff changeset
    35
    {
hgs
parents:
diff changeset
    36
public: //from CMailboxStateExtension
hgs
parents:
diff changeset
    37
hgs
parents:
diff changeset
    38
    static CIpsStateExtension* NewL(MStateObserverCallback& aCallback);
hgs
parents:
diff changeset
    39
hgs
parents:
diff changeset
    40
    /**
hgs
parents:
diff changeset
    41
     * Sets data provider interface.
hgs
parents:
diff changeset
    42
     * @param aDataProvider data provider.
hgs
parents:
diff changeset
    43
     */
hgs
parents:
diff changeset
    44
    void SetStateDataProvider( MEmailMailboxState* aDataProvider );
hgs
parents:
diff changeset
    45
    
hgs
parents:
diff changeset
    46
    /**
hgs
parents:
diff changeset
    47
    * Notification that folder has changed in email application.
hgs
parents:
diff changeset
    48
    * @param aActiveMailboxId id of the mailbox container the folder
hgs
parents:
diff changeset
    49
    * @param aActiveFolderId currently active folder id or null id if
hgs
parents:
diff changeset
    50
    *        there's currently no active folder (e.g. application is closed)
hgs
parents:
diff changeset
    51
    */
hgs
parents:
diff changeset
    52
    void NotifyActiveFolderChanged(
hgs
parents:
diff changeset
    53
        const TFSMailMsgId& aActiveMailboxId,
hgs
parents:
diff changeset
    54
        const TFSMailMsgId& aActiveFolderId);
hgs
parents:
diff changeset
    55
    
hgs
parents:
diff changeset
    56
    virtual ~CIpsStateExtension();
hgs
parents:
diff changeset
    57
private:
hgs
parents:
diff changeset
    58
    CIpsStateExtension(MStateObserverCallback& aCallback);
hgs
parents:
diff changeset
    59
    void ConstructL();
hgs
parents:
diff changeset
    60
    
hgs
parents:
diff changeset
    61
private:
hgs
parents:
diff changeset
    62
    MEmailMailboxState*         iDataProvider;//not owned    
hgs
parents:
diff changeset
    63
    MStateObserverCallback&     iCallback;
hgs
parents:
diff changeset
    64
    };
hgs
parents:
diff changeset
    65
hgs
parents:
diff changeset
    66
#endif //IPSSTATEEXTENSION_H