1.1 --- a/epoc32/include/mw/mproengengine.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/mproengengine.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,142 @@
1.4 -mproengengine.h
1.5 +/*
1.6 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Profile engine interface.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef MPROENGENGINE_H
1.25 +#define MPROENGENGINE_H
1.26 +
1.27 +// INCLUDES
1.28 +#include <e32def.h>
1.29 +
1.30 +// FORWARD DECLARATIONS
1.31 +class RFs;
1.32 +class MProEngProfile;
1.33 +class MProEngProfileNameArray;
1.34 +class MProEngChangeObserverExt;
1.35 +
1.36 +// CLASS DECLARATION
1.37 +
1.38 +/**
1.39 +* Profile engine interface.
1.40 +* This class offers methods to get active profile, active profile ID,
1.41 +* profile names array and set active profile.
1.42 +* How to use:
1.43 +* @code
1.44 +* // Create profile engine by using Factory:
1.45 +* MProEngEngine* profileEngine = NewEngineL();
1.46 +*
1.47 +* // Free resources with MProEngEngine::Release();
1.48 +* profileEngine->Release();
1.49 +* // or if you release resources in destructor:
1.50 +* if( iEngine )
1.51 +* {
1.52 +* iEngine->Release();
1.53 +* }
1.54 +*
1.55 +* // If you put this class to CleanupStack then use void CleanupReleasePushL()
1.56 +* CleanupReleasePushL( *profileEngine );
1.57 +* @endcode
1.58 +*
1.59 +* @lib ProfileEngine.lib
1.60 +* @since 3.1
1.61 +*/
1.62 +class MProEngEngine
1.63 + {
1.64 + public: // Destructor
1.65 +
1.66 + virtual ~MProEngEngine() {};
1.67 +
1.68 + public:
1.69 +
1.70 + /**
1.71 + * Free resources of MProEngEngine.
1.72 + * @since 3.1
1.73 + */
1.74 + virtual void Release() = 0;
1.75 +
1.76 + /**
1.77 + * Return active profile, ownership transferred.
1.78 + * @since 3.1
1.79 + * @return Instance of the MProfile
1.80 + */
1.81 + virtual MProEngProfile* ActiveProfileLC() = 0;
1.82 +
1.83 + /**
1.84 + * Return active profile, ownership transferred.
1.85 + * @since 3.1
1.86 + * @return Instance of the MProfile
1.87 + */
1.88 + virtual MProEngProfile* ActiveProfileL() = 0;
1.89 +
1.90 + /**
1.91 + * Return active profile ID or system error code.
1.92 + * @since 3.1
1.93 + * @return Active profile ID or system error code.
1.94 + */
1.95 + virtual TInt ActiveProfileId() = 0;
1.96 +
1.97 + /**
1.98 + * Return profile name array, ownership transferred.
1.99 + * @since 3.1
1.100 + * @return Instance of the profile name array
1.101 + */
1.102 + virtual MProEngProfileNameArray* ProfileNameArrayLC() = 0;
1.103 +
1.104 + /**
1.105 + * Set the active profile, if ID is incorrect then leave with
1.106 + * KErrNotFound. This method can be called only by processes having
1.107 + * WriteDeviceData capability.
1.108 + * @since 3.1
1.109 + * @param aId Profile ID
1.110 + */
1.111 + virtual void SetActiveProfileL( TInt aId ) = 0;
1.112 +
1.113 + /**
1.114 + * Return the settings of the profile with the given ID. The created
1.115 + * object is pushed in the cleanup stack and the ownership is
1.116 + * transferred. Leave with KErrNotFound if a profile with the given ID
1.117 + * can not be found.
1.118 + * @since 3.1
1.119 + * @param aId Profile ID
1.120 + * @return Instance of the MProEngProfile
1.121 + */
1.122 + virtual MProEngProfile* ProfileLC( TInt aId ) = 0;
1.123 +
1.124 + /**
1.125 + * Return the settings of the profile with the given ID, the ownership
1.126 + * of the created object is transferred. Leave with KErrNotFound if a
1.127 + * profile with the given ID can not be found.
1.128 + * @since 3.1
1.129 + * @param aId Profile ID
1.130 + * @return Instance of the MProEngProfile
1.131 + */
1.132 + virtual MProEngProfile* ProfileL( TInt aId ) = 0;
1.133 +
1.134 + private: // Extension interface
1.135 +
1.136 + /**
1.137 + * This member is internal and not intended for use.
1.138 + */
1.139 + virtual MProEngChangeObserverExt* Extension() { return NULL; }
1.140 +
1.141 + };
1.142 +
1.143 +#endif // MPROENGENGINE_H
1.144 +
1.145 +// End of File
1.146 +