smsprotocols/smsstack/smsu/src/smsuset.cpp
changeset 0 3553901f7fa8
child 19 630d2f34d719
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1999-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 // Contains the implementation of the TSmsSettings class.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20 */
       
    21 
       
    22 #include "smsuset.h"
       
    23 
       
    24 #include <s32strm.h>
       
    25 
       
    26 #include "smsstacklog.h"
       
    27 
       
    28 /**
       
    29  *  Constructor.
       
    30  *  
       
    31  *  Initialises the settings with default values.
       
    32  *  
       
    33  *  @capability None
       
    34  */
       
    35 EXPORT_C TSmsSettings::TSmsSettings():
       
    36     iTimeoutMicroSeconds32(KDefaultTimeoutMicroSeconds32),
       
    37     iSendTryLimit(KDefaultSendTryLimit),
       
    38     iFlags(ESmsFlagDeletePDUsFromPhoneStores),
       
    39     iReassemblyLifetime(KDefaultReassemblyLifetime), //  one day
       
    40     iKSegmentationLifetimeMultiplier(KDefaultKSegmentationLifetimeMultiplier),
       
    41     iModemInitializationTimeoutMicroSeconds32(KDefaultModemInitializationTimeoutMicroSeconds32),
       
    42     iSendTryTimeoutMicroSeconds32(KDefaultSendTryTimeoutMicroSeconds32), // 60 seconds
       
    43     iBootTimerTimeout32(KDefaultBootTimerMicroSeconds32)
       
    44     {
       
    45     }
       
    46 
       
    47 /**
       
    48  *  Internalises the object.
       
    49  *  
       
    50  *  Sets the SMS sttings from the stream store.
       
    51  *  
       
    52  *  @param aStream Stream to read from
       
    53  *  @capability None
       
    54  */
       
    55 EXPORT_C void TSmsSettings::InternalizeL(RReadStream& aStream)
       
    56     {
       
    57     // Ignore in code coverage - not used within the SMS stack.
       
    58     BULLSEYE_OFF
       
    59     iTimeoutMicroSeconds32=aStream.ReadInt32L();
       
    60     iSendTryLimit=aStream.ReadInt32L();
       
    61     iFlags=aStream.ReadUint32L();
       
    62     iReassemblyLifetime=aStream.ReadUint32L();
       
    63     iKSegmentationLifetimeMultiplier=aStream.ReadUint32L();
       
    64     iModemInitializationTimeoutMicroSeconds32=aStream.ReadInt32L();
       
    65     BULLSEYE_RESTORE
       
    66     }
       
    67 
       
    68 /**
       
    69  *  Externalises the object.
       
    70  *  
       
    71  *  Gets the SMS sttings from the stream store.
       
    72  *  
       
    73  *  @param aStream Stream to write to
       
    74  *  @capability None
       
    75  */
       
    76 EXPORT_C void TSmsSettings::ExternalizeL(RWriteStream& aStream) const
       
    77     {
       
    78     // Ignore in code coverage - not used within the SMS stack.
       
    79     BULLSEYE_OFF
       
    80     aStream.WriteInt32L(iTimeoutMicroSeconds32.Int());
       
    81     aStream.WriteInt32L(iSendTryLimit);
       
    82     aStream.WriteUint32L(iFlags);
       
    83     aStream.WriteUint32L(iReassemblyLifetime.Int());
       
    84     aStream.WriteUint32L(iKSegmentationLifetimeMultiplier);
       
    85     aStream.WriteInt32L(iModemInitializationTimeoutMicroSeconds32.Int());
       
    86     BULLSEYE_RESTORE
       
    87     }