24
|
1 |
// Copyright (c) 2003-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 |
#include "AgtNotify.h"
|
|
17 |
|
|
18 |
|
|
19 |
TRealAgtNotify::TRealAgtNotify():iTestCase(0)
|
|
20 |
{
|
|
21 |
TInt err = iEtelSess.Connect();
|
|
22 |
if (err != KErrNone)
|
|
23 |
{
|
|
24 |
_LIT(KPanicClientText,"Failed connect to etel server");
|
|
25 |
User::Panic(KPanicClientText, err);
|
|
26 |
}
|
|
27 |
}
|
|
28 |
|
|
29 |
TRealAgtNotify::~TRealAgtNotify()
|
|
30 |
{
|
|
31 |
iEtelSess.Close();
|
|
32 |
}
|
|
33 |
|
|
34 |
void TRealAgtNotify::SetTestCase(TInt aTestCase)
|
|
35 |
{
|
|
36 |
iEtelSess.SetTestNumber(aTestCase);
|
|
37 |
iTestCase = aTestCase;
|
|
38 |
}
|
|
39 |
|
|
40 |
void TRealAgtNotify::NotifyAgt(enum QoSWarningNotification aNotification)
|
|
41 |
{
|
|
42 |
switch(iTestCase)
|
|
43 |
{
|
|
44 |
case 201:
|
|
45 |
case 202:
|
|
46 |
case 203:
|
|
47 |
case 204:
|
|
48 |
case 1404:
|
|
49 |
// Context Config Change
|
|
50 |
if(aNotification == EReduce)
|
|
51 |
{
|
|
52 |
// Drop
|
|
53 |
iEtelSess.TriggerContextConfigDrop();
|
|
54 |
}
|
|
55 |
else
|
|
56 |
{
|
|
57 |
// restore
|
|
58 |
iEtelSess.TriggerContextConfigRestore();
|
|
59 |
}
|
|
60 |
break;
|
|
61 |
case 301:
|
|
62 |
case 302:
|
|
63 |
case 303:
|
|
64 |
case 304:
|
|
65 |
case 305:
|
|
66 |
case 306:
|
|
67 |
case 307:
|
|
68 |
case 308:
|
|
69 |
case 309:
|
|
70 |
case 310:
|
|
71 |
case 311:
|
|
72 |
case 312:
|
|
73 |
case 313:
|
|
74 |
case 314:
|
|
75 |
case 315:
|
|
76 |
case 316:
|
|
77 |
case 317:
|
|
78 |
case 318:
|
|
79 |
case 319:
|
|
80 |
case 320:
|
|
81 |
case 321:
|
|
82 |
case 322:
|
|
83 |
case 323:
|
|
84 |
case 324:
|
|
85 |
case 325:
|
|
86 |
case 326:
|
|
87 |
case 327:
|
|
88 |
case 328:
|
|
89 |
case 329:
|
|
90 |
case 330:
|
|
91 |
case 401:
|
|
92 |
case 1405:
|
|
93 |
// QoS Change
|
|
94 |
if(aNotification == EReduce)
|
|
95 |
{
|
|
96 |
// Drop
|
|
97 |
iEtelSess.TriggerQoSConfigDrop();
|
|
98 |
}
|
|
99 |
else
|
|
100 |
{
|
|
101 |
// restore
|
|
102 |
iEtelSess.TriggerQoSConfigRestore();
|
|
103 |
}
|
|
104 |
break;
|
|
105 |
default:
|
|
106 |
break;
|
|
107 |
}
|
|
108 |
}
|
|
109 |
|
|
110 |
void TRealAgtNotify::SetMode(RTelServer::TMobilePhoneNetworkMode aMode)
|
|
111 |
{
|
|
112 |
iEtelSess.SetMode(aMode);
|
|
113 |
}
|