1 mproengengine.h |
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Profile engine interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MPROENGENGINE_H |
|
21 #define MPROENGENGINE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32def.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class RFs; |
|
28 class MProEngProfile; |
|
29 class MProEngProfileNameArray; |
|
30 class MProEngChangeObserverExt; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Profile engine interface. |
|
36 * This class offers methods to get active profile, active profile ID, |
|
37 * profile names array and set active profile. |
|
38 * How to use: |
|
39 * @code |
|
40 * // Create profile engine by using Factory: |
|
41 * MProEngEngine* profileEngine = NewEngineL(); |
|
42 * |
|
43 * // Free resources with MProEngEngine::Release(); |
|
44 * profileEngine->Release(); |
|
45 * // or if you release resources in destructor: |
|
46 * if( iEngine ) |
|
47 * { |
|
48 * iEngine->Release(); |
|
49 * } |
|
50 * |
|
51 * // If you put this class to CleanupStack then use void CleanupReleasePushL() |
|
52 * CleanupReleasePushL( *profileEngine ); |
|
53 * @endcode |
|
54 * |
|
55 * @lib ProfileEngine.lib |
|
56 * @since 3.1 |
|
57 */ |
|
58 class MProEngEngine |
|
59 { |
|
60 public: // Destructor |
|
61 |
|
62 virtual ~MProEngEngine() {}; |
|
63 |
|
64 public: |
|
65 |
|
66 /** |
|
67 * Free resources of MProEngEngine. |
|
68 * @since 3.1 |
|
69 */ |
|
70 virtual void Release() = 0; |
|
71 |
|
72 /** |
|
73 * Return active profile, ownership transferred. |
|
74 * @since 3.1 |
|
75 * @return Instance of the MProfile |
|
76 */ |
|
77 virtual MProEngProfile* ActiveProfileLC() = 0; |
|
78 |
|
79 /** |
|
80 * Return active profile, ownership transferred. |
|
81 * @since 3.1 |
|
82 * @return Instance of the MProfile |
|
83 */ |
|
84 virtual MProEngProfile* ActiveProfileL() = 0; |
|
85 |
|
86 /** |
|
87 * Return active profile ID or system error code. |
|
88 * @since 3.1 |
|
89 * @return Active profile ID or system error code. |
|
90 */ |
|
91 virtual TInt ActiveProfileId() = 0; |
|
92 |
|
93 /** |
|
94 * Return profile name array, ownership transferred. |
|
95 * @since 3.1 |
|
96 * @return Instance of the profile name array |
|
97 */ |
|
98 virtual MProEngProfileNameArray* ProfileNameArrayLC() = 0; |
|
99 |
|
100 /** |
|
101 * Set the active profile, if ID is incorrect then leave with |
|
102 * KErrNotFound. This method can be called only by processes having |
|
103 * WriteDeviceData capability. |
|
104 * @since 3.1 |
|
105 * @param aId Profile ID |
|
106 */ |
|
107 virtual void SetActiveProfileL( TInt aId ) = 0; |
|
108 |
|
109 /** |
|
110 * Return the settings of the profile with the given ID. The created |
|
111 * object is pushed in the cleanup stack and the ownership is |
|
112 * transferred. Leave with KErrNotFound if a profile with the given ID |
|
113 * can not be found. |
|
114 * @since 3.1 |
|
115 * @param aId Profile ID |
|
116 * @return Instance of the MProEngProfile |
|
117 */ |
|
118 virtual MProEngProfile* ProfileLC( TInt aId ) = 0; |
|
119 |
|
120 /** |
|
121 * Return the settings of the profile with the given ID, the ownership |
|
122 * of the created object is transferred. Leave with KErrNotFound if a |
|
123 * profile with the given ID can not be found. |
|
124 * @since 3.1 |
|
125 * @param aId Profile ID |
|
126 * @return Instance of the MProEngProfile |
|
127 */ |
|
128 virtual MProEngProfile* ProfileL( TInt aId ) = 0; |
|
129 |
|
130 private: // Extension interface |
|
131 |
|
132 /** |
|
133 * This member is internal and not intended for use. |
|
134 */ |
|
135 virtual MProEngChangeObserverExt* Extension() { return NULL; } |
|
136 |
|
137 }; |
|
138 |
|
139 #endif // MPROENGENGINE_H |
|
140 |
|
141 // End of File |
|
142 |