profilesservices/ProfileEngine/WrapperSrc/CProEngEngineImpl.h
changeset 0 8c5d936e5675
child 12 bdac6c462392
equal deleted inserted replaced
-1:000000000000 0:8c5d936e5675
       
     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 "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implementaion of MProEngEngine interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPROENGENGINEIMPL_H
       
    21 #define CPROENGENGINEIMPL_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <MProEngEngine.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class RFs;
       
    29 class MProEngProfile;
       
    30 class MProEngProfileNameArray;
       
    31 class MProfileEngineExtended;
       
    32 class CProEngToneHandler;
       
    33 class CProEngProfileImpl;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 * This class implements MProEngEngine interface.
       
    39 *
       
    40 *  @lib ProfileEngine.lib
       
    41 *  @since 3.1
       
    42 */
       
    43 NONSHARABLE_CLASS( CProEngEngineImpl ) : public CBase,
       
    44                                          public MProEngEngine
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47 
       
    48         /**
       
    49          * Two-phased constructor.
       
    50          */
       
    51         static CProEngEngineImpl* NewL();
       
    52 
       
    53         /**
       
    54          * Two-phased constructor.
       
    55          */
       
    56         static CProEngEngineImpl* NewLC();
       
    57 
       
    58         /**
       
    59          * Two-phased constructor.
       
    60          */
       
    61         static CProEngEngineImpl* NewL( RFs& aFs );
       
    62 
       
    63         /**
       
    64          * Two-phased constructor.
       
    65          */
       
    66         static CProEngEngineImpl* NewLC( RFs& aFs );
       
    67 
       
    68         /**
       
    69          * Destructor.
       
    70          */
       
    71         virtual ~CProEngEngineImpl();
       
    72 
       
    73     public:
       
    74 
       
    75         /**
       
    76          * From MProEngEngine
       
    77          */
       
    78         void Release();
       
    79 
       
    80         /**
       
    81          * From MProEngEngine
       
    82          */
       
    83         MProEngProfile* ActiveProfileLC();
       
    84 
       
    85         /**
       
    86          * From MProEngEngine
       
    87          */
       
    88         MProEngProfile* ActiveProfileL();
       
    89 
       
    90         /**
       
    91          * From MProEngEngine
       
    92          */
       
    93         TInt ActiveProfileId();
       
    94 
       
    95         /**
       
    96          * From MProEngEngine
       
    97          */
       
    98         MProEngProfileNameArray* ProfileNameArrayLC();
       
    99 
       
   100         /**
       
   101          * From MProEngEngine
       
   102          */
       
   103         void SetActiveProfileL( TInt aId );
       
   104 
       
   105         /**
       
   106          * From MProEngEngine
       
   107          */
       
   108         MProEngProfile* ProfileLC( TInt aId );
       
   109 
       
   110         /**
       
   111          * From MProEngEngine
       
   112          */
       
   113         MProEngProfile* ProfileL( TInt aId );
       
   114 
       
   115     public:  // New functions
       
   116 
       
   117         /**
       
   118          * Gets the data of the given profile.
       
   119          * @since 3.1
       
   120          * @param aId the ID of the profile which data is retrieved.
       
   121          * @return Pointer to the implementation of profile data wrapper.
       
   122          */
       
   123         CProEngProfileImpl* ProfilePrivateLC( TInt aId );
       
   124 
       
   125         /**
       
   126          * Returns a reference to the underlying Profiles Engine Extended.
       
   127          * @since 3.1
       
   128          * @return Reference to the underlying Profiles Engine Extended.
       
   129          */
       
   130         MProfileEngineExtended& ProfileEngineExtended();
       
   131 
       
   132         /**
       
   133          * Returns a reference to the tone handler needed for checking the
       
   134          * legality of the alert tones set by the client.
       
   135          * @since 3.1
       
   136          * @return Reference to the tone handler.
       
   137          */
       
   138         CProEngToneHandler& ToneHandler();
       
   139 
       
   140     private:  // New functions
       
   141 
       
   142         /**
       
   143          * Checks if the given profile ID is in the range reserved for dynamic
       
   144          * profiles. However, the method does not check whether a profile with
       
   145          * the given ID really exists.
       
   146          * @since 3.1
       
   147          * @param aId the profile ID to be checked
       
   148          * @return ETrue if the ID is in the range of dynamic profile IDs,
       
   149          *         EFalse otherwise
       
   150          */
       
   151         TBool IsDynamicProfileId( TInt aId );
       
   152 
       
   153     private:
       
   154 
       
   155         /**
       
   156          * C++ default constructor.
       
   157          */
       
   158         CProEngEngineImpl();
       
   159 
       
   160         /**
       
   161         * By default Symbian 2nd phase constructor is private.
       
   162         */
       
   163         void ConstructL();
       
   164 
       
   165         /**
       
   166         * By default Symbian 2nd phase constructor is private.
       
   167         */
       
   168         void ConstructL( RFs& aFs );
       
   169 
       
   170     private:    // Data
       
   171 
       
   172         // Own: the actual Profiles Engine
       
   173         MProfileEngineExtended* iProfileEngine;
       
   174 
       
   175         // Own: tone handler for DRM checkups etc.
       
   176         CProEngToneHandler* iToneHandler;
       
   177     };
       
   178 
       
   179 #endif      //  CPROENGENGINEIMPL_H
       
   180 
       
   181 // End of File
       
   182