|
1 /* |
|
2 * Copyright (c) 2009 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: This class implements MProEngProfileName interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPROENGPROFILENAMEIMPL_H |
|
21 #define CPROENGPROFILENAMEIMPL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <MProEngProfileName.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MProfileName; |
|
29 class MProfileSetName; |
|
30 class CProEngEngineImpl; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * This class implements MProEngProfileName interface. |
|
36 * |
|
37 * @lib ProfileEngine.lib |
|
38 * @since 3.1 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CProEngProfileNameImpl ) : public CBase, |
|
41 public MProEngProfileName |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 static CProEngProfileNameImpl* NewL( |
|
49 const MProfileName& aProfileName, |
|
50 MProfileSetName& aProfileSetName, |
|
51 CProEngEngineImpl& aEngine, |
|
52 TBool aModifiable ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CProEngProfileNameImpl(); |
|
58 |
|
59 public: // Functions from base classes |
|
60 |
|
61 /** |
|
62 * From MProEngProfileName |
|
63 */ |
|
64 TInt Id() const; |
|
65 |
|
66 /** |
|
67 * From MProEngProfileName |
|
68 */ |
|
69 const TDesC& Name() const; |
|
70 |
|
71 /** |
|
72 * From MProEngProfileName |
|
73 */ |
|
74 TInt SetNameL( const TDesC& aName ); |
|
75 |
|
76 public: // New functions |
|
77 |
|
78 /** |
|
79 * Checks if the name to be given for the profiles is already used by |
|
80 * another profile. |
|
81 * @param aName the name to be set to profile. |
|
82 * @return ETrue if there already is a profile with the given name. |
|
83 * @since 3.1 |
|
84 */ |
|
85 TBool AlreadyExistsL( const TDesC& aName ); |
|
86 |
|
87 private: |
|
88 |
|
89 /** |
|
90 * C++ constructor. |
|
91 */ |
|
92 CProEngProfileNameImpl( |
|
93 const MProfileName& aProfileName, |
|
94 MProfileSetName& aProfileSetName, |
|
95 CProEngEngineImpl& aEngine, |
|
96 TBool aModifiable ); |
|
97 |
|
98 private: // Data |
|
99 |
|
100 // the interface to the implementation of the profile name |
|
101 const MProfileName& iProfileName; |
|
102 |
|
103 // the interface to the implementation of the profile set name |
|
104 MProfileSetName& iProfileSetName; |
|
105 |
|
106 // Engine ref. needed for checking whether a profile name already exists |
|
107 CProEngEngineImpl& iEngine; |
|
108 |
|
109 // Is name modification allowed |
|
110 TBool iModifiable; |
|
111 }; |
|
112 |
|
113 #endif // CPROENGPROFILENAMEIMPL_H |
|
114 |
|
115 // End of File |
|
116 |
|
117 |
|
118 |