24
|
1 |
// Copyright (c) 2000-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 |
// Declares utility classes private to the GSMU dll
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@file
|
|
21 |
@internalComponent
|
|
22 |
*/
|
|
23 |
|
|
24 |
|
|
25 |
#ifndef __GSMUPRIV_H__
|
|
26 |
#define __GSMUPRIV_H__
|
|
27 |
|
|
28 |
#include <charconv.h>
|
|
29 |
#include "Gsmuelem.h"
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
/**
|
|
34 |
* TSmsPacker - packs and unpacks data encoded in an SMS alphabet
|
|
35 |
* @internalComponent
|
|
36 |
*/
|
|
37 |
class TSmsAlphabetPacker
|
|
38 |
{
|
|
39 |
public:
|
|
40 |
// Construction
|
|
41 |
TSmsAlphabetPacker(TSmsDataCodingScheme::TSmsAlphabet aAlphabet,TBool aIsBinary,TInt aStartBit);
|
|
42 |
|
|
43 |
// Packing / unpacking methods
|
|
44 |
TInt PackL(TDes8& aOut,const TDesC8& aIn);
|
|
45 |
TInt UnpackL(const TDesC8& aIn,TDes8& aOut,TInt aNumUDUnits);
|
|
46 |
TInt ConvertAndPackL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TDes8& aOut,const TDesC& aIn,TInt& aConvertedNumUDUnits);
|
|
47 |
TInt UnpackAndConvertL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,const TDesC8& aIn,TDes& aOut,TInt aNumUDUnits);
|
|
48 |
|
|
49 |
TInt PackedOctetsRequiredL(TInt aNumUDUnits) const;
|
|
50 |
TInt NumUDUnitsL(TInt aOctets) const;
|
|
51 |
|
|
52 |
private:
|
|
53 |
// Private helper methods
|
|
54 |
TInt ElementSizeInBitsL() const;
|
|
55 |
|
|
56 |
private:
|
|
57 |
TSmsDataCodingScheme::TSmsAlphabet iAlphabet;
|
|
58 |
TBool iIsBinary;
|
|
59 |
TInt iStartBit;
|
|
60 |
};
|
|
61 |
|
|
62 |
#endif // __GSMUPRIV_H__
|