globalqueryqueryhandlerao.cpp

来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C++ 代码 · 共 94 行

CPP
94
字号
/**
*
* @brief Definition of CGlobalQueryQueryHandlerAO
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
//    Class include
#include "GlobalQueryQueryHandlerAO.h"

// System includes
#include <avkon.hrh> // soft key enumerations

// CONSTANTS

// ================= MEMBER FUNCTIONS =======================

/**
* Destructor.
* Cancels the active object
*/
CGlobalQueryQueryHandlerAO::~CGlobalQueryQueryHandlerAO()
{
    Cancel();
}

/**
* Symbian OS 2nd phase constructor.  Adds the active object to the scheduler.
*/
void CGlobalQueryQueryHandlerAO::ConstructL()
{
    CActiveScheduler::Add(this);
}

/**
* Symbian OS 2 phase constructor.
* Constructs the CGlobalQueryQueryHandlerAO using the constructor and ConstructL
* method, leaving the constructed object on the CleanupStack before returning it.
*
* @param aRect The rectangle for this window
* @return The newly constructed CGlobalQueryQueryHandlerAO
*/
CGlobalQueryQueryHandlerAO* CGlobalQueryQueryHandlerAO::NewLC(MGlobalQueryCloseGameObserver& aCloseGameObserver)
{
    CGlobalQueryQueryHandlerAO* self = new (ELeave) CGlobalQueryQueryHandlerAO(aCloseGameObserver);
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
}

/**
* Symbian OS 2 phase constructor.
* Constructs the CGlobalQueryQueryHandlerAO using the NewLC method, popping
* the constructed object from the CleanupStack before returning it.
*
* @param aRect The rectangle for this window
* @return The newly constructed CGlobalQueryQueryHandlerAO
*/
CGlobalQueryQueryHandlerAO* CGlobalQueryQueryHandlerAO::NewL(MGlobalQueryCloseGameObserver& aCloseGameObserver)
{
    CGlobalQueryQueryHandlerAO* self = CGlobalQueryQueryHandlerAO::NewLC(aCloseGameObserver);
    CleanupStack::Pop(self);
    return self;
}

/**
* Called whenever the active object is cancelled.
*/
void CGlobalQueryQueryHandlerAO::DoCancel()
{

}

/**
* Starts the active object
*/
void CGlobalQueryQueryHandlerAO::Start()
{
    SetActive();
}

/**
* Performs the work of the active object.
* Handles the completion of the global query
*/
void CGlobalQueryQueryHandlerAO::RunL()
{
    if (iStatus == EAknSoftkeyOk)
        iCloseGameObserver.CloseGameL(); // note this call is blocking, so the method should be short running
    Cancel();
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?