0
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2006 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: SetUpCall specific test class. Inherits CCommandBase.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
// INCLUDE FILES
|
|
21 |
#include <stifparser.h>
|
|
22 |
#include "commandlocalinfo.h"
|
|
23 |
|
|
24 |
// CONSTANTS
|
|
25 |
_LIT( KType, "Type" );
|
|
26 |
|
|
27 |
|
|
28 |
// -----------------------------------------------------------------------------
|
|
29 |
// CCommandLocalInfo::CCommandLocalInfo
|
|
30 |
// C++ default constructor can NOT contain any code, that
|
|
31 |
// might leave.
|
|
32 |
// -----------------------------------------------------------------------------
|
|
33 |
//
|
|
34 |
CCommandLocalInfo::CCommandLocalInfo
|
|
35 |
(
|
|
36 |
const TSatIpc aIpc,
|
|
37 |
const RSat& aSat,
|
|
38 |
CStifItemParser& aParser,
|
|
39 |
CStifLogger& aLog
|
|
40 |
) : CSatCommandBase ( aIpc, aSat, aParser, aLog, RSat::ELocalInfo ),
|
|
41 |
iDataPckg( iData ),
|
|
42 |
iRspPckg( iRsp )
|
|
43 |
{
|
|
44 |
}
|
|
45 |
|
|
46 |
// -----------------------------------------------------------------------------
|
|
47 |
// CCommandLocalInfo::~CCommandLocalInfo
|
|
48 |
// Destructor
|
|
49 |
// -----------------------------------------------------------------------------
|
|
50 |
//
|
|
51 |
CCommandLocalInfo::~CCommandLocalInfo()
|
|
52 |
{
|
|
53 |
}
|
|
54 |
|
|
55 |
// -----------------------------------------------------------------------------
|
|
56 |
// CCommandLocalInfo::NotifySat
|
|
57 |
// Send a notify request to Etel and clear internal data
|
|
58 |
// (other items were commented in a header).
|
|
59 |
// -----------------------------------------------------------------------------
|
|
60 |
//
|
|
61 |
TInt CCommandLocalInfo::NotifySat
|
|
62 |
(
|
|
63 |
TRequestStatus& aSimAtkStatus
|
|
64 |
)
|
|
65 |
{
|
|
66 |
TInt ret ( KErrNone );
|
|
67 |
|
|
68 |
// Clear the package
|
|
69 |
Init( iData );
|
|
70 |
Init( iRsp );
|
|
71 |
|
|
72 |
iSat.NotifyLocalInfoPCmd( aSimAtkStatus, iDataPckg );
|
|
73 |
|
|
74 |
return ret;
|
|
75 |
}
|
|
76 |
|
|
77 |
// -----------------------------------------------------------------------------
|
|
78 |
// CCommandLocalInfo::CheckData
|
|
79 |
// Verifies the validity of received command
|
|
80 |
// (other items were commented in a header).
|
|
81 |
// -----------------------------------------------------------------------------
|
|
82 |
//
|
|
83 |
TInt CCommandLocalInfo::CheckData()
|
|
84 |
{
|
|
85 |
iLog.Log( _L( "CCommandLocalInfo::CheckData" ) );
|
|
86 |
|
|
87 |
TInt ret( KErrNone );
|
|
88 |
|
|
89 |
// TODO
|
|
90 |
// DevideId
|
|
91 |
|
|
92 |
// InfoType
|
|
93 |
if ( KErrNone != CheckValue( KType, iData.iInfoType ) )
|
|
94 |
{
|
|
95 |
ret = KErrCorrupt;
|
|
96 |
}
|
|
97 |
|
|
98 |
return ret;
|
|
99 |
}
|
|
100 |
|
|
101 |
// -----------------------------------------------------------------------------
|
|
102 |
// CCommandLocalInfo::SendResponse
|
|
103 |
// Creates terminal response according to scripted parameters
|
|
104 |
// (other items were commented in a header).
|
|
105 |
// -----------------------------------------------------------------------------
|
|
106 |
//
|
|
107 |
TInt CCommandLocalInfo::SendResponse()
|
|
108 |
{
|
|
109 |
iLog.Log( _L( "CCommandLocalInfo::SendResponse" ) );
|
|
110 |
|
|
111 |
TInt ret( KErrNone );
|
|
112 |
|
|
113 |
// General result
|
|
114 |
SetGeneralResult( iRsp.iGeneralResult );
|
|
115 |
|
|
116 |
// Additional info & type
|
|
117 |
SetAdditionalInfo( iRsp.iInfoType, iRsp.iAdditionalInfo );
|
|
118 |
|
|
119 |
if ( KErrNone == ret )
|
|
120 |
{
|
|
121 |
ret = CSatCommandBase::SendResponse( iRspPckg );
|
|
122 |
}
|
|
123 |
|
|
124 |
return ret;
|
|
125 |
}
|
|
126 |
|
|
127 |
// End of File
|