filemanager/Engine/inc/CFileManagerActiveRename.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 18 Jan 2010 20:09:41 +0200
changeset 0 6a9f87576119
permissions -rw-r--r--
Revision: 201001 Kit: 201003

/*
* Copyright (c) 2007 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:  Class wraps rename operation
*
*/



#ifndef CFILEMANAGERACTIVERENAME_H
#define CFILEMANAGERACTIVERENAME_H

// INCLUDES
#include <e32std.h>
#include "CFileManagerActiveBase.h"

// FORWARD DECLARATIONS
class RFs;
class CFileManagerEngine;
class CFileManagerUtils;

// CLASS DECLARATION
/**
* Class wraps rename operation.
*
*  @lib FileManagerEngine.lib
*  @since 3.2
*/
NONSHARABLE_CLASS( CFileManagerActiveRename ) : public CFileManagerActiveBase
    {
    public:
        /**
        * Constructor.
        */
        static CFileManagerActiveRename* NewL(
            CFileManagerEngine& aEngine,
            CFileManagerUtils& aUtils,
            const TDesC& aName,
            const TDesC& aNewName );

        /**
        * Destructor.
        */
        ~CFileManagerActiveRename();

    private: // From CFileManagerActiveBase
        void ThreadFunctionL( const TBool& aCanceled );
        
        void CancelThreadFunction();

    private:
        /**
        * C++ default constructor.
        */
        CFileManagerActiveRename(
            CFileManagerEngine& aEngine,
            CFileManagerUtils& aUtils );

        void ConstructL( const TDesC& aName, const TDesC& aNewName );

        TInt ThreadGetMaxSubfolderPathL( const TBool& aCanceled );

    private: // Data
        // Ref: File Manager engine
        CFileManagerEngine& iEngine;

        // Ref: File Manager utils
        CFileManagerUtils& iUtils;

        // Ref: Shareable file server session
        RFs& iFs;

        // Own: Stores name.
        HBufC* iName;

        // Own: Stores new name.
        HBufC* iNewName;

        // Indicates if operation is done in remote drive
        TBool iIsRemoteDrive;
    };

#endif      // CFILEMANAGERACTIVERENAME_H
            
// End of File