|
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 settings interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __MPROFILE_H__ |
|
21 #define __MPROFILE_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <cntdef.h> // TContactItemId |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MProfileName; |
|
28 class MProfileTones; |
|
29 class MProfileExtraTones; |
|
30 class MProfileExtraSettings; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Profile settigns interface. |
|
36 * MProfile offers methods to get the alert for items, profile name interface, |
|
37 * profile tones interface and profile extra tones interface. |
|
38 * How to use: |
|
39 * Get active profile with MProfileEngine::ActiveProfileL(). |
|
40 * MProfile* profile = iProfileEngine->ActiveProfileL(); |
|
41 * Free resources with MProfile::Release() |
|
42 * profile->Release(); |
|
43 * If you release resources in destructor then: |
|
44 * if( iProfile ) |
|
45 * { |
|
46 * iProfile->Release(); |
|
47 * } |
|
48 * |
|
49 * If you put this class to CleanupStack then use void CleanupReleasePushL() |
|
50 * CleanupReleasePushL( *profile ); |
|
51 * |
|
52 * @lib N/A |
|
53 * @since 2.0 |
|
54 */ |
|
55 class MProfile |
|
56 { |
|
57 protected: // Destructor |
|
58 |
|
59 virtual ~MProfile() {}; |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Free resources of the profile. |
|
65 * @since 2.0 |
|
66 */ |
|
67 virtual void Release() = 0; |
|
68 |
|
69 /** |
|
70 * Return the alert for item array. |
|
71 * @since 2.0 |
|
72 * @return Alert for array |
|
73 */ |
|
74 virtual const TArray<TContactItemId> AlertForL() = 0; |
|
75 |
|
76 /** |
|
77 * Is silent profile. |
|
78 * @since 2.0 |
|
79 * @return ETrue if profile is silent |
|
80 */ |
|
81 virtual TBool IsSilent() const = 0; |
|
82 |
|
83 /** |
|
84 * Return profile name. |
|
85 * @since 2.0 |
|
86 * @return Instance of the profile name |
|
87 */ |
|
88 virtual const MProfileName& ProfileName() const = 0; |
|
89 |
|
90 /** |
|
91 * Return tone settings. |
|
92 * @since 2.0 |
|
93 * @return Instance of the MProfileTones |
|
94 */ |
|
95 virtual const MProfileTones& ProfileTones() const = 0; |
|
96 |
|
97 /** |
|
98 * Return extra tone settings. |
|
99 * @since 2.0 |
|
100 * @return Instance of the MProfileExtraTones |
|
101 */ |
|
102 virtual const MProfileExtraTones& ProfileExtraTones() const = 0; |
|
103 |
|
104 /** |
|
105 * Return Profiles extra settings. |
|
106 * @since 3.0 |
|
107 * @return Instance of the MProfileExtraSettings |
|
108 */ |
|
109 virtual const MProfileExtraSettings& ProfileExtraSettings() const = 0; |
|
110 |
|
111 }; |
|
112 |
|
113 #endif // __MPROFILE_H__ |
|
114 |
|
115 // End of File |