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