ipsservices/ipssosplugin/inc/ipsplgdisconnectop.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:28:57 +0100
branchRCL_3
changeset 64 3533d4323edc
parent 63 d189ee25cf9d
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Disconnection operation class
*
*/

#ifndef IPSPLGDISCONNECTOP_H
#define IPSPLGDISCONNECTOP_H


#include "ipsplgonlineoperation.h"


/**
* Disconnect operation.
* 
*/
class CIpsPlgDisconnectOp :
    public CIpsPlgOnlineOperation
    {
    public:

        /**
        *
        */
        static CIpsPlgDisconnectOp* NewL(
            CMsvSession& aMsvSession,
            TRequestStatus& aObserverRequestStatus,
            TMsvId aService,
            CIpsPlgTimerOperation& aActivityTimer,
            TFSMailMsgId aFSMailBoxId,
            MFSMailRequestObserver& aFSOperationObserver,
            TInt aFSRequestId,
            TBool aDoRemoveAfterDisconnect = EFalse );

        /**
        *
        */
        virtual ~CIpsPlgDisconnectOp();

        /**
        *
        */
        const TDesC8& ProgressL();

        /**
        *
        */
        const TDesC8& GetErrorProgressL( TInt aError );
        
        /**
        * 
        */
       TFSProgress GetFSProgressL() const;

        /**
        *
        */
        TBool Connected() const;

    protected:


        /**
        * From CActive
        */
        void DoRunL();
        
    private:

        /**
        *
        */
        CIpsPlgDisconnectOp(
            CMsvSession& aMsvSession,
            TRequestStatus& aObserverRequestStatus,
            TMsvId aServiceId,
            CIpsPlgTimerOperation& aActivityTimer,
            TFSMailMsgId aFSMailBoxId,
            MFSMailRequestObserver& aFSOperationObserver,
            TInt aFSRequestId,
            TBool aDoRemoveAfterDisconnect );

        /**
        *
        */
        void ConstructL();

        /**
        *
        */
        void DoDisconnectL();

        
    private: // Data
        
        TPckgBuf<TPop3Progress> iPopProgress;
        TPckgBuf<TImap4CompoundProgress> iImapProgress;
        TMsvEntry               iTEntry;
        TBool                   iDisconnected;
        TBool                   iDoRemoveAfterDisconnect;
        
    };

#endif //IPSPLGDISCONNECTOP_H