|
1 // Copyright (c) 2006-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 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef TMTPTYPEINT128_H |
|
23 #define TMTPTYPEINT128_H |
|
24 |
|
25 #include <e32std.h> |
|
26 #include <mtp/mmtptype.h> |
|
27 #include <mtp/mtpdatatypeconstants.h> |
|
28 |
|
29 /** |
|
30 Defines the MTP signed 128-bit integer data type. |
|
31 @publishedPartner |
|
32 @released |
|
33 */ |
|
34 class TMTPTypeInt128 : public MMTPType |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 IMPORT_C TMTPTypeInt128(); |
|
40 IMPORT_C TMTPTypeInt128(const TPtrC8& aData); |
|
41 |
|
42 IMPORT_C void Set(TInt64 aUpperValue, TUint64 aLowerValue); |
|
43 IMPORT_C TUint64 LowerValue() const; |
|
44 IMPORT_C TInt64 UpperValue() const; |
|
45 |
|
46 public: // From MMTPType |
|
47 |
|
48 IMPORT_C TInt FirstReadChunk(TPtrC8& aChunk) const; |
|
49 IMPORT_C TInt NextReadChunk(TPtrC8& aChunk) const; |
|
50 IMPORT_C TInt FirstWriteChunk(TPtr8& aChunk); |
|
51 IMPORT_C TInt NextWriteChunk(TPtr8& aChunk); |
|
52 IMPORT_C TUint64 Size() const; |
|
53 IMPORT_C TUint Type() const; |
|
54 |
|
55 private: |
|
56 |
|
57 /** |
|
58 Least significant 64-bit buffer offset. |
|
59 */ |
|
60 static const TInt KMTPTypeInt128OffsetLS = 0; |
|
61 |
|
62 /** |
|
63 Most significant 64-bit buffer offset. |
|
64 */ |
|
65 static const TInt KMTPTypeInt128OffsetMS = 8; |
|
66 |
|
67 /** |
|
68 The data buffer. |
|
69 */ |
|
70 TBuf8<KMTPTypeINT128Size> iData; |
|
71 }; |
|
72 |
|
73 #endif // TMTPTYPEINT128_H |