|
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: Notifier app server definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __AKNNOTIFIERAPPSERVER_H__ |
|
19 #define __AKNNOTIFIERAPPSERVER_H__ |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <e32cmn.h> |
|
23 #include <eiknotapi.h> |
|
24 #include <badesca.h> |
|
25 #include <AknServerApp.h> |
|
26 #include "AknNotifierAppServer.h" |
|
27 |
|
28 class MNotifLibraryOwningServer |
|
29 { |
|
30 public: |
|
31 virtual MEikSrvNotifierBase2* FindImplementation(TUid aUid) const = 0; |
|
32 virtual void UnbalanceReferenceCount(TUid aUid, TBool aAddCount) = 0; |
|
33 virtual void NotifierExtension(TUid aExtensionUid, TAny*& aGenParam) = 0; |
|
34 }; |
|
35 |
|
36 class CNotifierNames; |
|
37 |
|
38 class CAknNotifierAppServer: public CAknAppServer, public MEikSrvNotifierManager |
|
39 { |
|
40 public: |
|
41 IMPORT_C ~CAknNotifierAppServer(); |
|
42 IMPORT_C CAknNotifierAppServer(); |
|
43 |
|
44 public: // from MEikSrvNotifierManager |
|
45 IMPORT_C void StartNotifierL(TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse); |
|
46 IMPORT_C void CancelNotifier(TUid aNotifierUid); |
|
47 IMPORT_C void UpdateNotifierL(TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse); |
|
48 |
|
49 public: // new methods |
|
50 IMPORT_C virtual void StartNotifierAndGetResponseL( |
|
51 TUid aNotifierUid, |
|
52 TDesC8& aBuffer, |
|
53 const RMessagePtr2& aMsg, |
|
54 TInt aReplySlot); |
|
55 |
|
56 // Appends given name to list of notifier libraries |
|
57 // It is ok to give full path for this method, RLibrary::Load() ignores paths anyway |
|
58 // when plat sec is turned on. |
|
59 IMPORT_C void AppendNotifierLibNameL(const TDesC& aLibraryName); |
|
60 |
|
61 // Loads notifier libraries which were given using AppendNotifierLibNameL |
|
62 IMPORT_C void LoadNotifiersL(); |
|
63 |
|
64 public: // from CEikAppServer |
|
65 IMPORT_C CApaAppServiceBase* CreateServiceL(TUid aServiceType) const; |
|
66 |
|
67 public: // New since 3.1 |
|
68 IMPORT_C void SetImplementationFinderL(MNotifLibraryOwningServer* aFinder); |
|
69 IMPORT_C void UnbalanceReferenceCountForNotif(TUid aUid, TBool aAddCount); |
|
70 |
|
71 public: // Since 3.2 |
|
72 IMPORT_C void UpdateNotifierAndGetResponseL( |
|
73 TUid aNotifierUid, |
|
74 TDesC8& aBuffer, |
|
75 const RMessagePtr2& aMsg, |
|
76 TInt aReplySlot); |
|
77 |
|
78 private: |
|
79 MEikSrvNotifierBase2* FindImplementation(TUid aUid) const; |
|
80 |
|
81 CArrayPtr<MEikSrvNotifierBase2>* CreateImplementationsL( |
|
82 const TDesC& aLibName, |
|
83 const TUidType& aUidType); |
|
84 |
|
85 private: |
|
86 RArray<RLibrary> iLibraries; |
|
87 RPointerArray<MEikSrvNotifierBase2> iNotifierArray; |
|
88 |
|
89 CNotifierNames* iNotifierNames; |
|
90 }; |
|
91 |
|
92 #endif // __AKNNOTIFIERAPPSERVER_H__ |
|
93 |
|
94 // End of file |