2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Base class for Common File Dialogs.
19 #ifndef CAKNCOMMONDIALOGSBASE_H
20 #define CAKNCOMMONDIALOGSBASE_H
24 #include <ConeResLoader.h>
29 * Enumerations for different dialogs. A dialog loads its default values
30 * (such as softkey texts and title) depending on its type.
32 enum TCommonDialogType
39 ECFDDialogTypeDefaultSetting, //Cannot be used in multi-drive
44 * Text that is shown when Common File Dialogs panics.
46 _LIT( KCFDPanicText, "CommonDialogs" );
49 * Enumerations for Common File Dialog panics.
53 ECFDPanicInvalidFilterType = 1,
54 ECFDPanicInvalidFilterStyle = 2,
55 ECFDPanicInvalidAttributeFilterDataLength = 3,
56 ECFDPanicInvalidAttributeFilterDataCount = 4,
57 ECFDPanicInvalidFileNameFilterDataLength = 5,
58 ECFDPanicInvalidFileNameFilterDataCount = 6,
59 ECFDPanicNoLocationStructures = 7,
60 ECFDPanicRootPathNotDefined = 8,
61 ECFDPanicNoPathForFileNamePromptDialog = 9,
62 ECFDPanicOutOfBounds = 10,
63 ECFDPanicNullParameter = 11,
64 ECFDPanicNoResourceDefined = 12,
65 ECFDPanicTitleOrSoftkeyNotSet = 13
68 // FORWARD DECLARATIONS
73 * Base class for Common File Dialogs.
74 * Can't be created without derivation because of the protected constructor.
75 * Opens CFD's resource in BaseConstructL.
77 * @lib CommonDialogs.lib
80 NONSHARABLE_CLASS(CAknCommonDialogsBase) : public CBase
82 public: // Enumerations
85 * Sometimes it is necessary to know if dialog was exited by
86 * left softkey or selection key. This enumeration works as TBool,
87 * ERightSoftkey is not true and other return values are.
88 * For example, memory selection dialog and file selection dialog
89 * return values of this enumeration.
93 ERightSoftkey = EFalse,
98 protected: // Constructors and destructors
100 CAknCommonDialogsBase();
102 virtual ~CAknCommonDialogsBase();
105 * Loads resource of Common File Dialogs on any language.
107 void BaseConstructL();
112 * Ref: Pointer to control environment.
113 * Pointer is cached because using of CCoeEnv::Static() is slow.
114 * For direct use for derived classes.
120 // Own: Loads resource file of Common File Dialogs on any language.
121 RConeResourceLoader iResourceLoader;
124 #endif // CAKNCOMMONDIALOGSBASE_H