|
1 /* |
|
2 * Copyright (c) 2002 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 encapsulates the implementation of MProfile- |
|
15 * UtilitySingleton. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CPROFILEUTILITYSINGLETONIMPL_H__ |
|
22 #define __CPROFILEUTILITYSINGLETONIMPL_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "MProfileUtilitySingleton.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MProfilesLocalFeatures; |
|
30 class CProfilesLocalFeatures; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Implementation of MProfileUtility. |
|
36 */ |
|
37 NONSHARABLE_CLASS( CProfileUtilitySingletonImpl ) : public CBase, |
|
38 public MProfileUtilitySingleton |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CProfileUtilitySingletonImpl* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CProfileUtilitySingletonImpl(); |
|
51 |
|
52 public: // From base classes |
|
53 |
|
54 /** |
|
55 * From MProfileUtility |
|
56 */ |
|
57 MProfilesLocalFeatures& ProfilesLocalFeatures(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * Increments the counter of users of this singleton object. |
|
63 */ |
|
64 void IncrementReferences(); |
|
65 |
|
66 /** |
|
67 * Decrements the counter of users of this singleton object. |
|
68 * @return ETrue, when there are no users of this singleton anymore. |
|
69 */ |
|
70 TBool DecrementReferences(); |
|
71 |
|
72 private: // Constructors |
|
73 |
|
74 /** |
|
75 * By default Symbian 2nd phase constructor is private. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 /** |
|
80 * C++ default constructor. |
|
81 */ |
|
82 CProfileUtilitySingletonImpl(); |
|
83 |
|
84 private: // data |
|
85 |
|
86 /// Profiles local features owned by this class. |
|
87 CProfilesLocalFeatures* iLocalFeatures; |
|
88 |
|
89 /// References to this CProfileUtilitySingletonImpl instance. |
|
90 TInt iReferences; |
|
91 }; |
|
92 |
|
93 #endif // __CPROFILEUTILITYSINGLETONIMPL_H__ |
|
94 |
|
95 // End of File |
|
96 |