|
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: Represents one detailed error result |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CCAPresenceError.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CCAPresenceError::CCAPresenceError |
|
27 // C++ default constructor can NOT contain any code, that |
|
28 // might leave. |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CCAPresenceError::CCAPresenceError( TInt aErrorCode ) |
|
32 : iErrorCode( aErrorCode ) |
|
33 { |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CCAPresenceError::ConstructL |
|
38 // Symbian 2nd phase constructor can leave. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 void CCAPresenceError::ConstructL( const TDesC& aUserId ) |
|
42 { |
|
43 iUserId = aUserId.AllocL(); |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CCAPresenceError::NewL |
|
48 // Two-phased constructor. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CCAPresenceError* CCAPresenceError::NewL( TInt aErrorCode, const TDesC& aUserId ) |
|
52 { |
|
53 CCAPresenceError* self = NewLC( aErrorCode, aUserId ); |
|
54 CleanupStack::Pop( self ); |
|
55 |
|
56 return self; |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CCAPresenceError::NewL |
|
61 // Two-phased constructor. |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 CCAPresenceError* CCAPresenceError::NewLC( TInt aErrorCode, const TDesC& aUserId ) |
|
65 { |
|
66 CCAPresenceError* self = new( ELeave ) CCAPresenceError( aErrorCode ); |
|
67 |
|
68 CleanupStack::PushL( self ); |
|
69 self->ConstructL( aUserId ); |
|
70 |
|
71 return self; |
|
72 } |
|
73 |
|
74 // Destructor |
|
75 CCAPresenceError::~CCAPresenceError() |
|
76 { |
|
77 delete iUserId; |
|
78 } |
|
79 |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CCAPresenceError::ErrorCode |
|
83 // (other items were commented in a header). |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 TInt CCAPresenceError::ErrorCode() const |
|
87 { |
|
88 return iErrorCode; |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CCAPresenceError::UserId |
|
93 // (other items were commented in a header). |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 const TDesC& CCAPresenceError::UserId() const |
|
97 { |
|
98 return *iUserId; |
|
99 } |
|
100 |
|
101 // End of File |