|
1 /* |
|
2 * Copyright (c) 2002 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: Definitions for Ber objects |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef WIMBERCONSTS_H |
|
19 #define WIMBERCONSTS_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 // DATA TYPES |
|
24 typedef TUint8 TBerTag; |
|
25 |
|
26 // BER types. |
|
27 const TBerTag KBerEndOfContent = 0x00; // End of contents tag |
|
28 const TBerTag KBerBoolean = 0x01; // Boolean tag |
|
29 const TBerTag KBerInteger = 0x02; // Integer tag |
|
30 const TBerTag KBerBitString = 0x03; // Bit string tag |
|
31 const TBerTag KBerOctetString = 0x04; // Octet string tag |
|
32 const TBerTag KBerNull = 0x05; // NULL tag |
|
33 const TBerTag KBerOid = 0x06; // Object identifier tag |
|
34 const TBerTag KBerNumS = 0x12; // Numeric string |
|
35 const TBerTag KBerPrS = 0x13; // Printable string tag |
|
36 const TBerTag KBerT61S = 0x14; // T61 string tag |
|
37 const TBerTag KBerVideoS = 0x15; // Video string tag |
|
38 const TBerTag KBerIA5S = 0x16; // IA5 string tag |
|
39 const TBerTag KBerUtc = 0x17; // UTC time tag |
|
40 const TBerTag KBerGenTime = 0x18; // Generalized Time tag |
|
41 const TBerTag KBerGraphS = 0x19; // Graphics string tag |
|
42 const TBerTag KBerVisibleS = 0x1A; // Visible string |
|
43 const TBerTag KBerGeneralS = 0x1B; // Generalised string |
|
44 const TBerTag KBerBmpS = 0x1E; // Bmp string |
|
45 const TBerTag KBerSeq = 0x30; // Sequence tag |
|
46 const TBerTag KBerSet = 0x31; // Set tag |
|
47 |
|
48 const TBerTag KBerUnknown = 0xff; // Unknown tag |
|
49 |
|
50 const TBerTag KBerEncodedObject = 0xfe; // Tag for ready-made |
|
51 // BER encoded objects |
|
52 |
|
53 const TBerTag KBerLongLengthBit = 0x80; // Long length bit |
|
54 const TBerTag KBerConstructedBit= 0x20; // Constructed bit |
|
55 const TBerTag KBerConstructed = 0x20; |
|
56 |
|
57 const TBerTag KBerImplicit = 0x80; // Implicit tag |
|
58 const TBerTag KBerExplicit = 0x80; // Explicit tag |
|
59 |
|
60 const TBerTag KBerImplicitConstructed = 0xA0; // Implicit constructed tag |
|
61 const TBerTag KBerExplicitConstructed = 0xA0; // Explicit constructed tag |
|
62 |
|
63 const TBerTag KBerBooleanTrue = 0xFF; // Boolean true value (DER) |
|
64 const TBerTag KBerBooleanFalse = 0x00; // Boolean false value (DER) |
|
65 const TBerTag KBerNullContent = 0x00; // Null objects content |
|
66 |
|
67 const TBerTag KBerBooleanLen = 0x03; // Boolean object length |
|
68 const TBerTag KBerNullLen = 0x02; // Null object length |
|
69 const TBerTag KBerShortLen = 0x02; // Tag + (short) length byte |
|
70 const TBerTag KBerIndefiniteLen = 0x04; // Indefinite length (xx 80 00 00) |
|
71 |
|
72 const TInt KReadBufMax = 256; // Length of buffer used |
|
73 // when reading from files. |
|
74 const TUint KOpenAllLevels = 255; // OpenL(....) function |
|
75 const TInt KOctetWidth = 8; |
|
76 const TInt KObjectIDDot = 1; // object id encoding |
|
77 const TInt KObjectIDFirstFactor = 4; // object id encoding |
|
78 const TInt KObjectIDSecondFactor = 10; // object id encoding |
|
79 |
|
80 const TInt KIntBufSize = 6; // Integer encoding buffer size |
|
81 |
|
82 |
|
83 |
|
84 const TInt KMaxLenBytes = 4; // Max amount of length bytes in BER encoded |
|
85 // object. |
|
86 |
|
87 const TInt KFlushTargetMaxSize = 2048; |
|
88 const TInt KBerMask80 = 0x80; |
|
89 const TInt KBerMask81Negative = -0x81; |
|
90 const TInt KBerMask03 = 0x03; |
|
91 const TInt KBerMask8000 = 0x8000; |
|
92 const TInt KBerMask8001Negative = -0x8001; |
|
93 const TInt KBerMask04 = 0x04; |
|
94 const TInt KBerMask800000 = 0x800000; |
|
95 const TInt KBerMask800001Negative = -0x800001; |
|
96 const TInt KBerMask05 = 0x05; |
|
97 const TInt KBerMask06 = 0x06; |
|
98 const TInt KBerMask8 = 8; |
|
99 |
|
100 |
|
101 #endif |