2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Profile engine interface.
20 #ifndef MPROENGENGINE_H
21 #define MPROENGENGINE_H
26 // FORWARD DECLARATIONS
29 class MProEngProfileNameArray;
30 class MProEngChangeObserverExt;
35 * Profile engine interface.
36 * This class offers methods to get active profile, active profile ID,
37 * profile names array and set active profile.
40 * // Create profile engine by using Factory:
41 * MProEngEngine* profileEngine = NewEngineL();
43 * // Free resources with MProEngEngine::Release();
44 * profileEngine->Release();
45 * // or if you release resources in destructor:
51 * // If you put this class to CleanupStack then use void CleanupReleasePushL()
52 * CleanupReleasePushL( *profileEngine );
55 * @lib ProfileEngine.lib
62 virtual ~MProEngEngine() {};
67 * Free resources of MProEngEngine.
70 virtual void Release() = 0;
73 * Return active profile, ownership transferred.
75 * @return Instance of the MProfile
77 virtual MProEngProfile* ActiveProfileLC() = 0;
80 * Return active profile, ownership transferred.
82 * @return Instance of the MProfile
84 virtual MProEngProfile* ActiveProfileL() = 0;
87 * Return active profile ID or system error code.
89 * @return Active profile ID or system error code.
91 virtual TInt ActiveProfileId() = 0;
94 * Return profile name array, ownership transferred.
96 * @return Instance of the profile name array
98 virtual MProEngProfileNameArray* ProfileNameArrayLC() = 0;
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.
105 * @param aId Profile ID
107 virtual void SetActiveProfileL( TInt aId ) = 0;
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
115 * @param aId Profile ID
116 * @return Instance of the MProEngProfile
118 virtual MProEngProfile* ProfileLC( TInt aId ) = 0;
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.
125 * @param aId Profile ID
126 * @return Instance of the MProEngProfile
128 virtual MProEngProfile* ProfileL( TInt aId ) = 0;
130 private: // Extension interface
133 * This member is internal and not intended for use.
135 virtual MProEngChangeObserverExt* Extension() { return NULL; }
139 #endif // MPROENGENGINE_H