|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Container for detailed errors |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCAPRESENCEERRORS_H |
|
21 #define CCAPRESENCEERRORS_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "MCAPresenceErrors.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CCAPresenceError; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Represents error result of operation |
|
34 * |
|
35 * @lib CAPresence.lib |
|
36 * @since 2.1 |
|
37 */ |
|
38 class CCAPresenceErrors : public CBase, public MCAPresenceErrors |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CCAPresenceErrors* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CCAPresenceErrors(); |
|
51 |
|
52 public: // from MCAPresenceErrors |
|
53 |
|
54 /** |
|
55 * Sets error code |
|
56 * @since 2.1 |
|
57 * @param aError Error code |
|
58 */ |
|
59 void SetError( TInt aError ); |
|
60 |
|
61 /** |
|
62 * Returns error code |
|
63 * @since 2.1 |
|
64 * @return Interger that is error code |
|
65 */ |
|
66 TInt Error() const; |
|
67 |
|
68 /** |
|
69 * Adds detailed presence error |
|
70 * @since 2.1 |
|
71 * @param aError Presence error instance |
|
72 */ |
|
73 void AddDetailedErrorL( CCAPresenceError* aError ); |
|
74 |
|
75 /** |
|
76 * Removes detailed error |
|
77 * @since 2.1 |
|
78 * @param aError Presence error that is removed |
|
79 */ |
|
80 void RemoveDetailedError( CCAPresenceError* aError ); |
|
81 |
|
82 /** |
|
83 * Resets error container |
|
84 * @since 2.1 |
|
85 */ |
|
86 void Reset(); |
|
87 |
|
88 /** |
|
89 * Returns array of presence errors |
|
90 * @since 2.1 |
|
91 * @return Array of detailed presence errors |
|
92 */ |
|
93 const RPointerArray<MCAPresenceError>& DetailedErrors() const; |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * C++ default constructor. |
|
99 */ |
|
100 CCAPresenceErrors(); |
|
101 |
|
102 /** |
|
103 * By default Symbian 2nd phase constructor is private. |
|
104 */ |
|
105 |
|
106 private: // Data |
|
107 |
|
108 // Array of errors |
|
109 RPointerArray<MCAPresenceError> iErrors; |
|
110 TInt iMainError; |
|
111 }; |
|
112 |
|
113 #endif // CCAPRESENCEERRORS_H |
|
114 |
|
115 // End of File |