|
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: Profile extra tones implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CPROFILEEXTRATONESIMPL_H |
|
21 #define __CPROFILEEXTRATONESIMPL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <MProfileExtraTones.h> |
|
26 #include "MProfileSetExtraTones.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class RWriteStream; |
|
30 class CRepository; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Profile extra tones implementation. |
|
36 * |
|
37 * @lib ?library |
|
38 * @since 2.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS(CProfileExtraTonesImpl) : public CBase, |
|
41 public MProfileExtraTones, |
|
42 public MProfileSetExtraTones |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CProfileExtraTonesImpl* NewL(); |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. Copy constructor. |
|
53 * @param aProfileExtraTones Profile extra tones |
|
54 */ |
|
55 static CProfileExtraTonesImpl* NewL( |
|
56 const MProfileExtraTones& aProfileExtraTones ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 virtual ~CProfileExtraTonesImpl(); |
|
62 |
|
63 public: // New functions |
|
64 |
|
65 /** |
|
66 * Internalize data from the central repository. |
|
67 * @since 2.8 |
|
68 * @param aCenRep Central Repository object to read the settings |
|
69 * @param aProfileId the id of the profile to be internalized |
|
70 */ |
|
71 void InternalizeL( CRepository& aCenRep, TInt aProfileId ); |
|
72 |
|
73 /** |
|
74 * Externalize data to Central Repository. |
|
75 * @since 2.8 |
|
76 * @param aCenRep Central Repository object to write the settings |
|
77 */ |
|
78 void ExternalizeL( CRepository& aCenRep, TInt aProfileId ) const; |
|
79 |
|
80 public: // Functions from base classes |
|
81 |
|
82 /** |
|
83 * From MProfileExtraTones. |
|
84 */ |
|
85 virtual const TDesC& IMMessageAlertTone() const; |
|
86 |
|
87 /** |
|
88 * From MProfileSetExtraTones. |
|
89 */ |
|
90 virtual void SetIMMessageAlertToneL( |
|
91 const TDesC& aIMMessageAlertTone ); |
|
92 |
|
93 /** |
|
94 * From MProfileExtraTones. |
|
95 */ |
|
96 virtual const TDesC& EmailAlertTone() const; |
|
97 |
|
98 /** |
|
99 * From MProfileSetExtraTones. |
|
100 */ |
|
101 virtual void SetEmailAlertToneL( |
|
102 const TDesC& aEmailAlertTone ); |
|
103 |
|
104 /** |
|
105 * From MProfileExtraTones. |
|
106 */ |
|
107 virtual const TDesC& VideoCallRingingTone() const; |
|
108 |
|
109 /** |
|
110 * From MProfileSetExtraTones. |
|
111 */ |
|
112 virtual void SetVideoCallRingingToneL( |
|
113 const TDesC& aRingingTone ); |
|
114 |
|
115 private: |
|
116 |
|
117 /** |
|
118 * By default Symbian 2nd phase constructor is private. |
|
119 */ |
|
120 void ConstructL(); |
|
121 |
|
122 /** |
|
123 * By default Symbian 2nd phase constructor is private. |
|
124 * @param aProfileExtraTones Profile extra tones |
|
125 */ |
|
126 void ConstructL( const MProfileExtraTones& aProfileExtraTones ); |
|
127 |
|
128 private: // Data |
|
129 |
|
130 // Own: IM Message Alert tone file name |
|
131 HBufC* iIMMessageAlertTone; |
|
132 |
|
133 // Own: Email Alert tone file name |
|
134 HBufC* iEmailAlertTone; |
|
135 |
|
136 // Own: Video call ringing tone file name |
|
137 HBufC* iVideoCallRingingTone; |
|
138 }; |
|
139 |
|
140 #endif // __CPROFILEEXTRATONESIMPL_H |
|
141 |
|
142 // End of File |