0
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#include "cunsoliciteddatareq.h"
|
|
21 |
#include "modemattrace.h"
|
|
22 |
#include "modematclientsrv.h"
|
|
23 |
#include "rmodematcontroller.h"
|
|
24 |
|
|
25 |
CUnsolicitedDataReq::CUnsolicitedDataReq( RModemAtController* aClient, TDes8& aResponse ) :
|
|
26 |
CActive(EPriorityNormal),
|
|
27 |
iClient(aClient),
|
|
28 |
iResponse(aResponse)
|
|
29 |
{
|
|
30 |
C_TRACE((_L("CUnsolicitedDataReq::CUnsolicitedDataReq(aClient: 0x%x this: 0x%x)"), aClient, this));
|
|
31 |
CActiveScheduler::Add( this );
|
|
32 |
aClient->SendReceiveUnsolicitedResult(aResponse,iStatus);
|
|
33 |
SetActive();
|
|
34 |
}
|
|
35 |
|
|
36 |
CUnsolicitedDataReq::~CUnsolicitedDataReq()
|
|
37 |
{
|
|
38 |
C_TRACE((_L("CUnsolicitedDataReq::~CUnsolicitedDataReq()")));
|
|
39 |
Cancel();
|
|
40 |
}
|
|
41 |
|
|
42 |
void CUnsolicitedDataReq::RunL()
|
|
43 |
{
|
|
44 |
C_TRACE((_L("CUnsolicitedDataReq::RunL()")));
|
|
45 |
if( iStatus.Int() == KErrNone )
|
|
46 |
{
|
|
47 |
C_TRACE((_L("CUnsolicitedDataReq iClient->UnsolicitedResultReceive this: 0x%x"), this));
|
|
48 |
iClient->UnsolicitedResultReceived(iStatus.Int());
|
|
49 |
C_TRACE((_L("CUnsolicitedDataReq RunL starting again %d"), iStatus.Int()));
|
|
50 |
iClient->SendReceiveUnsolicitedResult( iResponse, iStatus );
|
|
51 |
SetActive();
|
|
52 |
}
|
|
53 |
else
|
|
54 |
{
|
|
55 |
C_TRACE((_L("CUnsolicitedDataReq::RunL() deleting instance this: 0x%x"), this));
|
|
56 |
delete this;
|
|
57 |
}
|
|
58 |
}
|
|
59 |
|
|
60 |
void CUnsolicitedDataReq::DoCancel()
|
|
61 |
{
|
|
62 |
C_TRACE((_L("CUnsolicitedDataReq::DoCancel")));
|
|
63 |
iClient->SendReceiveUnsolicitedResulCancel();
|
|
64 |
}
|
|
65 |
|