|
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 // FlowControlChange.cpp |
|
15 // Class that listens for requests to change flow control in packet loopback |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 */ |
|
22 |
|
23 #ifndef __FLOW_CONTROL_CHANGE__ |
|
24 #define __FLOW_CONTROL_CHANGE__ |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <e32property.h> |
|
28 |
|
29 class MFlowControlChangeCallBack |
|
30 { |
|
31 public: |
|
32 /** This method is called when flow control is started */ |
|
33 virtual void StartFlowControl() = 0; |
|
34 /** This method is called when flow control is stopped */ |
|
35 virtual void StopFlowControl() = 0; |
|
36 }; |
|
37 |
|
38 NONSHARABLE_CLASS(CFlowControlChange) : public CActive |
|
39 { |
|
40 public: |
|
41 static CFlowControlChange* NewL(TUint aUnit, MFlowControlChangeCallBack* aCallback); |
|
42 ~CFlowControlChange(); |
|
43 |
|
44 TBool FlowControlIsOn() const; |
|
45 |
|
46 private: |
|
47 CFlowControlChange(TUint aUnit, MFlowControlChangeCallBack* aCallback); |
|
48 |
|
49 void RunL(); |
|
50 void DoCancel(); |
|
51 |
|
52 /** Class with implementation of MFlowControlChangeCallBack::StartFlowControl that is called when the flow control is changed */ |
|
53 MFlowControlChangeCallBack *iCallback; |
|
54 /** The property to listen on for changes to flow control */ |
|
55 RProperty iProperty; |
|
56 /** The port to listen on for changes to flow control */ |
|
57 TUint iUnit; |
|
58 /** True if flow control is on */ |
|
59 TBool iFlowControlIsOn; |
|
60 }; |
|
61 |
|
62 #endif |
|
63 |