24
|
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 |
//
|
|
15 |
|
|
16 |
#include "gsmuset.h"
|
|
17 |
#include "smsstacklog.h"
|
|
18 |
|
|
19 |
|
|
20 |
/**
|
|
21 |
* Constructor - initialises iAlphabet and iFlags
|
|
22 |
*
|
|
23 |
* @capability None
|
|
24 |
*/
|
|
25 |
EXPORT_C TSmsUserDataSettings::TSmsUserDataSettings():
|
|
26 |
iAlphabet(TSmsDataCodingScheme::ESmsAlphabet7Bit),
|
|
27 |
iFlags(0)
|
|
28 |
{
|
|
29 |
// NOP
|
|
30 |
} // TSmsDataCodingScheme::ESmsAlphabet7Bit
|
|
31 |
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Tests if User Data is concatenated using a 16 bit reference.
|
|
35 |
*
|
|
36 |
* @param aIs16Bit Set to true if concatenated using a 16 bit reference
|
|
37 |
* @return True if concatenated set as on
|
|
38 |
* @capability None
|
|
39 |
*/
|
|
40 |
EXPORT_C TBool TSmsUserDataSettings::TextConcatenated(TBool* aIs16Bit) const
|
|
41 |
{
|
|
42 |
LOGGSMU1("TSmsUserDataSettings::TextConcatenated()");
|
|
43 |
|
|
44 |
if (aIs16Bit!=NULL)
|
|
45 |
*aIs16Bit=iFlags&ESmsFlagConcatenatedUsing16BitReference;
|
|
46 |
return iFlags&ESmsFlagConcatenated;
|
|
47 |
} // TSmsUserDataSettings::TextConcatenated
|
|
48 |
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Sets concatenation on/off.
|
|
52 |
*
|
|
53 |
* @param aConcatenated True to set concatenation on
|
|
54 |
* @param aIs16Bit Set to true to set 16 bit concatenation reference (default
|
|
55 |
* 8 bit)
|
|
56 |
* @capability None
|
|
57 |
*/
|
|
58 |
EXPORT_C void TSmsUserDataSettings::SetTextConcatenated(TBool aConcatenated,TBool aIs16Bit)
|
|
59 |
{
|
|
60 |
LOGGSMU1("TSmsUserDataSettings::SetTextConcatenated()");
|
|
61 |
|
|
62 |
iFlags=aIs16Bit? iFlags|ESmsFlagConcatenatedUsing16BitReference: iFlags&(~ESmsFlagConcatenatedUsing16BitReference);
|
|
63 |
iFlags=aConcatenated? iFlags|ESmsFlagConcatenated: iFlags&(~ESmsFlagConcatenated);
|
|
64 |
} // TSmsUserDataSettings::SetTextConcatenated
|
|
65 |
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Internalises the object.
|
|
69 |
*
|
|
70 |
* @param aStream Stream to read from
|
|
71 |
* @capability None
|
|
72 |
*/
|
|
73 |
EXPORT_C void TSmsUserDataSettings::InternalizeL(RReadStream& aStream)
|
|
74 |
{
|
|
75 |
iAlphabet=(TSmsDataCodingScheme::TSmsAlphabet) aStream.ReadUint8L();
|
|
76 |
iFlags=aStream.ReadUint32L();
|
|
77 |
} // TSmsUserDataSettings::InternalizeL
|
|
78 |
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Externalises the object.
|
|
82 |
*
|
|
83 |
* @param aStream Stream to write to
|
|
84 |
* @capability None
|
|
85 |
*/
|
|
86 |
EXPORT_C void TSmsUserDataSettings::ExternalizeL(RWriteStream& aStream) const
|
|
87 |
{
|
|
88 |
aStream.WriteUint8L((TUint8) iAlphabet);
|
|
89 |
aStream.WriteUint32L(iFlags);
|
|
90 |
} // TSmsUserDataSettings::ExternalizeL
|