profilesservices/ProfileEngine/EngInc/MProfileEngineExtended.h
branchRCL_3
changeset 8 f62c3a3d66b8
parent 4 3f8368f032cf
child 10 c8b9b0986973
equal deleted inserted replaced
4:3f8368f032cf 8:f62c3a3d66b8
     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:  Extended profile engine interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __MPROFILEENGINEEXTENDED_H__
       
    21 #define __MPROFILEENGINEEXTENDED_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <MProfileEngine.h>
       
    25 
       
    26 // DATA TYPES
       
    27 enum TProfileUtilityObjectType
       
    28     {
       
    29     EProfileUtilityObjectPresenceTool      = 0
       
    30     };
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 class MProfileEngineExtended;
       
    34 class MProfilesLocalFeatures;
       
    35 
       
    36 /**
       
    37 * Create extended profile engine, ownership transfered.
       
    38 *
       
    39 *  @lib ProfileEng.lib
       
    40 *  @since 2.0
       
    41 */
       
    42 IMPORT_C MProfileEngineExtended* CreateProfileEngineExtendedL();
       
    43 
       
    44 /**
       
    45 * Create extended profile engine, ownership transfered.
       
    46 *
       
    47 *  @param aFs An open file server session, ownership is NOT transferred.
       
    48 *  aFs must remain connected for the lifetime of the returned object.
       
    49 *  @lib ProfileEng.lib
       
    50 *  @since 3.0
       
    51 */
       
    52 IMPORT_C MProfileEngineExtended* CreateProfileEngineExtendedL( RFs* aFs );
       
    53 
       
    54 // FORWARD DECLARATIONS
       
    55 class MProfileExtended;
       
    56 class MProfilePresence;
       
    57 
       
    58 // CLASS DECLARATION
       
    59 
       
    60 /**
       
    61 *  Extended profile engine interface.
       
    62 *  This interface extend MProfileEngine interface and
       
    63 *  offers methods to get profile settings and store profile settings.
       
    64 *
       
    65 *  @lib N/A
       
    66 *  @since 2.0
       
    67 */
       
    68 class MProfileEngineExtended : public MProfileEngine
       
    69     {
       
    70     protected:  // Destructor
       
    71 
       
    72         virtual ~MProfileEngineExtended() {};
       
    73 
       
    74     public: // New functions
       
    75 
       
    76         /**
       
    77         * Create extended profile, ownership transfered.
       
    78         * @since 2.0
       
    79         * @param aId Profile ID
       
    80         * @return Instance of the MProfileExtended
       
    81         */
       
    82         virtual MProfileExtended* ProfileLC( TInt aId ) = 0;
       
    83 
       
    84         /**
       
    85         * Create extended profile, ownership transfered.
       
    86         * @since 2.0
       
    87         * @param aId Profile ID
       
    88         * @return Instance of the MProfileExtended
       
    89         */
       
    90         virtual MProfileExtended* ProfileL( TInt aId ) = 0;
       
    91 
       
    92         /**
       
    93         * Store profile settings. Leaves with KErrAccessDenied if one or more
       
    94         * of the settings of the target profile is/are read-only.
       
    95         * @since 2.0
       
    96         * @param aProfile Profile
       
    97         */
       
    98         virtual void CommitChangeL( MProfileExtended& aProfile ) = 0;
       
    99 
       
   100         /**
       
   101         * Send presence settings.
       
   102         * @since 2.1
       
   103         * @param aProfile Profile
       
   104         */
       
   105         virtual void SendPresenceSettingsL(
       
   106             const MProfilePresence& aPresence ) = 0;
       
   107 
       
   108         /**
       
   109         * Delete profile.
       
   110         * @since 2.1
       
   111         * @param aId Profile ID
       
   112         * @return Error code
       
   113         */
       
   114         virtual TInt DeleteProfileL( TInt aId ) = 0;
       
   115 
       
   116         /**
       
   117         * Create new profile, ownership transfered.
       
   118         * @since 2.1
       
   119         * @return Instance of the MProfileExtended
       
   120         */
       
   121         virtual MProfileExtended* CreateProfileL() = 0;
       
   122 
       
   123         /**
       
   124         * Returns is profile default profile.
       
   125         * @since 2.0
       
   126         * @param aId Profile ID
       
   127         * @return Is profile default profile
       
   128         */
       
   129         virtual TBool IsDefaultProfile( TInt aId ) = 0;
       
   130 
       
   131         /**
       
   132         * Returns locally variated features of Profiles.
       
   133         * @since 2.6
       
   134         */
       
   135         virtual MProfilesLocalFeatures& LocalFeatures() = 0;
       
   136 
       
   137         /**
       
   138          * Returns an utility object needed for a specific task. The returned
       
   139          * object can be generally of any class and the caller must know what
       
   140          * it wants and cast the returned object to the correct class.
       
   141          * The ownership is not transferred.
       
   142          * @param aType the type of the utility object to be returned.
       
   143          * @param aImpl the utility object needed by the client on return, NULL
       
   144          * if there isn't any of the given type
       
   145          */
       
   146         virtual void GetProfileUtilityObject(
       
   147                 TProfileUtilityObjectType aType, TAny*& aImpl ) = 0;
       
   148 
       
   149         /**
       
   150         * Set timed active profile. When the time expires the profile which was
       
   151         * active before calling this method will be reactivated.
       
   152         * If ID is incorrect then leave with KErrNotFound.
       
   153         * @since 3.2
       
   154         * @param aId Profile ID
       
   155         * @param aTime time when the profile activation expires
       
   156         */
       
   157         virtual void SetActiveProfileTimedL( TInt aId, TTime aTime ) = 0;
       
   158 
       
   159     };
       
   160 
       
   161 #endif      // __MPROFILEENGINEEXTENDED_H__
       
   162 
       
   163 // End of File