|
1 // Copyright (c) 2005-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 NOTIFICATION_H |
|
17 #define NOTIFICATION_H |
|
18 |
|
19 #include <e32std.h> |
|
20 |
|
21 class TBTBasebandEventNotification; |
|
22 class CPhysicalLink; |
|
23 |
|
24 template<class T> |
|
25 class TPolymorphicQLink : public TDblQueLink |
|
26 { |
|
27 public: |
|
28 TPolymorphicQLink(T* aObserver):iObserver(aObserver){} |
|
29 operator T* () {return iObserver;} |
|
30 T* Item() {return iObserver;} |
|
31 private: |
|
32 T* iObserver; |
|
33 }; |
|
34 |
|
35 class MPhysicalLinkObserver; |
|
36 typedef TPolymorphicQLink<MPhysicalLinkObserver> TPhysicalLinkObserverQLink; |
|
37 |
|
38 class TPhysicalLinkSubscriptionInfo |
|
39 { |
|
40 public: |
|
41 TPhysicalLinkSubscriptionInfo(MPhysicalLinkObserver& aMPhysicalLinkObserver, TBTDevAddr aAddr): |
|
42 iMPhysicalLinkObserver(aMPhysicalLinkObserver), iAddr(aAddr){}; |
|
43 MPhysicalLinkObserver& iMPhysicalLinkObserver; |
|
44 TBTDevAddr iAddr; |
|
45 }; |
|
46 |
|
47 class MPhysicalLinkObserver |
|
48 /** |
|
49 Interface for simple notifications to the presence of physical channel |
|
50 or for especially interested parties a change in security. |
|
51 **/ |
|
52 { |
|
53 public: |
|
54 virtual void PhysicalLinkChange(const TBTBasebandEventNotification& aEvent, CPhysicalLink& aPhysicalLink) = 0; |
|
55 virtual TPhysicalLinkObserverQLink& ObserverQLink() = 0; |
|
56 }; |
|
57 |
|
58 |
|
59 class MBluetoothPrefetchNotifier; |
|
60 typedef TPolymorphicQLink<MBluetoothPrefetchNotifier> TPrefetchNotifierQLink; |
|
61 |
|
62 /** |
|
63 Interface for notification of when a prefetched PIN code entry has completed. |
|
64 */ |
|
65 NONSHARABLE_CLASS(MBluetoothPrefetchNotifier) |
|
66 { |
|
67 public: |
|
68 virtual TPrefetchNotifierQLink& MbpnQueLink() = 0; |
|
69 virtual void MbpnPrefetchComplete(TInt aError) = 0; |
|
70 }; |
|
71 |
|
72 #endif |