24
|
1 |
// Copyright (c) 2007-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 |
// gprsavailabilitylistener.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#ifndef PSDAVAILABILITYLISTENER_H
|
|
19 |
#define PSDAVAILABILITYLISTENER_H
|
|
20 |
|
|
21 |
#include <comms-infras/coremcpractivities.h>
|
|
22 |
#include <networking/pdpprovision.h>
|
|
23 |
#include <etel.h>
|
|
24 |
#include <etelmm.h>
|
|
25 |
|
|
26 |
NONSHARABLE_CLASS(CPsdAvailabilityListener) : public CActive, public Messages::ASimpleNodeIdBase
|
|
27 |
/** Packet switched availability listeners
|
|
28 |
|
|
29 |
@internalTechnology
|
|
30 |
*/
|
|
31 |
{
|
|
32 |
enum TState {EInitialising, EChecking, EAttached, EUnAttached};
|
|
33 |
|
|
34 |
public:
|
|
35 |
static CPsdAvailabilityListener* NewL(const Messages::TNodeCtxId& aAvailabilityActivity, const CTSYProvision& aTsyProvision, TUint aApId, TBool aUnavailableDueToContention);
|
|
36 |
virtual ~CPsdAvailabilityListener();
|
|
37 |
void ReportContentionAvailabilityStatusIfRequired(const ESock::TAvailabilityStatus& aAvailabilityStatus);
|
|
38 |
|
|
39 |
private:
|
|
40 |
CPsdAvailabilityListener(const Messages::TNodeCtxId& aAvailabilityActivity, const CTSYProvision& aTsyProvision, TUint aApId, TBool aUnavailableDueToContention);
|
|
41 |
void StartL();
|
|
42 |
virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
|
|
43 |
|
|
44 |
// CActive
|
|
45 |
void RunL();
|
|
46 |
TInt RunError(TInt aError);
|
|
47 |
void DoCancel();
|
|
48 |
|
|
49 |
private:
|
|
50 |
const Messages::TNodeCtxId iAvailabilityActivity;
|
|
51 |
const CTSYProvision* iTsyProvision;
|
|
52 |
RMobilePhone iPhone;
|
|
53 |
RTelServer iTelServer;
|
|
54 |
RPacketService iPacketService;
|
|
55 |
TInt iApId;
|
|
56 |
RPacketService::TStatus iPsdStatus;
|
|
57 |
TState iState;
|
|
58 |
TBool iUnavailableDueToContention;
|
|
59 |
};
|
|
60 |
|
|
61 |
#endif
|