--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlancbwaiter.cpp Tue Feb 02 02:03:13 2010 +0200
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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: This class implements an active object with callback functionality.
+*
+*/
+
+
+#include "wlancbwaiter.h"
+#include "am_debug.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CWlanCbWaiter::CWlanCbWaiter(
+ const TCallBack& aCallback ) :
+ CActive( CActive::EPriorityStandard ),
+ iCallback( aCallback )
+ {
+ DEBUG( "CWlanCbWaiter::CWlanCbWaiter()" );
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanCbWaiter::ConstructL()
+ {
+ DEBUG( "CWlanCbWaiter::ConstructL()" );
+ CActiveScheduler::Add( this );
+ DEBUG( "CWlanCbWaiter::ConstructL() - done" );
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CWlanCbWaiter* CWlanCbWaiter::NewL(
+ const TCallBack& aCallback )
+ {
+ DEBUG( "CWlanCbWaiter::NewL()" );
+ CWlanCbWaiter* self = new (ELeave) CWlanCbWaiter( aCallback );
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CWlanCbWaiter::~CWlanCbWaiter()
+ {
+ DEBUG( "CWlanCbWaiter::~CWlanCbWaiter()" );
+ Cancel();
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanCbWaiter::IssueRequest()
+ {
+ DEBUG( "CWlanCbWaiter::IssueRequest()" );
+ SetActive();
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TRequestStatus& CWlanCbWaiter::RequestStatus()
+ {
+ DEBUG1( "CWlanCbWaiter::RequestStatus() - iStatus = %d", iStatus.Int() );
+ return iStatus;
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanCbWaiter::RunL()
+ {
+ DEBUG1( "CWlanCbWaiter::RunL() - iStatus = %d", iStatus.Int() );
+
+ iCallback.CallBack();
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+TInt CWlanCbWaiter::RunError(
+ TInt /* aError */ )
+ {
+ DEBUG( "CWlanCbWaiter::RunError()" );
+
+ return KErrNone;
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CWlanCbWaiter::DoCancel()
+ {
+ DEBUG( "CWlanCbWaiter::DoCancel()" );
+ }