|
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 __CSENDASMTMMANAGER_H__ |
|
17 #define __CSENDASMTMMANAGER_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <tsendasmessagetypefilter.h> |
|
21 |
|
22 // forward declarations |
|
23 class CBaseMtm; |
|
24 class CMsvSession; |
|
25 class CClientMtmRegistry; |
|
26 class CSendAsServer; |
|
27 class CSendAsMessageTypes; |
|
28 |
|
29 /** |
|
30 This class implements most of the MTM instance management for the SendAs server |
|
31 sessions and subsessions. |
|
32 |
|
33 The SendAs server maintains a single instance of this class, while each session |
|
34 maintains its own array of available MTMs. The SendAs server also owns a |
|
35 CMsvSession object and inherits from MMsvSessionObserver. When notified of a message |
|
36 server event affecting MTM availability, the sendas server updates the MTM manager |
|
37 and each open sendas session of the change. |
|
38 |
|
39 CSendAsSession uses this class to provide a default list of MTM's available for |
|
40 sendas operations. Sessions then update their own available list based on subsequent |
|
41 RSendAs filter operations. |
|
42 |
|
43 CSendAsMessage uses this class to obtain instances of MTMs. |
|
44 |
|
45 @internalComponent |
|
46 @released |
|
47 */ |
|
48 class CSendAsMtmManager : public CBase |
|
49 { |
|
50 public: |
|
51 static CSendAsMtmManager* NewL(CSendAsServer& aServer); |
|
52 virtual ~CSendAsMtmManager(); |
|
53 // |
|
54 CBaseMtm* GetClientMtmL(TUid aMtmUid); |
|
55 CBaseMtm* FindStoredMtmL(TUid aMtmUid); |
|
56 RArray<TUid>& GetMtmUidArray(); |
|
57 CClientMtmRegistry* GetClientMtmRegistry(); |
|
58 void RefreshMtmUidArrayL(); |
|
59 private: |
|
60 CSendAsMtmManager(CSendAsServer& aServer); |
|
61 void ConstructL(); |
|
62 // |
|
63 void PopulateL(); |
|
64 private: |
|
65 CSendAsServer& iServer; |
|
66 RArray<TUid> iMtmUidArray; |
|
67 RPointerArray<CBaseMtm> iClientMtmArray; |
|
68 CClientMtmRegistry* iClientRegistry; |
|
69 }; |
|
70 |
|
71 #endif // __CSENDASMTMMANAGER_H__ |