1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/smsuset.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,141 @@
1.4 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// contains header file of the SMS settings.
1.18 +//
1.19 +//
1.20 +
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 +*/
1.26 +
1.27 +
1.28 +#if !defined (__SMSUSET_H__)
1.29 +#define __SMSUSET_H__
1.30 +
1.31 +#if !defined (__E32STD_H__)
1.32 +#include "e32std.h"
1.33 +#endif
1.34 +
1.35 +
1.36 +class RReadStream;
1.37 +class RWriteStream;
1.38 +
1.39 +
1.40 +/**
1.41 + * SMS settings.
1.42 + *
1.43 + * SMSPROT uses an instance of TSmsSettings to configure the sms stack timeouts.
1.44 + *
1.45 + * The SMSPROT calls TSmsSettings' default constructor during initialisation.
1.46 + * It then parses smswap.sms.esk for customised settings and updates its instance of
1.47 + * TSmsSettings accordingly.
1.48 + *
1.49 + * Customised settings in smswap.sms.esk should comply with the following syntax:
1.50 + *
1.51 + * [customTimeoutSettings]
1.52 + * sendTryTimeout= value
1.53 + * bootTimerTimeout = value
1.54 + *
1.55 + * where the identifier 'value' is to be substituted with an integer value.
1.56 + * Integer values less than zero will cause the stack to leave.
1.57 + *
1.58 + * Only parameters that need to be customised are required in smswap.sms.esk
1.59 + *
1.60 + * @publishedAll
1.61 + * @released
1.62 + */
1.63 +class TSmsSettings
1.64 + {
1.65 +public:
1.66 + IMPORT_C TSmsSettings();
1.67 +
1.68 + inline const TTimeIntervalMicroSeconds32& Timeout() const;
1.69 + inline void SetTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
1.70 + inline TInt SendTryLimit() const;
1.71 + inline void SetSendTryLimit(TInt aLimit);
1.72 + inline TBool DeletePDUsFromSIM() const;
1.73 + inline void SetDeletePDUsFromSIM(TBool aDelete);
1.74 + inline TBool DeletePDUsFromPhoneStores() const;
1.75 + inline void SetDeletePDUsFromPhoneStores(TBool aDelete);
1.76 + inline TBool DeletePDUsFromCombinedStores() const;
1.77 + inline void SetDeletePDUsFromCombinedStores(TBool aDelete);
1.78 + inline const TTimeIntervalMinutes& ReassemblyLifetime() const;
1.79 + inline void SetReassemblyLifetime(const TTimeIntervalMinutes& aReassemblyLifetime);
1.80 + inline TInt KSegmentationLifetimeMultiplier() const;
1.81 + inline void SetKSegmentationLifetimeMultiplier(TInt aKSegmentationLifetimeMultiplier);
1.82 + inline const TTimeIntervalMicroSeconds32& ModemInitializationTimeout() const;
1.83 + inline void SetModemInitializationTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
1.84 + inline const TTimeIntervalMicroSeconds32& SendTryTimeout() const;
1.85 + inline void SetSendTryTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
1.86 + inline const TTimeIntervalMicroSeconds32& BootTimerTimeout();
1.87 + inline void SetBootTimerTimeout(const TTimeIntervalMicroSeconds32& aTimeout);
1.88 +
1.89 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.90 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.91 +
1.92 +private:
1.93 + enum
1.94 + {
1.95 + KDefaultTimeoutMicroSeconds32=60000000 ///<60 sec
1.96 + };
1.97 + enum
1.98 + {
1.99 + KDefaultSendTryLimit=4
1.100 + };
1.101 + enum
1.102 + {
1.103 + KDefaultReassemblyLifetime=2*1440 ///< two days
1.104 + };
1.105 + enum
1.106 + {
1.107 + KDefaultKSegmentationLifetimeMultiplier=1200 ///< 1.2
1.108 + };
1.109 + enum
1.110 + {
1.111 + KDefaultModemInitializationTimeoutMicroSeconds32=30000000 ///<30sec
1.112 + };
1.113 + enum
1.114 + {
1.115 + KDefaultSendTryTimeoutMicroSeconds32=60000000 ///< 60sec
1.116 + };
1.117 + enum
1.118 + {
1.119 + KDefaultBootTimerMicroSeconds32=60000000 // 60sec
1.120 + };
1.121 + enum TSmsSettingsFlags
1.122 + {
1.123 + ESmsFlagDeletePDUsFromSIM=0x01,
1.124 + ESmsFlagDeletePDUsFromPhoneStores=0x02,
1.125 + ESmsFlagDeletePDUsFromCombinedStores=0x04
1.126 + };
1.127 +private:
1.128 + TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; ///<TimeOut period in microseconds for sending a PDU
1.129 + /**
1.130 + * Number of attempts for sending a PDU.
1.131 + * @deprecated 7.0
1.132 + */
1.133 + TInt iSendTryLimit;
1.134 + TInt iFlags; ///<Contains TSmsSettingsFlags
1.135 + TTimeIntervalMinutes iReassemblyLifetime;///< Maximum time PDUs making a concatenated message stay in the reassembly store before they have all arrived
1.136 + TInt iKSegmentationLifetimeMultiplier; ///< Validity period is multiplied by this fraction, 1000=1:1
1.137 + TTimeIntervalMicroSeconds32 iModemInitializationTimeoutMicroSeconds32;///<TimeOut period in microseconds for initialising the modem
1.138 + TTimeIntervalMicroSeconds32 iSendTryTimeoutMicroSeconds32;///< TimeOut period in microseconds for the send operation
1.139 + TTimeIntervalMicroSeconds32 iBootTimerTimeout32; // TimeOut period in microseconds for the boot timer.
1.140 + };
1.141 +
1.142 +#include "smsuset.inl"
1.143 +
1.144 +#endif // !defined __SMSUSET_H__