--- a/localconnectivityservice/dun/atext/src/DunAtCmdEchoer.cpp Tue Aug 31 16:03:15 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Echoer for AT commands
-*
-*/
-
-#include "DunAtCmdEchoer.h"
-#include "DunDownstream.h"
-#include "DunDebug.h"
-
-// ---------------------------------------------------------------------------
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CDunAtCmdEchoer* CDunAtCmdEchoer::NewL(
- MDunStreamManipulator* aStreamCallback )
- {
- CDunAtCmdEchoer* self = new (ELeave) CDunAtCmdEchoer( aStreamCallback );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CDunAtCmdEchoer::~CDunAtCmdEchoer()
- {
- FTRACE(FPrint( _L("CDunAtCmdEchoer::~CDunAtCmdEchoer()") ));
- ResetData();
- FTRACE(FPrint( _L("CDunAtCmdEchoer::~CDunAtCmdEchoer() complete") ));
- }
-
-// ---------------------------------------------------------------------------
-// Resets data to initial values
-// ---------------------------------------------------------------------------
-//
-void CDunAtCmdEchoer::ResetData()
- {
- FTRACE(FPrint( _L("CDunAtCmdEchoer::ResetData()") ));
- // Internal
- Initialize();
- FTRACE(FPrint( _L("CDunAtCmdEchoer::ResetData() complete") ));
- }
-
-// ---------------------------------------------------------------------------
-// Sends a character to be echoed
-// ---------------------------------------------------------------------------
-//
-TInt CDunAtCmdEchoer::SendEchoCharacter(
- const TDesC8* aInput,
- MDunAtCmdEchoer* aCallback )
- {
- FTRACE(FPrint( _L("CDunAtCmdEchoer::SendEchoCharacter()") ));
- if ( iAtEchoState!=EDunStateIdle || iCallback )
- {
- FTRACE(FPrint( _L("CDunAtCmdEchoer::SendEchoCharacter() (not ready) complete") ));
- return KErrNotReady;
- }
- iStreamCallback->NotifyDataPushRequest( aInput, this );
- iCallback = aCallback;
- iAtEchoState = EDunStateAtCmdEchoing;
- FTRACE(FPrint( _L("CDunDownstream::SendEchoCharacter() complete" ) ));
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CDunAtCmdEchoer::CDunAtCmdEchoer
-// ---------------------------------------------------------------------------
-//
-CDunAtCmdEchoer::CDunAtCmdEchoer( MDunStreamManipulator* aStreamCallback ) :
- iStreamCallback( aStreamCallback )
- {
- Initialize();
- }
-
-// ---------------------------------------------------------------------------
-// CDunAtCmdEchoer::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CDunAtCmdEchoer::ConstructL()
- {
- FTRACE(FPrint( _L("CDunAtCmdEchoer::ConstructL()") ));
- if ( !iStreamCallback )
- {
- FTRACE(FPrint( _L("CDunAtCmdEchoer::ConstructL() complete") ));
- User::Leave( KErrGeneral );
- }
- FTRACE(FPrint( _L("CDunAtCmdEchoer::ConstructL() complete") ));
- }
-
-// ---------------------------------------------------------------------------
-// Initializes this class
-// ---------------------------------------------------------------------------
-//
-void CDunAtCmdEchoer::Initialize()
- {
- // Don't initialize iStreamCallback here (it is set through NewL)
- iCallback = NULL;
- iAtEchoState = EDunStateIdle;
- }
-
-// ---------------------------------------------------------------------------
-// From MDunCompletionReporter.
-// Gets called when data push is complete
-// ---------------------------------------------------------------------------
-//
-void CDunAtCmdEchoer::NotifyDataPushComplete( TBool /*aAllPushed*/ )
- {
- FTRACE(FPrint( _L("CDunAtCmdEchoer::NotifyDataPushComplete()") ));
- MDunAtCmdEchoer* callback = iCallback;
- iCallback = NULL;
- iAtEchoState = EDunStateIdle;
- callback->NotifyEchoComplete();
- FTRACE(FPrint( _L("CDunAtCmdEchoer::NotifyDataPushComplete() complete") ));
- }