|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Monitor of data receiving event. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSATBIPDATAAVAILABLEMONITOR_H |
|
20 #define CSATBIPDATAAVAILABLEMONITOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "CSatEventMonitorHandler.h" |
|
24 #include "MSatBIPDataAvailableObserver.h" |
|
25 |
|
26 // FORWARD DECLARATION |
|
27 class MSatBIPEventNotifier; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Monitors DataAvailable event from BIP Data channels |
|
33 * |
|
34 * @lib EventMonitors.lib |
|
35 * @since Series 60 3.0 |
|
36 */ |
|
37 class CSatBIPDataAvailableMonitor : public CSatEventMonitorHandler, |
|
38 public MSatBIPDataAvailableObserver |
|
39 { |
|
40 public: // Constructor and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aUtils Interface for Event monitor utils |
|
45 */ |
|
46 static CSatBIPDataAvailableMonitor* NewL( |
|
47 MSatEventMonitorUtils& aUtils ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CSatBIPDataAvailableMonitor(); |
|
53 |
|
54 public: // From base class |
|
55 |
|
56 /** |
|
57 * From CSatEventMonitorHandler Cancels event monitoring |
|
58 */ |
|
59 void DoCancelMonitor(); |
|
60 |
|
61 /** |
|
62 * From MSatBIPDataAvailableObserver Notification of an event. |
|
63 * @param aChannelId ID of the channel where the data is available. |
|
64 * @param aLength Number of bytes available. |
|
65 */ |
|
66 void DataAvailable( const TInt aChannelId, const TInt aLength ); |
|
67 |
|
68 protected: // New functions |
|
69 |
|
70 /** |
|
71 * From CSatEventMonitorHandler Starts event monitoring |
|
72 * @return Error code indicating the status of starting the monitor |
|
73 */ |
|
74 TInt StartMonitor(); |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * C++ default constructor. |
|
80 * @param aUtils Interface for Event monitor utils |
|
81 */ |
|
82 CSatBIPDataAvailableMonitor( MSatEventMonitorUtils& aUtils ); |
|
83 |
|
84 /** |
|
85 * By default Symbian 2nd phase constructor is private. |
|
86 */ |
|
87 void ConstructL(); |
|
88 |
|
89 private: // Data |
|
90 |
|
91 // Indicates is this monitor active or not |
|
92 TBool iIsActive; |
|
93 |
|
94 }; |
|
95 |
|
96 #endif // CSATBIPDATAAVAILABLEMONITOR_H |
|
97 |
|
98 // End of File |