1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Utils for IOSSProtocolAdaptation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __OSSPROTOCLADAPUTILS_H__ |
|
20 #define __OSSPROTOCLADAPUTILS_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32def.h> |
|
24 #include <e32cmn.h> |
|
25 |
|
26 struct charFormatData |
|
27 { |
|
28 char* data; |
|
29 TInt dataSize;//this also includes '/0'. |
|
30 }; |
|
31 /** |
|
32 * Utils for OSSProtocolAdaptation modules. |
|
33 */ |
|
34 class OssProtocolAdapUtils |
|
35 { |
|
36 public: // new methods |
|
37 |
|
38 /** |
|
39 * utility method to convert from char to unsigned int |
|
40 * @param1 pmSrc: source |
|
41 * @return pointer to unsigned int |
|
42 */ |
|
43 static HBufC16* ConvertCharToTUint16LC( const char *pcSrc); |
|
44 /** |
|
45 * utility method to convert from unsigned int to char |
|
46 * @param1 pmSrc: source |
|
47 * @return structure charFormatData, contains data and size |
|
48 */ |
|
49 static charFormatData ConvertTUint16ToCharLC( const TDesC &aData ); |
|
50 /** |
|
51 * utility method to convert from tdesc8 to char |
|
52 * @param1 aSrc: source |
|
53 * @param aDes: destination |
|
54 */ |
|
55 static void ConvertTDesC8toChar(const TDesC8& aSrc, char* aDes); |
|
56 }; |
|
57 |
|
58 #endif // __OSSPROTOCLADAPUTILS_H__ |
|
59 |
|
60 // End of File |
|