cbsref/telephonyrefplugins/atltsy/atcommand/callcontrol/src/atclcc.cpp
author hgs
Tue, 22 Jun 2010 11:02:32 +0100
changeset 44 8b72faa1200f
permissions -rw-r--r--
201024_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
// Initial Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
// Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
// Description:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
// @file atclcc.cpp
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
// This contains CATClcc which query incoming or waitting call information.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
// 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
//system include
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
//user include
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
#include "mslogger.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
#include "atmanager.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
#include "activecommandstore.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
#include "atclcc.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
#include "callinformationquerycompletenotify.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
#include "ltsycommondefine.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
#include "ltsycallinformationmanager.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
//const define
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
const TInt KLtsyClccReadTimeout = 2;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
//List current call information 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
_LIT8(KLtsyCLCCCommand, "AT+CLCC\r");
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
_LIT8(KLtsyCLCCMatchString, "+CLCC:*");
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
// CATClcc::NewL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
CATClcc* CATClcc::NewL(CGlobalPhonemanager& aGloblePhone,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
			           CCtsyDispatcherCallback& aCtsyDispatcherCallback)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::NewL()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
	CATClcc* self = CATClcc::NewLC(aGloblePhone, aCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
	CleanupStack::Pop(self);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
	return self;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
// CATClcc::NewLC
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
CATClcc* CATClcc::NewLC(CGlobalPhonemanager& aGloblePhone,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
		                CCtsyDispatcherCallback& aCtsyDispatcherCallback)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::NewLC()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
	CATClcc* self = new (ELeave) CATClcc(aGloblePhone, aCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
	CleanupStack::PushL(self);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
	self->ConstructL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63
	return self;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    64
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    65
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    66
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    67
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    68
// CATClcc::~CATClcc
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    69
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    70
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    71
CATClcc::~CATClcc()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    72
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    73
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::~CATClcc()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    74
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    75
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    76
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    77
// CATClcc::CATClcc
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    78
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    79
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    80
CATClcc::CATClcc(CGlobalPhonemanager& aGloblePhone, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    81
		         CCtsyDispatcherCallback& aCtsyDispatcherCallback)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    82
				 :CAtCommandBase(aGloblePhone, aCtsyDispatcherCallback)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    83
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    84
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::CATClcc()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    85
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    86
	iAtType = ELtsyAT_General_CLCC;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    87
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    88
	iQueryCallInfoNotify = NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    89
	InitVariable();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    90
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    91
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    92
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    93
// CATClcc::ConstructL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    94
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    95
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    96
void CATClcc::ConstructL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    97
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    98
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::ConstructL()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    99
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   100
	//Invoke base class function
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   101
	CAtCommandBase::ConstructL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   102
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   103
	//Set read and write timeout
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   104
	SetTimeOut(KLtsyDefaultWriteTimeOut, KLtsyClccReadTimeout);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   105
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   106
	//Add expecting string
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   107
	AddExpectStringL(KLtsyCLCCMatchString);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   108
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   109
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   110
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   111
// CATClcc::ExecuteCommand
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   112
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   113
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   114
void CATClcc::ExecuteCommand()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   115
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   116
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::ExecuteCommand()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   117
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   118
	iOKFounded = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   119
	iTxBuffer.Copy(KLtsyCLCCCommand);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   120
	Write();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   121
	iATStep = EATWaitForWriteComplete;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   122
	iProcessStates = EProcessInProgress;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   123
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   124
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   125
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   126
// CATClcc::InitVariable
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   127
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   128
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   129
void CATClcc::InitVariable()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   130
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   131
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::InitVariable()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   132
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   133
	iOKFounded = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   134
	iIOStatus = KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   135
	iATResult = KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   136
	iATStep = EATNotInProgress;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   137
	iProcessStates = EProcessNotInProgress;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   138
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   139
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   140
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   141
// CATClcc::AddQueryCallInformationCompleteNotify
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   142
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   143
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   144
void CATClcc::AddQueryCallInformationCompleteNotify(MCallInformationQueryCompleteNotify* aQueryCallInfoNotify)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   145
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   146
	iQueryCallInfoNotify = aQueryCallInfoNotify;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   147
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   148
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   149
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   150
// CATClcc::GetProcessStates
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   151
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   152
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   153
CATClcc::TATProcessStates CATClcc::GetProcessStates() const
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   154
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   155
	return iProcessStates;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   156
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   157
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   158
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   159
// CATClcc::SetProcessStates
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   160
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   161
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   162
void CATClcc::SetProcessStates(CATClcc::TATProcessStates aProcessState)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   163
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   164
	iProcessStates = aProcessState;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   165
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   166
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   167
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   168
// CATClcc::StartRequest
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   169
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   170
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   171
void CATClcc::StartRequest()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   172
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   173
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::StartRequest()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   174
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   175
	ExecuteCommand();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   176
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   177
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   178
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   179
// CATClcc::ParseCLCCResponseL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   180
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   181
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   182
void CATClcc::ParseCLCCResponseL(const TDesC8& aResponseBuf)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   183
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   184
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::ParseCLCCResponseL()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   185
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   186
	RArray<TPtrC8> array;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   187
	CleanupClosePushL(array);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   188
	iParser->ParseRespondedBuffer(array, aResponseBuf);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   189
	TInt nCount = array.Count();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   190
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   191
	//  1       2      3      4       5       6
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   192
	//+CLCC : <id1>, <dir>, <stat>, <mode>, <mpty>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   193
	//Its count must >= 6
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   194
	if (nCount < 6)	  
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   195
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   196
		CleanupStack::PopAndDestroy(1);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   197
		return;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   198
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   199
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   200
	//Parse +CLCC :* buffer
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   201
	//Only care Waiting call and incoming call
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   202
	TInt nVal(0);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   203
	TLex8 tLex(array[3]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   204
	if (tLex.Val(nVal) == KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   205
		{		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   206
		if (nVal == TLtsyCallInformation::EActiveCall ||
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   207
			nVal == TLtsyCallInformation::EHeldCall ||
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   208
			nVal == TLtsyCallInformation::EDialingCall ||
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   209
			nVal == TLtsyCallInformation::EAlertingCall )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   210
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   211
			CleanupStack::PopAndDestroy(1);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   212
			LOGTEXT(_L8("[Ltsy CallControl] First Parse state of the call not find incoming call and waiting call"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   213
			return;			
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   214
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   215
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   216
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   217
	else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   218
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   219
		CleanupStack::PopAndDestroy(1);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   220
		LOGTEXT(_L8("[Ltsy CallControl] First Parse state of the call Failing"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   221
		return;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   222
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   223
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   224
	//Parse incoming call or waiting call
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   225
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   226
	//Call id
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   227
	tLex.Assign(array[1]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   228
	if ((tLex.Val(nVal) != KErrNone)||
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   229
	    (nVal < KLtsyMinCallId)	||
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   230
		(nVal > KLtsyMaxCallId))
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   231
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   232
		CleanupStack::PopAndDestroy(1);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   233
		LOGTEXT(_L8("[Ltsy CallControl] Parse call id of the call Failing"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   234
		return;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   235
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   236
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   237
	//Parse call id success
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   238
	TLtsyCallInformation& callinfo(iPhoneGlobals.GetCallInfoManager().GetCallInformationByCallId(nVal));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   239
	callinfo.SetCallIdIsUsedInfo(TLtsyCallInformation::EUsed);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   240
	callinfo.SetCallId(nVal);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   241
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   242
	TBool bSuccess(ETrue);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   243
	for (TInt n = 2; bSuccess && n < nCount; n++)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   244
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   245
		//Direction Call
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   246
		if (n == 2)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   247
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   248
			tLex.Assign(array[n]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   249
			if (tLex.Val(nVal) == KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   250
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   251
				if (TLtsyCallInformation::EMoCall == nVal)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   252
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   253
					callinfo.SetCallDirection(TLtsyCallInformation::EMoCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   254
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   255
				else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   256
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   257
					callinfo.SetCallDirection(TLtsyCallInformation::EMtCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   258
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   259
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   260
			else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   261
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   262
				bSuccess = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   263
				LOGTEXT(_L8("[Ltsy CallControl] Parse direction call Failing"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   264
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   265
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   266
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   267
		//State of the Call
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   268
		if (n == 3)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   269
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   270
			tLex.Assign(array[n]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   271
			if (tLex.Val(nVal) == KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   272
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   273
				if (TLtsyCallInformation::EInComingCall == nVal)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   274
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   275
					callinfo.SetCallState(TLtsyCallInformation::EInComingCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   276
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   277
				else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   278
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   279
					callinfo.SetCallState(TLtsyCallInformation::EWaitingCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   280
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   281
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   282
			else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   283
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   284
				bSuccess = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   285
				LOGTEXT(_L8("[Ltsy CallControl] Parse state of the call Failing"));				
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   286
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   287
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   288
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   289
		//Teleservice
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   290
		if (n == 4)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   291
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   292
			tLex.Assign(array[n]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   293
			if (tLex.Val(nVal) == KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   294
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   295
				if (TLtsyCallInformation::EVoiceCall == nVal)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   296
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   297
					callinfo.SetCallMode(TLtsyCallInformation::EVoiceCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   298
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   299
				else if (TLtsyCallInformation::EDataCall == nVal)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   300
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   301
					callinfo.SetCallMode(TLtsyCallInformation::EDataCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   302
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   303
				else if (TLtsyCallInformation::EFaxCall == nVal)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   304
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   305
					callinfo.SetCallMode(TLtsyCallInformation::EFaxCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   306
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   307
				else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   308
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   309
					callinfo.SetCallMode(TLtsyCallInformation::EUnKnowCall);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   310
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   311
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   312
			else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   313
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   314
				bSuccess = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   315
				LOGTEXT(_L8("[Ltsy CallControl] Parse teleservice Failing"));					
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   316
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   317
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   318
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   319
		//multiparty
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   320
		if (n == 5)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   321
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   322
			tLex.Assign(array[n]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   323
			if (tLex.Val(nVal) == KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   324
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   325
				if (TLtsyCallInformation::ENotConference == nVal)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   326
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   327
					callinfo.SetConferenceCall(TLtsyCallInformation::ENotConference);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   328
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   329
				else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   330
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   331
					callinfo.SetConferenceCall(TLtsyCallInformation::EIsConference);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   332
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   333
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   334
			else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   335
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   336
				bSuccess = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   337
				LOGTEXT(_L8("[Ltsy CallControl] Parse multiparty Failing"));				
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   338
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   339
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   340
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   341
		//telenum
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   342
		if (n == 6)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   343
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   344
			callinfo.SetMobileTelNum(array[n]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   345
			}		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   346
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   347
		//type of address
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   348
		if (n == 7)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   349
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   350
			tLex.Assign(array[n]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   351
			if (tLex.Val(nVal) == KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   352
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   353
				callinfo.SetAddressType(nVal);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   354
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   355
			else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   356
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   357
				bSuccess = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   358
				LOGTEXT(_L8("[Ltsy CallControl] Parse type of address Failing"));				
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   359
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   360
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   361
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   362
		//alpah
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   363
		if (n == 8)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   364
			{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   365
			callinfo.SetMobileName(array[n]);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   366
			}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   367
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   368
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   369
	//Parse failer
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   370
	if (!bSuccess)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   371
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   372
		iPhoneGlobals.GetCallInfoManager().ResetCallInformationByCallId(callinfo.GetCallId());
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   373
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   374
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   375
	CleanupStack::PopAndDestroy(1);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   376
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   377
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   378
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   379
// CATClcc::ParseResponseL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   380
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   381
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   382
void CATClcc::ParseResponseL(const TDesC8& aResponseBuf)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   383
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   384
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::ParseResponseL()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   385
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   386
	//Process expecting string +CLCC : *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   387
	if (aResponseBuf.Match(KLtsyCLCCMatchString) == 0)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   388
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   389
		ParseCLCCResponseL(aResponseBuf);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   390
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   391
	else if (aResponseBuf.Match(KLtsyOkString) == 0) //Process expecting string OK
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   392
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   393
		iATResult = KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   394
		iProcessStates = EProcessOK;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   395
		iOKFounded = ETrue;		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   396
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   397
	else if (aResponseBuf.Match(KLtsyErrorString) == 0) //Process expecting string ERROR
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   398
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   399
		iATResult = KErrArgument;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   400
		iProcessStates = EProcessError;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   401
		iOKFounded = EFalse;		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   402
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   403
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   404
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   405
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   406
// CATClcc::HandleIOError
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   407
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   408
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   409
void CATClcc::HandleIOError()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   410
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   411
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::HandleIOError()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   412
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   413
	iProcessStates = EProcessError;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   414
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   415
	if (iQueryCallInfoNotify != NULL)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   416
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   417
		iQueryCallInfoNotify->QueryCallInformationComplete(iIOStatus);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   418
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   419
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   420
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   421
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   422
// CATClcc::HandleResponseError
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   423
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   424
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   425
void CATClcc::HandleResponseError()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   426
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   427
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::HandleResponseError()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   428
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   429
	if (iQueryCallInfoNotify != NULL)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   430
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   431
		iQueryCallInfoNotify->QueryCallInformationComplete(iATResult);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   432
		}	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   433
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   434
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   435
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   436
// CATClcc::HandleCLCCComplete
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   437
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   438
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   439
void CATClcc::HandleCLCCComplete()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   440
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   441
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::HandleCLCCComplete()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   442
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   443
	if (iQueryCallInfoNotify != NULL)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   444
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   445
		iQueryCallInfoNotify->QueryCallInformationComplete(KErrNone);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   446
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   447
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   448
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   449
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   450
// CATClcc::Complete
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   451
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   452
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   453
void CATClcc::Complete()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   454
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   455
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::Complete()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   456
	LOGTEXT2(_L8("[Ltsy CallControl] iIOStatus = %d"), iIOStatus);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   457
	LOGTEXT2(_L8("[Ltsy CallControl] iATResult = %d"), iATResult);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   458
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   459
	//Remove Ative Command and stop timer
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   460
	CAtCommandBase::Complete();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   461
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   462
	//Let other command can use I/O port
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   463
	iPhoneGlobals.iEventSignalActive = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   464
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   465
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   466
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   467
// CATClcc::EventSignal
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   468
// other items were commented in a header
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   469
// ---------------------------------------------------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   470
void CATClcc::EventSignal(TAtEventSource /*aEventSource*/, TInt aStatus)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   471
	{  
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   472
	LOGTEXT(_L8("[Ltsy CallControl] Starting CATClcc::EventSignal()"));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   473
	LOGTEXT2(_L8("[Ltsy CallControl] aEventSource = %d\taStatus = %d"),aStatus);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   474
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   475
	iIOStatus = aStatus;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   476
	if (iIOStatus != KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   477
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   478
		HandleIOError();	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   479
		Complete();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   480
		return;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   481
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   482
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   483
	switch (iATStep)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   484
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   485
		case EATWaitForWriteComplete:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   486
			iATStep = EATReadComplete;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   487
			break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   488
			
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   489
		case EATReadComplete:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   490
			ClearCurrentLine();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   491
			if (iATResult == KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   492
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   493
				if (iOKFounded)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   494
					{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   495
					HandleCLCCComplete();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   496
					Complete();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   497
					}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   498
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   499
			else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   500
				{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   501
				HandleResponseError();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   502
				Complete();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   503
				}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   504
			break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   505
			
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   506
		default:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   507
			break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   508
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   509
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   510
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   511
//End of file