williamr@2: /* williamr@2: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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 williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Profile engine interface. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: #ifndef MPROENGENGINE_H williamr@2: #define MPROENGENGINE_H williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: williamr@2: // FORWARD DECLARATIONS williamr@2: class RFs; williamr@2: class MProEngProfile; williamr@2: class MProEngProfileNameArray; williamr@2: class MProEngChangeObserverExt; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * Profile engine interface. williamr@2: * This class offers methods to get active profile, active profile ID, williamr@2: * profile names array and set active profile. williamr@2: * How to use: williamr@2: * @code williamr@2: * // Create profile engine by using Factory: williamr@2: * MProEngEngine* profileEngine = NewEngineL(); williamr@2: * williamr@2: * // Free resources with MProEngEngine::Release(); williamr@2: * profileEngine->Release(); williamr@2: * // or if you release resources in destructor: williamr@2: * if( iEngine ) williamr@2: * { williamr@2: * iEngine->Release(); williamr@2: * } williamr@2: * williamr@2: * // If you put this class to CleanupStack then use void CleanupReleasePushL() williamr@2: * CleanupReleasePushL( *profileEngine ); williamr@2: * @endcode williamr@2: * williamr@2: * @lib ProfileEngine.lib williamr@2: * @since 3.1 williamr@2: */ williamr@2: class MProEngEngine williamr@2: { williamr@2: public: // Destructor williamr@2: williamr@2: virtual ~MProEngEngine() {}; williamr@2: williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Free resources of MProEngEngine. williamr@2: * @since 3.1 williamr@2: */ williamr@2: virtual void Release() = 0; williamr@2: williamr@2: /** williamr@2: * Return active profile, ownership transferred. williamr@2: * @since 3.1 williamr@2: * @return Instance of the MProfile williamr@2: */ williamr@2: virtual MProEngProfile* ActiveProfileLC() = 0; williamr@2: williamr@2: /** williamr@2: * Return active profile, ownership transferred. williamr@2: * @since 3.1 williamr@2: * @return Instance of the MProfile williamr@2: */ williamr@2: virtual MProEngProfile* ActiveProfileL() = 0; williamr@2: williamr@2: /** williamr@2: * Return active profile ID or system error code. williamr@2: * @since 3.1 williamr@2: * @return Active profile ID or system error code. williamr@2: */ williamr@2: virtual TInt ActiveProfileId() = 0; williamr@2: williamr@2: /** williamr@2: * Return profile name array, ownership transferred. williamr@2: * @since 3.1 williamr@2: * @return Instance of the profile name array williamr@2: */ williamr@2: virtual MProEngProfileNameArray* ProfileNameArrayLC() = 0; williamr@2: williamr@2: /** williamr@2: * Set the active profile, if ID is incorrect then leave with williamr@2: * KErrNotFound. This method can be called only by processes having williamr@2: * WriteDeviceData capability. williamr@2: * @since 3.1 williamr@2: * @param aId Profile ID williamr@2: */ williamr@2: virtual void SetActiveProfileL( TInt aId ) = 0; williamr@2: williamr@2: /** williamr@2: * Return the settings of the profile with the given ID. The created williamr@2: * object is pushed in the cleanup stack and the ownership is williamr@2: * transferred. Leave with KErrNotFound if a profile with the given ID williamr@2: * can not be found. williamr@2: * @since 3.1 williamr@2: * @param aId Profile ID williamr@2: * @return Instance of the MProEngProfile williamr@2: */ williamr@2: virtual MProEngProfile* ProfileLC( TInt aId ) = 0; williamr@2: williamr@2: /** williamr@2: * Return the settings of the profile with the given ID, the ownership williamr@2: * of the created object is transferred. Leave with KErrNotFound if a williamr@2: * profile with the given ID can not be found. williamr@2: * @since 3.1 williamr@2: * @param aId Profile ID williamr@2: * @return Instance of the MProEngProfile williamr@2: */ williamr@2: virtual MProEngProfile* ProfileL( TInt aId ) = 0; williamr@2: williamr@2: private: // Extension interface williamr@2: williamr@2: /** williamr@2: * This member is internal and not intended for use. williamr@2: */ williamr@2: virtual MProEngChangeObserverExt* Extension() { return NULL; } williamr@2: williamr@2: }; williamr@2: williamr@2: #endif // MPROENGENGINE_H williamr@2: williamr@2: // End of File williamr@2: