00001 #ifndef CTELEPHONYMONITOR_H
00002 #define CTELEPHONYMONITOR_H
00003
00004 #include <e32base.h>
00005 #include <Etel3rdParty.h>
00006
00007 class MTelephonyStatusObserver {
00008 public:
00009 virtual void TelephonyStatusChangedL( CTelephony::TCallStatus aStatus, const TDesC& aNumber ) = 0;
00010 virtual void ErrorOccuredL( TInt aError ) = 0;
00011 };
00012
00013 class CTelephonyMonitor : public CActive
00014 {
00015 public:
00016 CTelephonyMonitor( MTelephonyStatusObserver&, CTelephony* );
00017 ~CTelephonyMonitor();
00018
00019 void StartListening();
00020 CTelephony::TTelNumber GetNumber();
00021
00022 private:
00023 void ConstructL();
00024
00025 private:
00026 void RunL();
00027 void DoCancel();
00028
00029 private:
00030 CTelephony* iTelephony;
00031 CTelephony::TCallStatusV1 iLineStatus;
00032 CTelephony::TCallStatusV1Pckg iLineStatusPkg;
00033 MTelephonyStatusObserver& iTelephonyStatusObserver;
00034 CTelephony::TCallInfoV1 iCallInfoV1;
00035 CTelephony::TRemotePartyInfoV1 iRemotePartyInfoV1;
00036 CTelephony::TCallSelectionV1 iCallSelectionV1;
00037 CTelephony::TRemotePartyInfoV1Pckg iRemotePartyInfoV1Pckg;
00038 CTelephony::TCallSelectionV1Pckg iCallSelectionV1Pckg;
00039 CTelephony::TCallInfoV1Pckg iCallInfoV1Pckg;
00040 };
00041
00042 #endif