examples/Qt/qtnfctags/activewait.cpp

00001 /*
00002 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
00003 * All rights reserved.
00004 * This component and the accompanying materials are made available
00005 * under the terms of "Eclipse Public License v1.0"
00006 * which accompanies this distribution, and is available
00007 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 *
00009 * Initial Contributors:
00010 * Nokia Corporation - initial contribution.
00011 *
00012 * Contributors:
00013 *
00014 * Description:  ActiveWait
00015 *
00016 */
00017 
00018 
00019 #include <utf.h>
00020 #include <e32debug.h>
00021 
00022 #include "activewait.h"
00023 
00024 
00025 CActiveWait* CActiveWait::NewL(NfcTagsDiscoveryPrivate* privateAPI)
00026     {
00027     CActiveWait* self = NewLC(privateAPI);
00028     CleanupStack::Pop( self );
00029     return self;
00030     }
00031 
00032 CActiveWait* CActiveWait::NewLC(NfcTagsDiscoveryPrivate* privateAPI)
00033     {
00034     CActiveWait* self = new (ELeave) CActiveWait(privateAPI);
00035     CleanupStack::PushL( self );
00036     self->ConstructL();
00037     return self;
00038     }
00039 
00040 CActiveWait::~CActiveWait()
00041     {
00042     Cancel();
00043     }
00044 
00045 void CActiveWait::SetActive()
00046     {
00047     CActive::SetActive();
00048     }
00049 
00050 void CActiveWait::RunL()
00051     {
00052     iPrivateAPI->TagOperationCompleted();
00053     }
00054 
00055 void CActiveWait::DoCancel()
00056     {
00057     Cancel();
00058     }
00059 
00060 
00061 CActiveWait::CActiveWait(NfcTagsDiscoveryPrivate* privateAPI) : 
00062         CActive( EPriorityStandard ),
00063         iPrivateAPI(privateAPI)
00064     {
00065     
00066     }
00067 
00068 void CActiveWait::ConstructL()
00069     {    
00070     CActiveScheduler::Add( this );
00071     }

Generated by  doxygen 1.6.2