profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfileStruct.h
branchRCL_3
changeset 19 cd54903d48da
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:  Data structure class for profile settings.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPROFILESTRUCT_H
       
    21 #define CPROFILESTRUCT_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "ProfileEng.hrh"
       
    25 #include "ProfileInternal.hrh"
       
    26 #include <cntdef.h>
       
    27 
       
    28 // CONSTANTS
       
    29 const TInt KProfileMinVolumeLevel( 1 );
       
    30 const TInt KProfileMaxVolumeLevel( 10 );
       
    31 const TInt KProfileMaxProfileNameLength( PROFILES_MAX_NAME_LENGTH );
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class MProfileExtended;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38 *  Data structure class for profile settings.
       
    39 *  Holds settings for one profile.
       
    40 *
       
    41 *  @lib ProfileSettingsView.lib
       
    42 *  @since 1.2
       
    43 */
       
    44 NONSHARABLE_CLASS( CProfileStruct ) : public CBase
       
    45     {
       
    46     public:     // Constructors and destructor
       
    47 
       
    48 		/**
       
    49 		 * Creates and returns a new instance of this class.
       
    50 		 * @return Pointer to the CProfileStruct object
       
    51 		 */
       
    52 		static CProfileStruct* NewL( );
       
    53 
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         virtual ~CProfileStruct();
       
    58 	
       
    59 	private:	// Constructors
       
    60     	/**
       
    61         * C++ default constructor.
       
    62         */
       
    63         CProfileStruct();
       
    64         
       
    65         /**
       
    66         * Second phase constructor
       
    67         */
       
    68         void ConstructL();
       
    69         
       
    70     public:     // New functions
       
    71 
       
    72         /**
       
    73         * Loads settings from Profile Engine via MProfileExtended interface to member data.
       
    74         * @param aProfile Pointer to Profile Engine interface.
       
    75         */
       
    76         void LoadL( MProfileExtended* aProfile );
       
    77 
       
    78         /**
       
    79         * Stores member data to Profile Engine via MProfileExtended interface.
       
    80         * @param aProfile Pointer to Profile Engine interface.
       
    81         */
       
    82         void StoreL( MProfileExtended* aProfile );
       
    83 
       
    84 		/**
       
    85 		* Returns ETrue if member data is the same as in aProfile.
       
    86 		* @param aProfile Profile to compare member data with.
       
    87 		* @return Returns ETrue if member data is the same as in aProfile.
       
    88 		*/
       
    89 		TBool CompareL( MProfileExtended* aProfile ) const;
       
    90 
       
    91         /**
       
    92         * Compares if any ringing/alarm tone setting has changed and
       
    93         * removes it from the automated content list using DRM Helper.
       
    94         * @param aProfile Profile to compare member data with.
       
    95         */
       
    96         void RemoveAutomatedContentL( MProfileExtended* aProfile ) const;
       
    97 
       
    98     public:     // Data
       
    99 
       
   100         // ID of the profile
       
   101         TInt iProfileId;
       
   102 
       
   103         // Filename of ringing tone or line 1 ringing tone
       
   104         TFileName* iRingingTone;
       
   105 
       
   106         // Filename of line 2 ringing tone
       
   107         TFileName* iRingingToneLine2;
       
   108 
       
   109         // Filename of video call tone
       
   110         TFileName* iVideoCallTone;
       
   111 
       
   112         // Ringing type
       
   113         TInt iRingingType;
       
   114 
       
   115         // Ringing volume (between KProfileMinVolumeLevel and KProfileMaxVolumeLevel)
       
   116         TInt iRingingVolume;
       
   117 
       
   118 		// Media volume (between KProfileMinVolumeLevel and KProfileMaxVolumeLevel)
       
   119 		TInt iMediaVolume;
       
   120 
       
   121         // Message alert tone
       
   122         TFileName* iMessageAlertTone;
       
   123 
       
   124         // E-mail alert tone
       
   125         TFileName* iEmailAlertTone;
       
   126 
       
   127         // Vibrating alert setting
       
   128         TBool iVibratingAlert;
       
   129 
       
   130         // Email Vibrating alert setting
       
   131          TBool iEmailVibratingAlert;
       
   132         // Keypad volume level
       
   133         TInt iKeypadVolume;
       
   134 
       
   135         // Warning and game tones setting
       
   136         TBool iWarningAndGameTones;
       
   137 
       
   138         // Alert for setting
       
   139         RArray<TContactItemId> iContactList;
       
   140 
       
   141         // Profile name
       
   142         TBuf<KProfileMaxProfileNameLength> iProfileName;
       
   143 
       
   144         // Profile name for title pane
       
   145         TBuf<KProfileMaxProfileNameLength> iTitleName;
       
   146 
       
   147 		// TTS Ringingtone setting
       
   148 		TBool iTextToSpeech;
       
   149 
       
   150 		// Filename of PTT ringing tone
       
   151         TFileName* iPTTRingingTone;
       
   152 
       
   153         // PTT Status
       
   154         TInt iPTTStatus;
       
   155 
       
   156         // Tactile feedback
       
   157         TInt iTactileFeedback;
       
   158 
       
   159         // Audio feedback
       
   160         TInt iAudioFeedback;
       
   161         
       
   162         // 3D effect
       
   163         TInt i3DEffect;
       
   164 
       
   165         // 3D echo
       
   166         TInt i3DEcho;
       
   167         
       
   168     };
       
   169 
       
   170 #endif // CPROFILESTRUCT_H
       
   171 
       
   172 // End of File