26
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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: Definition of file rename dialog for Common UI
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef C_CMPXFILENAMEQUERYDLG_H
|
|
20 |
#define C_CMPXFILENAMEQUERYDLG_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <AknQueryDialog.h> // CAknTextQueryDialog
|
|
24 |
#include <mpxmediageneraldefs.h>
|
|
25 |
|
|
26 |
// CLASS DECLARATION
|
|
27 |
class CMPXCommonUiHelper;
|
|
28 |
|
|
29 |
/**
|
|
30 |
* @lib mpxcommonui.lib
|
|
31 |
* @since S60 v3.0
|
|
32 |
* Dialog for querying file names in File Manager
|
|
33 |
*/
|
|
34 |
NONSHARABLE_CLASS( CMPXFileNameQueryDlg ): public CAknTextQueryDialog
|
|
35 |
{
|
|
36 |
public: // Constructors and destructor
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Two-phased constructor.
|
|
40 |
* @param aOldName Old name of the file, this will be the default name
|
|
41 |
* @param aNewName User entered new name of the file.
|
|
42 |
* @param aPath original path for the file, needed to check if the file
|
|
43 |
* already exist
|
|
44 |
* @param aCategory specifies the category for the title
|
|
45 |
* @return Newly created query dialog.
|
|
46 |
*/
|
|
47 |
static CMPXFileNameQueryDlg* NewL( const TDesC& aOldName,
|
|
48 |
TDes& aNewName,
|
|
49 |
const TDesC& aPath,
|
|
50 |
TMPXGeneralCategory aCategory,
|
|
51 |
CMPXCommonUiHelper* aParent );
|
|
52 |
|
|
53 |
/**
|
|
54 |
* Destructor.
|
|
55 |
*/
|
|
56 |
~CMPXFileNameQueryDlg();
|
|
57 |
|
|
58 |
public: // from CAknTextQueryDialog
|
|
59 |
/**
|
|
60 |
* @see CAknTextQueryDialog
|
|
61 |
*/
|
|
62 |
TBool OkToExitL( TInt aButtonId );
|
|
63 |
|
|
64 |
/**
|
|
65 |
* @see CAknTextQueryDialog
|
|
66 |
*/
|
|
67 |
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
|
|
68 |
|
|
69 |
private:
|
|
70 |
/**
|
|
71 |
* C++ default constructor.
|
|
72 |
*/
|
|
73 |
CMPXFileNameQueryDlg(
|
|
74 |
TDes& aNewName,
|
|
75 |
TMPXGeneralCategory aCategory,
|
|
76 |
CMPXCommonUiHelper* aParent );
|
|
77 |
|
|
78 |
/**
|
|
79 |
* Symbian OS 2nd phase constructor.
|
|
80 |
* @param aOldName Old name of the file, this will be the default name
|
|
81 |
* @param aPath original path for the file
|
|
82 |
*/
|
|
83 |
void ConstructL( const TDesC& aOldName, const TDesC& aPath );
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Is given file name valid
|
|
87 |
* @since 3.0
|
|
88 |
* @param aDriveAndPath root path
|
|
89 |
* @param aName name of the file
|
|
90 |
* @param aIsFolder ETrue folder and EFalse file name
|
|
91 |
* @return ETrue if file name is valid
|
|
92 |
*/
|
|
93 |
TBool IsValidName(
|
|
94 |
const TDesC& aDriveAndPath, const TDesC& aName, TBool aIsFolder ) const;
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Check that if given file name contains illegal characters
|
|
98 |
* @since 3.0
|
|
99 |
* @param aName name of the file
|
|
100 |
* @return ETrue if file name is valid
|
|
101 |
*/
|
|
102 |
TBool IllegalChars( const TDesC& aName ) const;
|
|
103 |
|
|
104 |
private: // Data
|
|
105 |
HBufC* iOldName; // own
|
|
106 |
HBufC* iPath; // own
|
|
107 |
CMPXCommonUiHelper* iParent; // not own
|
|
108 |
MMPXCollectionUiHelper* iCollectionUiHelper; //own
|
|
109 |
TMPXGeneralCategory iCategory;
|
|
110 |
};
|
|
111 |
|
|
112 |
#endif // C_CMPXFILENAMEQUERYDLG_H
|
|
113 |
|
|
114 |
// End of File
|