examples/Telephony/ETel3rdPartyExample/Shared/CBaseMenuSync.cpp

00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #include "CBaseMenuSync.h"
00017 
00023 void CBaseMenuSync::CompleteOwnRequest(TInt aErr)
00024         {
00025         TRequestStatus* s = &iStatus;
00026         
00027         // Complete an asynchronous request
00028         User::RequestComplete(s, aErr);
00029         }
00030 
00035 void CBaseMenuSync::Start()
00036         {
00037         PostOwnRequest();
00038         SetActive();
00039         CompleteOwnRequest(KErrNone);
00040         }
00041 
00045 void CBaseMenuSync::PostOwnRequest()
00046         {
00047         iStatus = KRequestPending;
00048         }
00049 
00053 void CBaseMenuSync::Terminate()
00054         {
00055         iState = EEnd;
00056         CompleteOwnRequest(KErrNone);
00057         }
00058 
00064 CBaseMenuSync::CBaseMenuSync(CConsoleBase& aConsole)
00065         : CActive(EPriorityUserInput),
00066           iState(EStart),
00067           iConsole(&aConsole)
00068         {
00069         CActiveScheduler::Add(this);
00070         }
00071 
00075 void CBaseMenuSync::ExecComplete()
00076         {
00077         SetActive();
00078         CompleteOwnRequest(KErrNone);
00079         }
00080 
00084 void CBaseMenuSync::ConstructL()
00085         {
00086         iTelephony = CTelephony::NewL();
00087         }
00088 
00092 CBaseMenuSync::~CBaseMenuSync()
00093         {
00094         delete iTelephony;
00095         }

Generated by  doxygen 1.6.2