|
1 // Copyright (c) 2004-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 #ifndef __CSENDASSESSION_H__ |
|
17 #define __CSENDASSESSION_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <msvapi.h> |
|
21 #include <tsendasclientpanic.h> |
|
22 #include <csendasmessagetypes.h> |
|
23 #include <tsendasmessagetypefilter.h> |
|
24 |
|
25 // forward declarations |
|
26 class CSendAsServer; |
|
27 class CSendAsMessage; |
|
28 class CSendAsMtmManager; |
|
29 class CSendAsAccounts; |
|
30 class CSendAsActiveContainer; |
|
31 |
|
32 /** |
|
33 Server-side session object representing a client-side session. |
|
34 |
|
35 SendAs messages are represented as subsessions, one per message. |
|
36 Subsessions are stored in an object container index. |
|
37 |
|
38 @internalComponent |
|
39 @released |
|
40 */ |
|
41 class CSendAsSession : public CSession2 |
|
42 { |
|
43 public: |
|
44 static CSendAsSession* NewL(const TVersion& aVersion, CSendAsServer& aServer); |
|
45 virtual ~CSendAsSession(); |
|
46 |
|
47 CMsvSession& GetMsvSessionL(); |
|
48 CSendAsActiveContainer& ActiveContainer(); |
|
49 void PanicClient(const RMessage2& aMessage, TSendAsClientPanic aPanic) const; |
|
50 |
|
51 CBaseMtm* GetClientMtmL(TUid aMtmUid); |
|
52 const TUid& NotifierUid() const; |
|
53 const TUid& EditUtilsPluginUid() const; |
|
54 // |
|
55 void HandleMtmChange(); |
|
56 private: |
|
57 CSendAsSession(CSendAsServer& aServer); |
|
58 void ConstructL(); |
|
59 |
|
60 void RemoveMessage(TUint aHandle); |
|
61 CSendAsMessage* MessageFromHandle(TUint aHandle); |
|
62 |
|
63 // IPC servicing methods |
|
64 TBool DoServiceL(const RMessage2& aMessage); |
|
65 void CreateSubsessionL(const RMessage2& aMessage); |
|
66 void DoSetMessageTypeFilterL(const RMessage2& aMessage); |
|
67 void DoClearMessageTypeFilterL(); |
|
68 void DoGetMessageTypeListLengthL(const RMessage2& aMessage); |
|
69 void DoGetMessageTypeListL(const RMessage2& aMessage); |
|
70 void DoGetAccountListLengthL(const RMessage2& aMessage); |
|
71 void DoGetAccountListL(const RMessage2& aMessage); |
|
72 |
|
73 // |
|
74 void AddTypeFilterL(const TSendAsMessageTypeFilter& aFilter); |
|
75 void ResetTypeFilterL(); |
|
76 |
|
77 // from CSession2 |
|
78 virtual void ServiceL(const RMessage2& aMessage); |
|
79 virtual void Disconnect(const RMessage2& aMessage); |
|
80 private: |
|
81 TInt iMessageCount; // total num of messages created |
|
82 |
|
83 // session object tracking |
|
84 CSendAsServer& iServer; |
|
85 CObjectCon* iContainer; // object container for this session |
|
86 CObjectIx* iMessages; // object index storing CSendAsMessage's for this session |
|
87 |
|
88 // session data |
|
89 CSendAsMessageTypes* iAvailableMessageTypes; |
|
90 CMsvEntry* iMsvEntry; |
|
91 CSendAsAccounts* iSendAsAccounts; |
|
92 }; |
|
93 |
|
94 #endif // __CSENDASSESSION_H__ |