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 MBMSENGINE_H
|
|
22 |
#define MBMSENGINE_H
|
|
23 |
|
|
24 |
#include <networking/mbmsparams.h>
|
|
25 |
#include <etel.h>
|
|
26 |
#include <pcktlist.h>
|
|
27 |
#include <comms-infras/coretiermanager.h>
|
|
28 |
#include "pdptiermanager.h"
|
|
29 |
|
|
30 |
using namespace ESock;
|
|
31 |
using namespace ConnectionServ;
|
|
32 |
|
|
33 |
class CMBMSServiceRequest;
|
|
34 |
|
|
35 |
class CMBMSEngine: public CActive
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
static CMBMSEngine* NewL(const Messages::TNodeId& aMbmsTMCommsId, MPacketServiceNotifier& aPacketServiceNotifier);
|
|
39 |
|
|
40 |
~CMBMSEngine();
|
|
41 |
|
|
42 |
// From CActive
|
|
43 |
virtual void RunL();
|
|
44 |
virtual void DoCancel();
|
|
45 |
virtual TInt RunError(TInt aError);
|
|
46 |
|
|
47 |
void CheckPendingRequests();
|
|
48 |
void RemoveFromRequestListL(const Messages::TRuntimeCtxId& aNodeCtxId);
|
|
49 |
void CancelAndRemoveFromRequestListL(const Messages::TRuntimeCtxId& aNodeCtxId);
|
|
50 |
void AddToRequestListL(
|
|
51 |
Messages::RNodeInterface* aNodeInterface,
|
|
52 |
const Messages::TRuntimeCtxId& aNodeCtxId,
|
|
53 |
const Messages::TNodeSignal::TMessageId& aRequestType,
|
|
54 |
ESock::CRefCountOwnedParameterBundle* aRequestBundleOwner
|
|
55 |
);
|
|
56 |
RPacketService& GetRPacketService();
|
|
57 |
|
|
58 |
private:
|
|
59 |
CMBMSEngine(const Messages::TNodeId& aMbmsTMCommsId, MPacketServiceNotifier& aPacketServiceNotifier);
|
|
60 |
void ConstructL();
|
|
61 |
TBool InitialisePhoneL();
|
|
62 |
void DeleteIndexElement(TUint aIndex);
|
|
63 |
TUint GetRequestElementL(const Messages::TRuntimeCtxId& aNodeCtxId);
|
|
64 |
|
|
65 |
private:
|
|
66 |
enum TPhoneState
|
|
67 |
{
|
|
68 |
EInitialising = 0,
|
|
69 |
ESetAttachMode,
|
|
70 |
EAttachModeComplete
|
|
71 |
};
|
|
72 |
//tel server
|
|
73 |
RTelServer iTelServer;
|
|
74 |
//phone
|
|
75 |
RPhone iPhone;
|
|
76 |
RPhone::TStatus iPhoneStatus;
|
|
77 |
RPacketService iPacketService;
|
|
78 |
|
|
79 |
RTelServer::TPhoneInfo iPhoneInfo;
|
|
80 |
|
|
81 |
RPointerArray<CMBMSServiceRequest> iMBMSRequestList;
|
|
82 |
|
|
83 |
Messages::TNodeId iMbmsTMCommsId;
|
|
84 |
|
|
85 |
//to maintain different states in state machine
|
|
86 |
TPhoneState iPhoneState;
|
|
87 |
//to check for any outstanding requests
|
|
88 |
TBool iPendingRequests;
|
|
89 |
MPacketServiceNotifier& iPacketServiceNotifier;
|
|
90 |
|
|
91 |
};
|
|
92 |
#endif // MBMSENGINE_H
|
|
93 |
|