mmsengine/mmssettings/inc/cmmssettings.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CMMSSETTINGS_H__
       
    17 #define __CMMSSETTINGS_H__
       
    18 
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 
       
    23 class CRepository;
       
    24 
       
    25 
       
    26 /**
       
    27 Automatic Download Options.
       
    28 
       
    29 @publishedAll
       
    30 @released
       
    31 */
       
    32 enum TAutomaticDownloadOptions
       
    33  	{
       
    34  	/** Automatic Download Option Off */
       
    35 	EAutomaticDownloadOff = 0,
       
    36  	/** Automatic Download Option On */
       
    37 	EAutomaticDownloadOn,
       
    38 	/** Automatic Download Only When Roaming */
       
    39 	EAutomaticDownloadOnlyWhenRoaming
       
    40 	};
       
    41 
       
    42 
       
    43 /**
       
    44 Creation Mode Options.
       
    45 
       
    46 @publishedAll
       
    47 @released
       
    48 */
       
    49 enum TCreationMode
       
    50  	{
       
    51 	/** Creation Mode Free */
       
    52 	ECreationModeFree = 0,
       
    53 	/** Creation Mode Warning */
       
    54 	ECreationModeWarning,
       
    55 	/** Creation Mode Restricted */
       
    56 	ECreationModeRestricted
       
    57 	};
       
    58 
       
    59 
       
    60 /**
       
    61 Run-time MMS configuration settings.
       
    62 
       
    63 Messaging clients should use an instance of this class to specify
       
    64 and retrieve configuration settings.
       
    65 
       
    66 This class should be used with CMmsAccounts to store and restore settings.
       
    67 
       
    68 @see CMmsAccounts
       
    69 
       
    70 @publishedAll
       
    71 @released
       
    72 */
       
    73 class CMmsSettings : public CBase
       
    74      {
       
    75 public:
       
    76 	IMPORT_C static CMmsSettings* NewL( );
       
    77 	IMPORT_C static CMmsSettings* NewLC( );
       
    78     IMPORT_C ~CMmsSettings( );
       
    79     IMPORT_C void CopyL(const CMmsSettings& aMmsSettings);    
       
    80 
       
    81     IMPORT_C TInt ApplicationID( ) const;
       
    82 	IMPORT_C void SetApplicationID(const TInt aAppID);
       
    83 
       
    84 	IMPORT_C TPtrC Address( ) const;
       
    85    	IMPORT_C void SetAddressL(const TDesC& aAddress);
       
    86 	
       
    87 	IMPORT_C TCreationMode CreationMode( ) const;
       
    88    	IMPORT_C void SetCreationModeL(TCreationMode aCreationMode);
       
    89 
       
    90     IMPORT_C TInt ProxyCount( ) const;
       
    91     IMPORT_C TUid GetProxy(TInt aIndex) const;
       
    92     IMPORT_C void AddProxyL(const TUid aProxy);
       
    93     IMPORT_C void RemoveProxy(TInt aIndex);
       
    94 
       
    95     IMPORT_C TInt NapIdCount( ) const;
       
    96     IMPORT_C TUid GetNapId (TInt aIndex) const;
       
    97     IMPORT_C void AddNapIdL(const TUid aNapId);
       
    98     IMPORT_C void RemoveNapId(TInt aIndex);
       
    99 
       
   100     IMPORT_C TBool DisplayNotification( ) const;
       
   101     IMPORT_C void SetDisplayNotification(TBool aFlag);
       
   102 
       
   103     IMPORT_C TAutomaticDownloadOptions AutomaticDownload( ) const;
       
   104     IMPORT_C void SetAutomaticDownload(TAutomaticDownloadOptions aDownloadOptions);
       
   105 
       
   106     IMPORT_C TBool CreationModeReadOnly( ) const;
       
   107     IMPORT_C void SetCreationModeReadOnly(TBool aFlag);
       
   108 
       
   109     IMPORT_C TInt ValidityPeriod( ) const;
       
   110     IMPORT_C void SetValidityPeriod(const TInt aValidityPeriod);
       
   111 
       
   112     IMPORT_C TInt MaxDownloadSize( ) const;
       
   113     IMPORT_C void SetMaxDownloadSize (const TInt aSize);
       
   114 
       
   115     IMPORT_C TBool Priority( ) const;
       
   116     IMPORT_C void SetPriority (TBool aFlag);
       
   117 
       
   118     IMPORT_C TBool HideNumber( ) const;
       
   119     IMPORT_C void SetHideNumber(TBool aFlag);
       
   120 
       
   121     IMPORT_C TBool ReadReport( ) const;
       
   122     IMPORT_C void SetReadReport(TBool aFlag);
       
   123 
       
   124     IMPORT_C TBool DeliveryReport( ) const;
       
   125     IMPORT_C void SetDeliveryReport(TBool aFlag);
       
   126 
       
   127     IMPORT_C TBool ReplyWithHistory( ) const;
       
   128     IMPORT_C void SetReplyWithHistory (TBool aFlag);
       
   129 
       
   130     IMPORT_C TBool AllowDeliveryNotification( ) const;
       
   131     IMPORT_C void SetAllowDeliveryNotification(TBool aFlag);
       
   132 
       
   133     IMPORT_C TBool FilterAdvertisements( ) const;
       
   134     IMPORT_C void SetFilterAdvertisements(TBool aFlag);
       
   135 
       
   136     IMPORT_C TInt MaxDownloadRetries( ) const;
       
   137     IMPORT_C void SetMaxDownloadRetries(const TInt aRetries);
       
   138 
       
   139     IMPORT_C TInt DownloadRetryInterval( ) const;
       
   140     IMPORT_C void SetDownloadRetryInterval(const TInt aInterval);
       
   141 
       
   142     IMPORT_C TInt MaxSendMsgSize( ) const;
       
   143     IMPORT_C void SetMaxSendMsgSize (const TInt aSize);
       
   144 
       
   145     IMPORT_C TBool FullScreenPreview( ) const;
       
   146     IMPORT_C void SetFullScreenPreview(TBool aFlag);
       
   147 
       
   148     IMPORT_C TInt DeviceContentClass( ) const;
       
   149     IMPORT_C void SetDeviceContentClass(const TInt aClass);
       
   150 
       
   151     IMPORT_C TInt MaxImageHeight( ) const;
       
   152     IMPORT_C void SetMaxImageHeight(const TInt aHeight);
       
   153 
       
   154     IMPORT_C TInt MaxImageWidth( ) const;
       
   155     IMPORT_C void SetMaxImageWidth(const TInt aWidth);   
       
   156     
       
   157 	void RemoveAllProxies();
       
   158 	void RemoveAllNapIds();
       
   159 	
       
   160 	TUint32 MmsSettingsFlags() const;
       
   161 	void SetMmsSettingsFlags(TUint32 aFlags);
       
   162 	    
       
   163 private:
       
   164     CMmsSettings();
       
   165 
       
   166 	enum TMmsSettingsFlags
       
   167 		{
       
   168 		ESmsSettingsNoFlags					= 0x00000000,
       
   169 		ESmsSettingsDisplayNotification		= 0x00000002,
       
   170 		ESmsSettingsCreationModeReadOnly	= 0x00000004,
       
   171 		ESmsSettingsPriority				= 0x00000008,
       
   172 		ESmsSettingsHideNumber				= 0x00000010,
       
   173 		ESmsSettingsReadReport				= 0x00000020,
       
   174 		ESmsSettingsDeliveryReport			= 0x00000040,
       
   175 		ESmsSettingsReplyWithHistory		= 0x00000080,
       
   176 		ESmsSettingsAllowDeliveryNotification	= 0x00000100,
       
   177 		ESmsSettingsFilterAdvertisements	= 0x00000200,
       
   178 		ESmsSettingsFullScreenPreview		= 0x00000400
       
   179 		};
       
   180 
       
   181 private:
       
   182 
       
   183 	TUint32 iMmsSettingsFlags;
       
   184 	TInt iApplicationId;
       
   185 	HBufC* iAddress;
       
   186 	TCreationMode iCreationMode;
       
   187 	RArray<TUid> iProxy;
       
   188 	RArray<TUid> iNapId;
       
   189 	TAutomaticDownloadOptions iAutomaticDownloadOptions;
       
   190 	TInt iValidityPeriod;
       
   191 	TInt iMaxDownloadSize;
       
   192 	TInt iMaxDownloadRetries;
       
   193 	TInt iDownloadRetryInterval;
       
   194 	TInt iMaxSendMsgSize;
       
   195 	TInt iDeviceContentClass;
       
   196 	TInt iMaxImageHeight;
       
   197 	TInt iMaxImageWidth;
       
   198    	};
       
   199    	
       
   200 #endif // __CSMSACCOUNT_H__