|
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 __CSENDASSERVER_H__ |
|
17 #define __CSENDASSERVER_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <msvapi.h> |
|
21 |
|
22 // forward declarations |
|
23 class CSendAsSession; |
|
24 class CSendAsServerTimer; |
|
25 |
|
26 class CSendAsActiveContainer; |
|
27 class CSendAsMtmManager; |
|
28 |
|
29 /** |
|
30 Server class containing an object container index, in order to provide subsessions. |
|
31 |
|
32 Using a server-global containder index guarantees unique object containers for the |
|
33 whole server. |
|
34 |
|
35 @internalComponent |
|
36 @released |
|
37 */ |
|
38 class CSendAsServer : public CServer2, public MMsvSessionObserver |
|
39 { |
|
40 public: |
|
41 static CSendAsServer* NewLC(); |
|
42 virtual ~CSendAsServer(); |
|
43 // |
|
44 CMsvSession& GetMsvSessionL(); |
|
45 CSendAsMtmManager* GetMtmManager(); |
|
46 // |
|
47 CSendAsActiveContainer& ActiveContainer(); |
|
48 void ContainerEmpty(); |
|
49 // |
|
50 void SessionClosed(CObjectCon* aSessionContainer); |
|
51 CObjectCon* NewContainerL(); |
|
52 // |
|
53 const TUid& NotifierUid() const; |
|
54 const TUid& EditUtilsPluginUid() const; |
|
55 private: |
|
56 CSendAsServer(); |
|
57 void ConstructL(); |
|
58 void ReadResourceFileL(); |
|
59 // |
|
60 CSession2* DoNewSessionL(const TVersion& aVersion, const RMessage2& aMsg); |
|
61 // from CServer2 |
|
62 virtual CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMsg) const; |
|
63 // from MMsvSessionObserver |
|
64 virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); |
|
65 // |
|
66 void HandleMtmChangeL(TMsvSessionEvent& aEvent); |
|
67 private: |
|
68 CSendAsMtmManager* iMtmManager; |
|
69 CMsvSession* iMsvSession; |
|
70 CObjectConIx* iContainerIndex; |
|
71 CSendAsServerTimer* iCloseTimer; |
|
72 TInt iOpenSessions; |
|
73 CSendAsActiveContainer* iActiveContainer; |
|
74 TUid iEditUtilsPluginUid; |
|
75 TUid iNotifierUid; |
|
76 }; |
|
77 |
|
78 #endif // __CSENDASSERVER_H__ |