mmshplugins/mmshsettingsuiplugin/inc/mussettingsmodel.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  MUSSettingsPlugin model class.
    14 * Description:  MUSSettingsPlugin model class.
       
    15 *  Version     : %version: 11 % << Don't touch! Updated by Synergy at check-out.
    15 *
    16 *
    16 */
    17 */
    17 
    18 
    18 
    19 
    19 
    20 
    20 #ifndef  C_MUSSETTINGSMODEL_H
    21 #ifndef  C_MUSSETTINGSMODEL_H
    21 #define  C_MUSSETTINGSMODEL_H
    22 #define  C_MUSSETTINGSMODEL_H
    22 
    23 
    23 #include 	"mussettings.h"
    24 #include <e32base.h>
       
    25 #include <badesca.h>
    24 
    26 
    25 class MMusSIPProfileHandler;
    27 class MMusSIPProfileHandler;
    26 class CMusSIPProfileModel;
    28 class CMusSIPProfileModel;
    27 class MultimediaSharingSettings;
       
    28 
       
    29 class CAknMemorySelectionDialogMultiDrive;
    29 class CAknMemorySelectionDialogMultiDrive;
    30 
    30 
    31 
    31 
    32 /**
    32 /**
    33  *  CMusSettingsModel is the model class of GS application.
    33  *  CMusSettingsModel is the model class of GS application.
    34  *  It provides functions to get and set setting values.
    34  *  It provides functions to get and set setting values.
    35  *
       
    36  *  @since S60 v3.2
       
    37  */
    35  */
    38 class CMusSettingsModel : public CBase
    36 class CMusSettingsModel : public CBase
    39     {
    37     {
    40 public:
    38 public:
    41 
    39 
    50      * Destructor.
    48      * Destructor.
    51      */
    49      */
    52     ~CMusSettingsModel();
    50     ~CMusSettingsModel();
    53 
    51 
    54     /**
    52     /**
    55      * Returns operator variant mode.
       
    56      * @return 0: Standard (MusSettingsKeys::EStandard)
       
    57      *         1: Operator Specific (MusSettingsKeys::EOperatorSpecific)
       
    58      */
       
    59     MusSettingsKeys::TOperatorVariant VSSettingsOperatorVariantL();
       
    60 
       
    61     /**
       
    62      * Returns VS activation mode.
       
    63      * @return 0: Always (MusSettingsKeys::EAlwaysActive)
       
    64      *         1: Automatic (MusSettingsKeys::EActiveInHomeNetworks)
       
    65      *         2: Off (MusSettingsKeys::ENever)
       
    66      */
       
    67     MusSettingsKeys::TActivation VSSettingsActivationL();
       
    68 
       
    69     /**
       
    70      * Returns SIP profile mode.
       
    71      * @return 0: Use default SIP profile.
       
    72      *         1: Use user selected SIP profile.
       
    73      */
       
    74     TInt VSSettingsProfileL();
       
    75 
       
    76     /**
       
    77      * Returns video autorecord mode.
       
    78      * @return 0: on  (MusSettingsKeys::EAutoRecordOn)
       
    79      *		   1: off (MusSettingsKeys::EAutoRecordOff)
       
    80      */
       
    81     MusSettingsKeys::TAutoRecord VSSettingsAutoRecordL();
       
    82 
       
    83     /**
       
    84      * Returns recorded video saving mode.
    53      * Returns recorded video saving mode.
    85      * @return 2: phone memory 
    54      * @return 2: phone memory 
    86      *         4: memory card 
    55      *         4: memory card 
    87      */
    56      */
    88     TInt VSSettingsRecordedVideoSavingL();
    57     TInt VSSettingsRecordedVideoSavingL();
       
    58     
       
    59     /**
       
    60      * operator specific variant
       
    61      * Sets activation item 
       
    62      * @param aActive (enabled/disabled).
       
    63      */
       
    64     void SetActivationItem( TBool aActive );
    89 
    65 
    90     /**
    66     /**
    91      * Returns state of note (on/off). This setting is called "Capability
    67      * operator specific variant
    92      * auditory note" in standard variant and "Alerts" in operator specific
    68      * @return activation item 
    93      * variant.
       
    94      * @return 0: enabled (MusSettingsKeys::EAuditoryNotificationOn)
       
    95      *         1: disabled (MusSettingsKeys::EAuditoryNotificationOff)
       
    96      */
    69      */
    97     MusSettingsKeys::TAuditoryNotification VSSettingsNoteL();
    70     TBool ActivationItem();
    98 
    71     
    99     /**
       
   100      * Sets packet data VS activation mode.
       
   101      * @param aActivation Activation mode.
       
   102      */
       
   103     void SetVSSettingsActivationL(
       
   104     		const MusSettingsKeys::TActivation aActivation );
       
   105 
       
   106     /**
       
   107      * Sets SIP profile mode.
       
   108      * @param aProfile Profile id.
       
   109      */
       
   110     void SetVSSettingsProfileL( const TInt aProfile );
       
   111 
       
   112     /**
       
   113      * Sets video autorecord mode.
       
   114      * @param aAutoRecord save mode of video.
       
   115      */
       
   116     void SetVSSettingsAutoRecordL(
       
   117     		const MusSettingsKeys::TAutoRecord aAutoRecord );
       
   118 
       
   119     /**
       
   120     * Sets location of video saving.
       
   121     * @param aVideoLocation location of video
       
   122     */
       
   123     void SetVSSettingsRecordedVideoSavingL( const TInt aVideoLocation );
       
   124 
       
   125     /**
       
   126      * Sets mode of note ("Capability auditory note" in standard variant and
       
   127      * "Alerts" in operator specific variant).
       
   128      * @param aValue New state for note (enabled/disabled).
       
   129      */
       
   130     void SetVSSettingsNoteL(
       
   131     		const MusSettingsKeys::TAuditoryNotification aValue );
       
   132 
       
   133     /**
    72     /**
   134      * Returns the array containing the profile names.
    73      * Returns the array containing the profile names.
   135      * NOTE! The ownership of the array is transferred to the caller.
    74      * NOTE! The ownership of the array is transferred to the caller.
   136      * @return Array consisting of the names of the SIP profiles.
    75      * @return Array consisting of the names of the SIP profiles.
   137      */
    76      */
   138 	CDesCArray* ListOfProfileNamesL();
    77     CDesCArray* ListOfProfileNamesL();
   139 
    78 
   140     /**
    79     /**
   141      * Gets a SIP profile name by ID.
    80      * Gets a SIP profile name by ID.
   142      * Ownership is transferred to caller.
    81      * Ownership is transferred to caller.
   143      * @return SIP profile name.
    82      * @return SIP profile name.
   144      */
    83      */
   145 	HBufC* ProfileNameL( TInt aId );
    84     HBufC* ProfileNameL( TInt aId );
   146 
    85 
   147     /**
    86     /**
   148      * Gets the index of the default SIP profile.
    87      * Gets the index of the default SIP profile.
   149      * @return KErrNotFound, if one does not exist, otherwise index of the
    88      * @return KErrNotFound, if one does not exist, otherwise index of the
   150      *         default SIP profile.
    89      *         default SIP profile.
   151      */
    90      */
   152 	TInt DefaultProfileIndex();
    91     TInt DefaultProfileIndex();
   153 
    92 
   154     /**
    93     /**
   155      * Gets the id of the default SIP profile.
    94      * Gets the id of the default SIP profile.
   156      * @return KErrNotFound, if one does not exist, otherwise id of the
    95      * @return KErrNotFound, if one does not exist, otherwise id of the
   157      *         default SIP profile.
    96      *         default SIP profile.
   158      */
    97      */
   159 	TUint32 DefaultProfileId();
    98     TUint32 DefaultProfileId();
   160 
    99 
   161     /**
   100     /**
   162      * Returns SIP profile index on locally cached array based on id.
   101      * Returns SIP profile index on locally cached array based on id.
   163      * @param aId Profile id
   102      * @param aId Profile id
   164      * @return Profile index or KErrNotFound if no matching profile is found.
   103      * @return Profile index or KErrNotFound if no matching profile is found.
   177      * Returns memory section dialog
   116      * Returns memory section dialog
   178      * @return Memory selction dialog reference
   117      * @return Memory selction dialog reference
   179      */
   118      */
   180     CAknMemorySelectionDialogMultiDrive* MemorySelectionDialogLC();
   119     CAknMemorySelectionDialogMultiDrive* MemorySelectionDialogLC();
   181 
   120 
       
   121     /**
       
   122     * Initialize SIP profile enabler data.
       
   123     */
       
   124     void InitializeProfileEnablerL();
   182     
   125     
   183 public: // constants
   126 public: // constants
   184 
   127 
   185     /**
   128     /**
   186      * Default SIP profile.
   129      * Default SIP profile.
   187      */
   130      */
   188 	static const TInt KVsSipProfileDefault;
   131     static const TInt KVsSipProfileDefault;
   189 
   132     
   190     /**
   133     /**
   191      * SIP profile select.
   134      * SIP profile select.
   192      */
   135      */
   193 	static const TInt KVsSipProfileSelect;
   136     static const TInt KVsSipProfileSelect;
   194 
   137 
   195     /**
   138     /**
   196      * Null selection SIP profile.
   139      * Null selection SIP profile.
   197      */
   140      */
   198 	static const TInt KVsSipProfileSelectNone;
   141     static const TInt KVsSipProfileSelectNone;
   199 
   142 
   200 private:
   143 private:
   201 
   144 
   202     /**
   145     /**
   203      * C++ constructor.
   146      * C++ constructor.
   204      * @param aHandler Reference to SIP profile manipulator.
   147      * @param aHandler Reference to SIP profile manipulator.
   205      */
   148      */
   206     CMusSettingsModel( MMusSIPProfileHandler& aHandler );
   149     CMusSettingsModel( MMusSIPProfileHandler& aHandler );
   207 
   150     
   208     void ConstructL();
   151     void ConstructL();
   209 
   152 
   210 private: // data
   153 private: // data
   211 
   154 
   212     /**
   155     /**
   213      * SIP profile handler.
   156      * SIP profile handler.
   214      */
   157      */
   215     MMusSIPProfileHandler& iHandler;
   158     MMusSIPProfileHandler& iHandler;
   216 
   159     
   217     /**
   160     /**
   218      * Central repository keys of video sharing.
   161      * Operator variant. If SIP profile disabled
   219      * Own.
       
   220      */
   162      */
   221     MultimediaSharingSettings* iMSSettingsKeys;
   163     TBool iProfileDisabled;
   222 
   164 
   223     };
   165     };
   224 
   166 
   225 #endif // C_MUSSETTINGSMODEL_H
   167 #endif // C_MUSSETTINGSMODEL_H