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: SatMoSmsControl Control specific test class. Inherits CSatBase.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
// INCLUDE FILES
|
|
21 |
#include <stifparser.h>
|
|
22 |
#include "satmosmscontrol.h"
|
|
23 |
|
|
24 |
// CONSTANTS
|
|
25 |
_LIT( KControlResult, "ControlResult" );
|
|
26 |
|
|
27 |
|
|
28 |
// -----------------------------------------------------------------------------
|
|
29 |
// CSatMoSmsControl::CSatMoSmsControl
|
|
30 |
// C++ default constructor can NOT contain any code, that
|
|
31 |
// might leave.
|
|
32 |
// -----------------------------------------------------------------------------
|
|
33 |
//
|
|
34 |
CSatMoSmsControl::CSatMoSmsControl
|
|
35 |
(
|
|
36 |
const TSatIpc aIpc,
|
|
37 |
const RSat& aSat,
|
|
38 |
CStifItemParser& aParser,
|
|
39 |
CStifLogger& aLog
|
|
40 |
) : CSatBase ( aIpc, aSat, aParser, aLog ), iDataPckg( iData )
|
|
41 |
{
|
|
42 |
}
|
|
43 |
|
|
44 |
// -----------------------------------------------------------------------------
|
|
45 |
// CSatMoSmsControl::~CSatMoSmsControl
|
|
46 |
// Destructor
|
|
47 |
// -----------------------------------------------------------------------------
|
|
48 |
//
|
|
49 |
CSatMoSmsControl::~CSatMoSmsControl()
|
|
50 |
{
|
|
51 |
}
|
|
52 |
|
|
53 |
// -----------------------------------------------------------------------------
|
|
54 |
// CSatMoSmsControl::NotifySat
|
|
55 |
// Send a notify request to Etel and clear internal data
|
|
56 |
// (other items were commented in a header).
|
|
57 |
// -----------------------------------------------------------------------------
|
|
58 |
//
|
|
59 |
TInt CSatMoSmsControl::NotifySat
|
|
60 |
(
|
|
61 |
TRequestStatus& aSimAtkStatus
|
|
62 |
)
|
|
63 |
{
|
|
64 |
TInt ret ( KErrNone );
|
|
65 |
|
|
66 |
// Clear the package
|
|
67 |
Init( iData );
|
|
68 |
|
|
69 |
iSat.NotifyMoSmControlRequest( aSimAtkStatus, iDataPckg );
|
|
70 |
|
|
71 |
return ret;
|
|
72 |
}
|
|
73 |
|
|
74 |
// -----------------------------------------------------------------------------
|
|
75 |
// CSatMoSmsControl::CheckData
|
|
76 |
// Verifies the validity of received SatMoSmsControl control event
|
|
77 |
// (other items were commented in a header).
|
|
78 |
// -----------------------------------------------------------------------------
|
|
79 |
//
|
|
80 |
TInt CSatMoSmsControl::CheckData()
|
|
81 |
{
|
|
82 |
iLog.Log( _L( "CSatMoSmsControl::CheckData" ) );
|
|
83 |
|
|
84 |
TInt ret( KErrNone );
|
|
85 |
|
|
86 |
// GeneralResult
|
|
87 |
if ( KErrNone != CheckValue( KControlResult, iData.iResult ) )
|
|
88 |
{
|
|
89 |
ret = KErrCorrupt;
|
|
90 |
}
|
|
91 |
|
|
92 |
// AlphaId
|
|
93 |
if ( KErrCorrupt == CheckAlphaId( iData.iAlphaId ) )
|
|
94 |
{
|
|
95 |
ret = KErrCorrupt;
|
|
96 |
}
|
|
97 |
|
|
98 |
// not supported fields:
|
|
99 |
// iRpAddress
|
|
100 |
// iTpAddress
|
|
101 |
|
|
102 |
return ret;
|
|
103 |
}
|
|
104 |
|
|
105 |
// End of file
|