24
|
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 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@internalComponent
|
|
19 |
*/
|
|
20 |
|
|
21 |
#ifndef SYMBIAN_PDPSERVICES_H
|
|
22 |
#define SYMBIAN_PDPSERVICES_H
|
|
23 |
|
|
24 |
#include "mbmsengine.h"
|
|
25 |
#include <comms-infras/coretiermanager.h>
|
|
26 |
#include <networking/mbmsparams.h>
|
|
27 |
#include <pcktretrieve.h>
|
|
28 |
|
|
29 |
using namespace ESock;
|
|
30 |
using namespace ConnectionServ;
|
|
31 |
|
|
32 |
class CMBMSEngine;
|
|
33 |
|
|
34 |
/* This class is used to send and retrieve MBMS parameters from the client and Etel.
|
|
35 |
The MBMS parameters are fetched from the bundle and sent to Etel inorder to process the MBMS requests.
|
|
36 |
Different State Changes are maintained in this class to carry out the MBMS requests.*/
|
|
37 |
class CMBMSServiceRequest: public CActive
|
|
38 |
{
|
|
39 |
public:
|
|
40 |
static CMBMSServiceRequest* NewL(
|
|
41 |
CMBMSEngine& aMBMSEngine,
|
|
42 |
const Messages::TNodeId& aMBMSTMCommsId,
|
|
43 |
Messages::RNodeInterface* aOriginatorInterface,
|
|
44 |
const Messages::TRuntimeCtxId& aOriginator,
|
|
45 |
const Messages::TNodeSignal::TMessageId& aRequestType,
|
|
46 |
ESock::CRefCountOwnedParameterBundle* aRequestBundleOwner,
|
|
47 |
const XMBMSServiceQuerySet::TQueryType aQueryType
|
|
48 |
);
|
|
49 |
|
|
50 |
~CMBMSServiceRequest();
|
|
51 |
|
|
52 |
// From CActive
|
|
53 |
virtual void RunL();
|
|
54 |
virtual void DoCancel();
|
|
55 |
virtual TInt RunError(TInt aError);
|
|
56 |
|
|
57 |
//This function is used to cancel the current outstanding requests.
|
|
58 |
void CancelMessage(const TInt aError);
|
|
59 |
//This function is used to get the client ID.
|
|
60 |
const Messages::TNodeId& GetClientId();
|
|
61 |
//This function is used to start MBMS requests.
|
|
62 |
void StartRequest();
|
|
63 |
|
|
64 |
private:
|
|
65 |
CMBMSServiceRequest(
|
|
66 |
CMBMSEngine& aMBMSEngine,
|
|
67 |
const Messages::TNodeId& aMBMSTMCommsId,
|
|
68 |
const Messages::TNodeSignal::TMessageId& aRequestType,
|
|
69 |
ESock::CRefCountOwnedParameterBundle* aRequestBundleOwner,
|
|
70 |
const XMBMSServiceQuerySet::TQueryType aQueryType
|
|
71 |
);
|
|
72 |
|
|
73 |
void ConstructL(Messages::RNodeInterface* aOriginatorInterface, const Messages::TRuntimeCtxId& aOriginator);
|
|
74 |
|
|
75 |
//This function is used to update the service list which is passed to Etel.
|
|
76 |
CPcktMbmsMonitoredServiceList* UpdateMonitorServiceListL();
|
|
77 |
//This function is used to prepare result bundle.
|
|
78 |
CConnectionServParameterBundle* PrepareMonitorResultBundleL() const;
|
|
79 |
//This function is used to prepare result bundle containing bearer availability.
|
|
80 |
CConnectionServParameterBundle* PrepareBearerResultBundleL() const;
|
|
81 |
//This function is used to prepare empty bundle.
|
|
82 |
CConnectionServParameterBundle* PrepareRemoveAllBundleL() const;
|
|
83 |
/*This function is used to prepare bundle containing current and max count of service/monitor
|
|
84 |
list table.*/
|
|
85 |
CConnectionServParameterBundle* PrepareCountBundleL() const;
|
|
86 |
//This function is used to send result bundle to the client.
|
|
87 |
void SendResultBundleL();
|
|
88 |
|
|
89 |
private:
|
|
90 |
// Required for setting and controlling the StateChanges within the engine
|
|
91 |
enum TScanEngineState
|
|
92 |
{
|
|
93 |
EInitialising = 0,
|
|
94 |
EChecking,
|
|
95 |
EBearerAvailable,
|
|
96 |
ERetrieveBearerAvailability,
|
|
97 |
EServiceAdd,
|
|
98 |
ENotifyService,
|
|
99 |
EServiceRemove,
|
|
100 |
EServiceRemoveAll,
|
|
101 |
ERemoveAllComplete,
|
|
102 |
EStartMonitor,
|
|
103 |
EGetMonitorList,
|
|
104 |
EResultCount,
|
|
105 |
EGetCountMonitorList,
|
|
106 |
EGetCountServiceList
|
|
107 |
};
|
|
108 |
|
|
109 |
RPacketService::TStatus iPsdStatus;
|
|
110 |
|
|
111 |
//to maintain different states in state machine
|
|
112 |
TScanEngineState iScanEngineState;
|
|
113 |
|
|
114 |
//required by CMBMSServiceRequest.
|
|
115 |
CMBMSEngine& iMBMSEngine;
|
|
116 |
|
|
117 |
// Needed for NotificationRequest Messages
|
|
118 |
Messages::TNodeId iMBMSTMCommsId;
|
|
119 |
Messages::RRequestOriginator iRequestOriginator;
|
|
120 |
Messages::TNodeSignal::TMessageId iRequestType;
|
|
121 |
|
|
122 |
//parameter bundle
|
|
123 |
ESock::CRefCountOwnedParameterBundle* iObjectBundleOwner;
|
|
124 |
|
|
125 |
TMbmsNetworkServiceStatus iNetworkServiceStatus;
|
|
126 |
//operation type on MBMS Monitor List table
|
|
127 |
TMbmsAction iMbmsAction;
|
|
128 |
|
|
129 |
CRetrievePcktMbmsMonitoredServices* iRetrievePcktMbms;
|
|
130 |
//MBMS query set by the client
|
|
131 |
XMBMSServiceQuerySet::TQueryType iQueryType;
|
|
132 |
|
|
133 |
//to maintain current and max count of entries in monitor/service list table.
|
|
134 |
TInt iCount;
|
|
135 |
TInt iMaxCount;
|
|
136 |
|
|
137 |
};
|
|
138 |
#endif // SYMBIAN_PDPSERVICES_H
|
|
139 |
|