profilesapplication/Profiles/ProfileApp/SettingsViewInc/CProfileEngineHandler.h
branchRCL_3
changeset 19 cd54903d48da
parent 0 ca436256272f
equal deleted inserted replaced
18:b7fa36b488f8 19:cd54903d48da
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Profile engine handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPROFILEENGINEHANDLER_H
       
    21 #define CPROFILEENGINEHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 //  FORWARD DECLARATIONS
       
    27 class MProfileEngineExtended;
       
    28 class MProfilesNamesArray;
       
    29 
       
    30 //  CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Profile Engine Handler.
       
    34 *  Keeps an instance of Profile Engine and maintains a list of profile names.
       
    35 *
       
    36 *  @lib ProfileSettingsView.lib
       
    37 *  @since 2.5
       
    38 */
       
    39 class CProfileEngineHandler : public CBase
       
    40     {
       
    41     public:     // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Symbian 2-phase constructor.
       
    45         * @return Returns an instance of CProfileEngineHandler.
       
    46         */
       
    47         IMPORT_C static CProfileEngineHandler* NewL();
       
    48 
       
    49         // Destructor.
       
    50         ~CProfileEngineHandler();
       
    51 
       
    52     public:     // New methods
       
    53 
       
    54         /**
       
    55         * Returns pointer to Profile Engine extended interface.
       
    56         * @return Returns pointer to Profile Engine extended interface.
       
    57         */
       
    58         IMPORT_C MProfileEngineExtended* Engine() const;
       
    59 
       
    60         /**
       
    61         * Reads an array of profile IDs from Profile Engine.
       
    62         */
       
    63         IMPORT_C void ReadIdArrayL();
       
    64 
       
    65         /**
       
    66         * Returns an array of profile names and IDs.
       
    67         * @return Returns an array of profile names and IDs.
       
    68         */
       
    69         IMPORT_C MProfilesNamesArray* IdArray() const;
       
    70 
       
    71         /**
       
    72         * Returns the ID of a profile at index in iProfileIdArray
       
    73         * @param aIndex Index of the profile.
       
    74         * @return Returns ID of the profile.
       
    75         */
       
    76         IMPORT_C TInt IdForIndex( TInt aIndex ) const;
       
    77 
       
    78     protected:
       
    79 
       
    80         // C++ default constructor.
       
    81         CProfileEngineHandler();
       
    82 
       
    83         // Symbian 2nd phase construct.
       
    84         void ConstructL();
       
    85 
       
    86     private:    // Data
       
    87 
       
    88         // Own: Profile engine extended instance.
       
    89         MProfileEngineExtended* iEngine;
       
    90 
       
    91         // Own: Array of profile names and IDs.
       
    92         MProfilesNamesArray* iIdArray;
       
    93 
       
    94     };
       
    95 
       
    96 #endif // CPROFILEENGINEHANDLER_H
       
    97 
       
    98 // End of File