|
1 /* |
|
2 * Copyright (c) 2004-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: AknNfySrv session and server declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __AKNNFYSRV_H__ |
|
19 #define __AKNNFYSRV_H__ |
|
20 |
|
21 #include <AknNotifierAppServerSession.h> |
|
22 #include <AknNotifierAppServer.h> |
|
23 #include <akndialogcontroller.h> |
|
24 |
|
25 class CAknNfySrvSession; |
|
26 class CAknNotifierEntry; |
|
27 class CAknNotifLibraryEntry; |
|
28 |
|
29 class CAknNfySrv: public CAknNotifierAppServer, public MNotifLibraryOwningServer |
|
30 { |
|
31 public: // from CEikAppServer |
|
32 CApaAppServiceBase* CreateServiceL(TUid aServiceType) const; |
|
33 |
|
34 public: |
|
35 ~CAknNfySrv(); |
|
36 void LoadLibraryL(HBufC* aLibName); |
|
37 void AddNotifiersFromLibL(CAknNotifLibraryEntry* aNewLib); |
|
38 void HandleClientExit(CAknNfySrvSession* aSession); |
|
39 CAknNotifierEntry* FindEntry(TUid aUid) const; |
|
40 TBool CheckReferenceCount(const TDesC& aLibName, TBool aIncrease); |
|
41 void UnloadLibrary(TUid aNotifierUid); |
|
42 |
|
43 // from MNotifLibraryOwningServer |
|
44 MEikSrvNotifierBase2* FindImplementation(TUid aUid) const; |
|
45 |
|
46 void StartNotifierL(TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse); |
|
47 void CancelNotifier(TUid aNotifierUid); |
|
48 |
|
49 void StartNotifierAndGetResponseL( |
|
50 TUid aNotifierUid, |
|
51 TDesC8& aBuffer, |
|
52 const RMessagePtr2& aMsg, |
|
53 TInt aReplySlot); |
|
54 |
|
55 void DoUnload(const TDesC& aLibName); |
|
56 void CheckPendingRemovalsL(); |
|
57 |
|
58 RPointerArray<CAknNotifierEntry> iNotifierArray; |
|
59 RPointerArray<CAknNotifLibraryEntry> iLibraryArray; |
|
60 CIdle* iLibraryRemover; |
|
61 |
|
62 private: // from MNotifLibraryOwningServer |
|
63 void UnbalanceReferenceCount(TUid aUid, TBool aAddCount); |
|
64 void NotifierExtension(TUid aExtensionUid, TAny*& aGenParam); |
|
65 }; |
|
66 |
|
67 |
|
68 class CAknNfySrvSession: public CAknNotifierServerAppService |
|
69 { |
|
70 public: |
|
71 CAknNfySrvSession(const CAknNfySrv* aAppServer) |
|
72 :CAknNotifierServerAppService((const CAknNotifierAppServer&) *aAppServer), |
|
73 iServer((CAknNfySrv*)aAppServer) |
|
74 { |
|
75 } |
|
76 |
|
77 ~CAknNfySrvSession() |
|
78 { |
|
79 iServer->HandleClientExit(this); |
|
80 } |
|
81 |
|
82 public: // From base classes. |
|
83 /** |
|
84 * From CAknNotifierServerAppService. |
|
85 * Actual message handling, this method commands server to do notifier operations based on |
|
86 * received message. ServiceL calls this method if client has passed AllowClientL checking |
|
87 * |
|
88 * @since 3.0 |
|
89 * @param aMessage Message from client. |
|
90 */ |
|
91 void HandleMessageL(const RMessage2& aMessage); |
|
92 |
|
93 private: |
|
94 CAknNfySrv* iServer; |
|
95 }; |
|
96 |
|
97 |
|
98 #endif // __AKNCAPSERVER_H__ |
|
99 |
|
100 // End of file |
|
101 |