/*
 * Telefon.h
 *
 * Autor: Pawe Gala
 */

#ifndef TELEFON_H_
#define TELEFON_H_

class CTelefon : public CActive
{
    // ...
        
    private:    // Pola
        // ...
    
        // Dodajemy nowe pole do klasy.
        CActiveSchedulerWait* iActiveSchedulerWait;
};

#endif /* TELEFON_H_ 

/*
 * Telefon.cpp
 *
 * Autor: Pawe Gala
 */

#include "Telefon.h"

CTelefon::~CTelefon()
{
    // ...
    delete iActiveSchedulerWait;
}

void CTelefon::ConstructL()
{
    // ...
    iActiveSchedulerWait = new( ELeave ) CActiveSchedulerWait();
}

HBufC* CTelefon::PobierzIMEISyncL()
{
    // ...
    iTelefon->GetPhoneId( iStatus, iIdentyfikatorPckg );
    SetActive();
    // Zamiast CActiveScheduler::Start() wywoujemy:
    iActiveSchedulerWait->Start();
    // ...
}

void CTelefon::RunL()
{    
    if( iStan == EPobieranieSync )
    {
        // Zamiast CActiveScheduler::Stop() wywoujemy:
        iActiveSchedulerWait->AsyncStop();
    }
    // ...
}
