mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h
changeset 15 ccd8e69b5392
parent 2 b31261fd4e04
child 20 e8be2c2e049d
child 22 496ad160a278
equal deleted inserted replaced
2:b31261fd4e04 15:ccd8e69b5392
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  MUSSettingsPlugin model class.
       
    15 *  Version     : %version: 10 % << Don't touch! Updated by Synergy at check-out.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef  C_MUSSETTINGSMODEL_H
       
    22 #define  C_MUSSETTINGSMODEL_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <badesca.h>
       
    26 //class CDesCArray;
       
    27 class MMusSIPProfileHandler;
       
    28 class CMusSIPProfileModel;
       
    29 class CAknMemorySelectionDialogMultiDrive;
       
    30 
       
    31 
       
    32 /**
       
    33  *  CMusSettingsModel is the model class of GS application.
       
    34  *  It provides functions to get and set setting values.
       
    35  */
       
    36 class CMusSettingsModel : public CBase
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      * @param aHandler Reference to SIP profile manipulator class.
       
    43      * return Returns pointer to a new instance of CMusSettings class.
       
    44      */
       
    45     static CMusSettingsModel* NewL( MMusSIPProfileHandler& aHandler );
       
    46 
       
    47     /**
       
    48      * Destructor.
       
    49      */
       
    50     ~CMusSettingsModel();
       
    51 
       
    52     /**
       
    53      * Returns recorded video saving mode.
       
    54      * @return 2: phone memory 
       
    55      *         4: memory card 
       
    56      */
       
    57     TInt VSSettingsRecordedVideoSavingL();
       
    58     
       
    59     /**
       
    60      * operator specific variant
       
    61      * Sets activation item 
       
    62      * @param aActive (enabled/disabled).
       
    63      */
       
    64     void SetActivationItem( TBool aActive );
       
    65 
       
    66     /**
       
    67      * operator specific variant
       
    68      * @return activation item 
       
    69      */
       
    70     TBool ActivationItem( );
       
    71     
       
    72     /**
       
    73      * Returns the array containing the profile names.
       
    74      * NOTE! The ownership of the array is transferred to the caller.
       
    75      * @return Array consisting of the names of the SIP profiles.
       
    76      */
       
    77 	CDesCArray* ListOfProfileNamesL();
       
    78 
       
    79     /**
       
    80      * Gets a SIP profile name by ID.
       
    81      * Ownership is transferred to caller.
       
    82      * @return SIP profile name.
       
    83      */
       
    84 	HBufC* ProfileNameL( TInt aId );
       
    85 
       
    86     /**
       
    87      * Gets the index of the default SIP profile.
       
    88      * @return KErrNotFound, if one does not exist, otherwise index of the
       
    89      *         default SIP profile.
       
    90      */
       
    91 	TInt DefaultProfileIndex();
       
    92 
       
    93     /**
       
    94      * Gets the id of the default SIP profile.
       
    95      * @return KErrNotFound, if one does not exist, otherwise id of the
       
    96      *         default SIP profile.
       
    97      */
       
    98 	TUint32 DefaultProfileId();
       
    99 
       
   100     /**
       
   101      * Returns SIP profile index on locally cached array based on id.
       
   102      * @param aId Profile id
       
   103      * @return Profile index or KErrNotFound if no matching profile is found.
       
   104      */
       
   105     TInt ProfileIndexByIdL( TUint32 aId );
       
   106 
       
   107     /**
       
   108      * Returns profile id based on index.
       
   109      * @param aIndex Profile index
       
   110      * @return Profile id or KUnknownProfileId if no matching profile is found.
       
   111      */
       
   112     TUint32 ProfileIdByIndex( TUint aIndex );
       
   113     
       
   114 
       
   115     /**
       
   116      * Returns memory section dialog
       
   117      * @return Memory selction dialog reference
       
   118      */
       
   119     CAknMemorySelectionDialogMultiDrive* MemorySelectionDialogLC();
       
   120 
       
   121     
       
   122 public: // constants
       
   123 
       
   124     /**
       
   125      * Default SIP profile.
       
   126      */
       
   127 	static const TInt KVsSipProfileDefault;
       
   128 
       
   129     /**
       
   130      * SIP profile select.
       
   131      */
       
   132 	static const TInt KVsSipProfileSelect;
       
   133 
       
   134     /**
       
   135      * Null selection SIP profile.
       
   136      */
       
   137 	static const TInt KVsSipProfileSelectNone;
       
   138 
       
   139 private:
       
   140 
       
   141     /**
       
   142      * C++ constructor.
       
   143      * @param aHandler Reference to SIP profile manipulator.
       
   144      */
       
   145     CMusSettingsModel( MMusSIPProfileHandler& aHandler );
       
   146     
       
   147     /**
       
   148     * Initialize SIP profile enabler data.
       
   149     */
       
   150     void InitializeProfileEnablerL();
       
   151 
       
   152     void ConstructL();
       
   153 
       
   154 private: // data
       
   155 
       
   156     /**
       
   157      * SIP profile handler.
       
   158      */
       
   159     MMusSIPProfileHandler& iHandler;
       
   160     
       
   161     /**
       
   162      * Operator variant. If SIP profile disabled
       
   163      */
       
   164     TBool iProfileDisabled;
       
   165 
       
   166     };
       
   167 
       
   168 #endif // C_MUSSETTINGSMODEL_H