|
1 /* |
|
2 * Copyright (c) 2007 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: class to hold the events from plugins |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // SYSTEM INCLUDE FILES |
|
20 #include <ccsclientconversation.h> |
|
21 |
|
22 // USER INCLUDE FILES |
|
23 #include "ccsdebug.h" |
|
24 #include "ccsconversationchangeobserver.h" |
|
25 // ============================== MEMBER FUNCTIONS ============================ |
|
26 |
|
27 // ---------------------------------------------------------------------------- |
|
28 // CCsConversationChangeObserver::CCsConversationChangeObserver |
|
29 // Default constructor |
|
30 // ---------------------------------------------------------------------------- |
|
31 CCsConversationChangeObserver::CCsConversationChangeObserver() |
|
32 { |
|
33 } |
|
34 |
|
35 // ---------------------------------------------------------------------------- |
|
36 // CCsConversationChangeObserver::ConstructL |
|
37 // Two phase construction |
|
38 // ---------------------------------------------------------------------------- |
|
39 void CCsConversationChangeObserver::ConstructL() |
|
40 { |
|
41 iClientConversation = NULL; |
|
42 iObserver = NULL; |
|
43 } |
|
44 |
|
45 // ---------------------------------------------------------------------------- |
|
46 // CCsConversationChangeObserver::NewL |
|
47 // Two Phase constructor |
|
48 // ---------------------------------------------------------------------------- |
|
49 CCsConversationChangeObserver* CCsConversationChangeObserver::NewL() |
|
50 { |
|
51 CCsConversationChangeObserver* self = new (ELeave) CCsConversationChangeObserver(); |
|
52 CleanupStack::PushL(self); |
|
53 self->ConstructL(); |
|
54 CleanupStack::Pop(self); |
|
55 return self; |
|
56 } |
|
57 |
|
58 // ---------------------------------------------------------------------------- |
|
59 // CCsConversationChangeObserver::~CCsConversationChangeObserver |
|
60 // Destructor |
|
61 // ---------------------------------------------------------------------------- |
|
62 CCsConversationChangeObserver::~CCsConversationChangeObserver() |
|
63 { |
|
64 // delete the iClientConversation if its allocated |
|
65 if(iClientConversation) |
|
66 { |
|
67 delete iClientConversation; |
|
68 iClientConversation = NULL; |
|
69 } |
|
70 iObserver = NULL; |
|
71 } |
|
72 |
|
73 // ---------------------------------------------------------------------------- |
|
74 // CCsConversationChangeObserver::ClientConversation |
|
75 // CCsClientConversation returns the iClientConversation |
|
76 // ---------------------------------------------------------------------------- |
|
77 CCsClientConversation* CCsConversationChangeObserver::ClientConversation() const |
|
78 { |
|
79 return iClientConversation; |
|
80 } |
|
81 |
|
82 // ---------------------------------------------------------------------------- |
|
83 // CCsConversationChangeObserver::SetClientConversationL |
|
84 // set ClientConversation in the object |
|
85 // ---------------------------------------------------------------------------- |
|
86 void CCsConversationChangeObserver::SetClientConversationL( |
|
87 const CCsClientConversation& aConversation) |
|
88 { |
|
89 // delete the iClientConversation if its allocated |
|
90 if(iClientConversation) |
|
91 { |
|
92 delete iClientConversation; |
|
93 iClientConversation = NULL; |
|
94 } |
|
95 // aConversation must exist |
|
96 iClientConversation = aConversation.CloneL(); |
|
97 } |
|
98 |
|
99 // ---------------------------------------------------------------------------- |
|
100 // CCsConversationChangeObserver::ConversationChangeObserver |
|
101 // MCsConversationChangeObserver returns the iObserver |
|
102 // ---------------------------------------------------------------------------- |
|
103 MCsConversationChangeObserver* CCsConversationChangeObserver::ConversationChangeObserver() const |
|
104 { |
|
105 return iObserver; |
|
106 } |
|
107 |
|
108 // ---------------------------------------------------------------------------- |
|
109 // CCsConversationChangeObserver::SetClientConversationL |
|
110 // set ClientConversation in the object |
|
111 // ---------------------------------------------------------------------------- |
|
112 void CCsConversationChangeObserver::SetConversationChangeObserverL( |
|
113 MCsConversationChangeObserver* aObserver) |
|
114 { |
|
115 iObserver = aObserver; |
|
116 } |
|
117 |
|
118 //EOF |