|
1 // Copyright (c) 2008-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 // PDP Connection Provider class definition. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef SYMBIAN_PPDCPR_H |
|
24 #define SYMBIAN_PDPCPR_H |
|
25 |
|
26 #include <comms-infras/corecpr.h> |
|
27 #include <comms-infras/corecprstates.h> |
|
28 #include "pdpcpravailabilitylistener.h" |
|
29 #include "MPDPCPRBearerObserver.h" |
|
30 |
|
31 class CPDPConnectionProvider; |
|
32 class CPDPConnectionProviderFactory; |
|
33 |
|
34 namespace PDPCprActivities |
|
35 { |
|
36 DECLARE_ACTIVITY_MAP(activityMap) |
|
37 } |
|
38 |
|
39 |
|
40 |
|
41 namespace PDPCprStates |
|
42 { |
|
43 typedef MeshMachine::TNodeContext<CPDPConnectionProvider, CprStates::TContext> TContext; |
|
44 |
|
45 DECLARE_SMELEMENT_HEADER( TUpdateBundle, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, PDPCprStates::TContext) |
|
46 virtual void DoL(); |
|
47 DECLARE_SMELEMENT_FOOTER( TUpdateBundle) |
|
48 |
|
49 DECLARE_AGGREGATED_TRANSITION2( |
|
50 TUpdateBundleAndRespondWithRetrievedParams, |
|
51 TUpdateBundle, |
|
52 PRStates::TRespondWithRetrievedParams |
|
53 ) |
|
54 |
|
55 } |
|
56 |
|
57 |
|
58 class CPDPConnectionProvider : public CCoreConnectionProvider, MPDPCPRBearerObserver |
|
59 /** PDP connection provider |
|
60 |
|
61 @internalTechnology |
|
62 */ |
|
63 { |
|
64 friend class CPDPConnectionProviderFactory; |
|
65 friend class PDPCprStates::TUpdateBundle; |
|
66 |
|
67 public: |
|
68 typedef CPDPConnectionProviderFactory FactoryType; |
|
69 |
|
70 static CPDPConnectionProvider* NewL(ESock::CConnectionProviderFactoryBase& aFactory); |
|
71 |
|
72 virtual void BearerChangeDetectedL(); |
|
73 |
|
74 protected: |
|
75 CPDPConnectionProvider(ESock::CConnectionProviderFactoryBase& aFactory); |
|
76 void StartListener(); |
|
77 void StopListener(); |
|
78 TUint32 Bearer(TUint aDynamicCaps, RMobilePhone::TMobilePhoneNetworkMode& aNetworkMode); |
|
79 void UpdateBearer(); |
|
80 virtual ~CPDPConnectionProvider(); |
|
81 virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage); |
|
82 void ConstructL(); |
|
83 private: |
|
84 CPDPCPRDynamicCapsListener* iDynamicCapsEventListener; |
|
85 CPDPCPRNetworkModeListener* iNetworkModeEventListener; |
|
86 TUint32 iBearerType; |
|
87 TBool iBearerSet; |
|
88 }; |
|
89 |
|
90 #endif //SYMBIAN_PDPCPR_H |