1 // Copyright (c) 2008-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 // Internal implementation of the SUPL ASN1 Decoder |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 |
|
22 */ |
|
23 #ifndef SUPL_ASN1_DECODER_IMPL_H |
|
24 #define SUPL_ASN1_DECODER_IMPL_H |
|
25 |
|
26 #include <e32std.h> |
|
27 #include "suplasn1decoder.h" |
|
28 |
|
29 // forward declarations |
|
30 class CSuplMessageBase; |
|
31 class ASN1PERDecodeBuffer; |
|
32 class ASN1T_ULP_PDU; |
|
33 class ASN1C_ULP_PDU; |
|
34 |
|
35 /** |
|
36 The class provides an internal implementation of the functionality exposed |
|
37 by the CSuplAsn1Decoder interface. |
|
38 |
|
39 @see CSuplAsn1Decoder |
|
40 @see CSuplMessageBase |
|
41 |
|
42 @internalComponent |
|
43 */ |
|
44 NONSHARABLE_CLASS(CSuplAsn1DecoderImpl) : public CBase |
|
45 { |
|
46 public: |
|
47 IMPORT_C static CSuplAsn1DecoderImpl* NewL(); |
|
48 virtual ~CSuplAsn1DecoderImpl(); |
|
49 |
|
50 public: |
|
51 IMPORT_C CSuplMessageBase* DecodeL(const TPtrC8* aBuf, TInt& aError); |
|
52 |
|
53 private: |
|
54 CSuplAsn1DecoderImpl(); |
|
55 void ConstructL(); |
|
56 |
|
57 TInt ProcessAsn1Error(TInt aError); |
|
58 TInt AdditionalMessageValidation(); |
|
59 private: |
|
60 // Objective Systems compiled object types. |
|
61 // Note that these data members object names do not meet Symbian's coding |
|
62 // standards as they are created using a third party ASN1 compilation tool. |
|
63 |
|
64 // ASN1 Decode Buffer Management |
|
65 ASN1PERDecodeBuffer* iDecodeBuffer; |
|
66 |
|
67 // SUPL message data structure and C++ management class for the data. |
|
68 // These objects are owned during the decode process. Ownership is passed |
|
69 // to a constructed CSuplMessageBase derived wrapper class, which is |
|
70 // returned to the calling function on completion of the decode operation. |
|
71 ASN1T_ULP_PDU* iData; |
|
72 ASN1C_ULP_PDU* iControl; |
|
73 }; |
|
74 |
|
75 #endif //SUPL_ASN1_DECODER_IMPL_H |
|