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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 |
|
20 */ |
|
21 #ifndef RRLP_POROTOCOL_ERROR_H |
|
22 #define RRLP_POROTOCOL_ERROR_H |
|
23 |
|
24 #include "rrlpmessagebase.h" |
|
25 |
|
26 /** TRrlpErrorCode typedef. |
|
27 @internalTechnology |
|
28 */ |
|
29 typedef TUint32 TRrlpErrorCode; |
|
30 |
|
31 /** |
|
32 Enumeration for RRLP Error Code |
|
33 |
|
34 @internalTechnology |
|
35 */ |
|
36 enum _TRrlpErrorCode |
|
37 { |
|
38 ERrlpErrorUnDefined = 0, |
|
39 ERrlpErrorMissingComponet = 1, |
|
40 ERrlpErrorIncorrectData = 2, |
|
41 ERrlpErrorMissingIEorComponentElement = 3, |
|
42 ERrlpErrorMessageTooShort = 4, |
|
43 ERrlpErrorUnknowReferenceNumber = 5 |
|
44 }; |
|
45 |
|
46 |
|
47 /** |
|
48 Encapsulation for outgoing/received RRLP Protocol Error messages. |
|
49 |
|
50 @internalTechnology |
|
51 */ |
|
52 NONSHARABLE_CLASS(CRrlpProtocolError) : public CRrlpMessageBase |
|
53 { |
|
54 public: |
|
55 IMPORT_C static CRrlpProtocolError* NewL(TBool aIsOutgoing); |
|
56 |
|
57 protected: |
|
58 CRrlpProtocolError(TBool aIsOutgoing); |
|
59 |
|
60 public: |
|
61 virtual ~CRrlpProtocolError(); |
|
62 |
|
63 public: |
|
64 |
|
65 /** Populates outgoing error code according to aErrorCode (for outgoing messages) */ |
|
66 IMPORT_C TInt SetProtocolError(const TRrlpErrorCode& aErrorCode); |
|
67 |
|
68 /** Populates aErrorCode with the received error code (for received messages) */ |
|
69 IMPORT_C TInt GetProtocolError(TRrlpErrorCode& aErrorCode); |
|
70 |
|
71 protected: |
|
72 |
|
73 /** set/get extended reference fields */ |
|
74 TInt SetExtendedReference(const TRrlpReference& aRrlpRef); |
|
75 TInt GetExtendedReference(TRrlpReference& aRrlpRef); |
|
76 |
|
77 private: |
|
78 /** second stage constructor */ |
|
79 void ConstructL(); |
|
80 |
|
81 /** Prohibit copy constructor */ |
|
82 CRrlpProtocolError(const CRrlpProtocolError&); |
|
83 |
|
84 /** Prohibit assigment operator */ |
|
85 CRrlpProtocolError& operator= (const CRrlpProtocolError&); |
|
86 }; |
|
87 |
|
88 #endif // RRLP_POROTOCOL_ERROR_H |
|
89 |
|