|
1 /* |
|
2 * Copyright (c) 2006 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: View class for private chat lists |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCAINVITATIONVIEW_H |
|
21 #define CCAINVITATIONVIEW_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CCAView.h" |
|
25 #include "chatdefinitions.h" |
|
26 #include "MCAInvitationObserverPC.h" |
|
27 #include "MCATabObserver.h" |
|
28 #include "MCARecipientObserver.h" |
|
29 |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CCAInvitationContainer; |
|
33 class CCABlockingUI; |
|
34 class MCAInvitationPC; |
|
35 class CCAAppUi; |
|
36 class CEikMenuPane; |
|
37 class CAknsBasicBackgroundControlContext; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * View class for private chat list |
|
43 * |
|
44 * @lib chat.app |
|
45 * @since 1.2 |
|
46 */ |
|
47 class CCAInvitationView : public CCAView, |
|
48 public MCAInvitationObserverPC, |
|
49 public MCATabObserver, |
|
50 public MCARecipientObserver |
|
51 { |
|
52 public: // Constructors and destructor |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CCAInvitationView(); |
|
58 |
|
59 /** |
|
60 * Symbian OS default constructor. |
|
61 * @param aAvkonViewResourceId Id for resource used to |
|
62 * construct this view |
|
63 * @param aViewId View id |
|
64 */ |
|
65 void ConstructL( TInt aAvkonViewResourceId, TUid aViewId ); |
|
66 |
|
67 /** |
|
68 * C++ default constructor. |
|
69 */ |
|
70 CCAInvitationView(); |
|
71 |
|
72 |
|
73 private: // From CAknView |
|
74 |
|
75 /** |
|
76 * From CAknView Handles command events. Gets called by framework |
|
77 * @param aCommand Command that was received |
|
78 */ |
|
79 void HandleCommandL( TInt aCommand ); |
|
80 |
|
81 /** |
|
82 * From CAknView, Gets called from framework when activating this view |
|
83 * @param aPrevViewId Previous view id |
|
84 * @param aCustomMessageId Custom message's id |
|
85 * @param aCustomMessage Custom message |
|
86 */ |
|
87 void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, |
|
88 const TDesC8& aCustomMessage ); |
|
89 |
|
90 /** |
|
91 * From CAknView, Gets called from framework when deactivating this view |
|
92 */ |
|
93 void DoDeactivate(); |
|
94 |
|
95 /** |
|
96 *Preforms the actual switching between tabs |
|
97 * @See MCATabObserver |
|
98 */ |
|
99 void SwitchTabL( const TDesC& aWvId, const TInt aTabIndex ); |
|
100 |
|
101 /** |
|
102 * From MCARecipientObserver |
|
103 * Shows customized menu |
|
104 */ |
|
105 void ShowPopUpMenuL(); |
|
106 |
|
107 /** |
|
108 * From MCARecipientObserver |
|
109 * Shows recipient list |
|
110 * @param aResourceId Resource id for pop up list |
|
111 * @return Positive value if Oked |
|
112 */ |
|
113 TInt ShowRecipientsListL( TInt aResourceId ); |
|
114 |
|
115 /** |
|
116 * Dynamically initialises menu pane |
|
117 * @see MEikMenuObserver |
|
118 */ |
|
119 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
120 |
|
121 private: // From MCAInvitationObserverPC |
|
122 |
|
123 /** |
|
124 *@see MCAInvitationObserverPC |
|
125 */ |
|
126 virtual void HandleInvitationEventL( TEnumsPC::TInviteType aInviteType, TInt aIndex ); |
|
127 |
|
128 /** |
|
129 * @see MCAInvitationObserverPC |
|
130 */ |
|
131 virtual void HandleInvitationResponse( TBool /*aAcceptance*/, |
|
132 const TDesC& /*aUserId*/, |
|
133 const TDesC& /*aGroupName*/, |
|
134 const TDesC& /*aResponse*/ ); |
|
135 |
|
136 |
|
137 private: // Data |
|
138 |
|
139 //Owns |
|
140 CCAInvitationContainer* iContainer; |
|
141 |
|
142 // Buffer for last known id |
|
143 TBuf<KMaxWVIDLength> iLastKnownId; |
|
144 TBool iIsLastKnownIdInvitation; |
|
145 |
|
146 // Pointer to callback |
|
147 CAsyncCallBack* iAsyncCallBack; |
|
148 //Pop-up menu for context sensitive options. Owns |
|
149 CEikMenuBar* iContextMenu; |
|
150 |
|
151 CCABlockingUI* iBlockingUI; |
|
152 |
|
153 MCAInvitationPC* iInvitationPC; |
|
154 |
|
155 CCAAppUi* iAppUi; |
|
156 |
|
157 // Owns. Sender identification (wvid) |
|
158 HBufC* iIdentification; |
|
159 |
|
160 //InvitationIndex |
|
161 TInt iInvitationIndex; |
|
162 |
|
163 //Does not Own |
|
164 HBufC* iRejectReason; |
|
165 |
|
166 HBufC* iScreenName; |
|
167 |
|
168 // Context menu flag |
|
169 TBool iContextFlag; |
|
170 |
|
171 TBool iChatJoinRejectFlag; |
|
172 |
|
173 // Skin background control context |
|
174 CAknsBasicBackgroundControlContext* iBgContext; |
|
175 |
|
176 TInt iTabId; |
|
177 //doesnt own |
|
178 CCAStatusPaneHandler* iTitlePane; |
|
179 |
|
180 }; |
|
181 |
|
182 #endif // CCAPRIVATECHATLISTVIEW_H |
|
183 |
|
184 // End of File |