|
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 // Defines the interface to the BCA. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #ifndef BCACONTROLLER_H |
|
23 #define BCACONTROLLER_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <c32comm.h> |
|
27 #include <networking/bca2.h> |
|
28 #include <networking/bca2factory.h> |
|
29 #include "RawIP2Flow.h" |
|
30 |
|
31 using namespace BasebandChannelAdaptation2; |
|
32 |
|
33 class CBttLogger; |
|
34 |
|
35 void Panic(TRawIP2NifPanic aPanic); |
|
36 typedef MBca2Factory* (*TNewBca2FactoryL)(); |
|
37 |
|
38 /** class used to load, open and shutdown the BCA. |
|
39 @internalComponent |
|
40 */ |
|
41 class CBcaController : public CActive |
|
42 { |
|
43 public: |
|
44 CBcaController(CRawIP2Flow& aRawIPFlow, CBttLogger* aTheLogger); |
|
45 ~CBcaController(); |
|
46 |
|
47 static CBcaController* NewL(CRawIP2Flow& aRawIPFlow,CBttLogger* aTheLogger); |
|
48 void ConstructL(); |
|
49 public: |
|
50 void StartLoadL(const CBCAProvision* aBCAProvisionConfig,MUpperControl* aControl, |
|
51 MUpperDataReceiver* aData); |
|
52 void Stop(TInt aError); |
|
53 inline MBca2* Bca(); |
|
54 |
|
55 #ifdef WCDMA_STUB |
|
56 inline TUint Nsapi() { return KErrNotFound; } |
|
57 #endif |
|
58 |
|
59 protected: |
|
60 // Inherited from CActive. |
|
61 virtual void RunL(); |
|
62 virtual void DoCancel(); |
|
63 private: |
|
64 CBttLogger* iTheLogger; // Unowned data. |
|
65 private: |
|
66 enum TBcaState |
|
67 { |
|
68 /** Bca ready to start */ |
|
69 EIdling, |
|
70 /** Bca IAP is set*/ |
|
71 EIAPSet |
|
72 }; |
|
73 |
|
74 private: |
|
75 |
|
76 /** BCA owned by NIF*/ |
|
77 MBca2* iMBca; |
|
78 /** used to load library*/ |
|
79 TAutoClose<RLibrary> iBcaDll; |
|
80 /** BCA state*/ |
|
81 TBcaState iState; |
|
82 |
|
83 CRawIP2Flow& iRawIPFlow; |
|
84 MUpperControl* iUpperControl; //BasebandChannelAdaptation2 |
|
85 MUpperDataReceiver* iUpperDataReceiver; //BasebandChannelAdaptation2 |
|
86 const CBCAProvision* iBCAProvisionConfig; // for obtaining pond |
|
87 MBca2::TBcaParams* iBcaParams; |
|
88 |
|
89 }; |
|
90 |
|
91 /** returns the BCA pointer. */ |
|
92 inline MBca2* CBcaController::Bca() |
|
93 { |
|
94 return iMBca; |
|
95 } |
|
96 |
|
97 #endif // BCAIOCONTROLLER_H |
|
98 |