ctelephonymonitor.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef CTELEPHONYMONITOR_H
  2. #define CTELEPHONYMONITOR_H
  3. #include <e32base.h>
  4. #include <Etel3rdParty.h>
  5. class MTelephonyStatusObserver {
  6. public:
  7. virtual void TelephonyStatusChangedL( CTelephony::TCallStatus aStatus, const TDesC& aNumber ) = 0;
  8. virtual void ErrorOccuredL( TInt aError ) = 0;
  9. };
  10. class CTelephonyMonitor : public CActive
  11. {
  12. public:
  13. CTelephonyMonitor( MTelephonyStatusObserver&, CTelephony* );
  14. ~CTelephonyMonitor();
  15. void StartListening();
  16. CTelephony::TTelNumber GetNumber();
  17. private:
  18. void ConstructL();
  19. private:
  20. void RunL();
  21. void DoCancel();
  22. private:
  23. CTelephony* iTelephony;
  24. CTelephony::TCallStatusV1 iLineStatus;
  25. CTelephony::TCallStatusV1Pckg iLineStatusPkg;
  26. MTelephonyStatusObserver& iTelephonyStatusObserver;
  27. CTelephony::TCallInfoV1 iCallInfoV1;
  28. CTelephony::TRemotePartyInfoV1 iRemotePartyInfoV1;
  29. CTelephony::TCallSelectionV1 iCallSelectionV1;
  30. CTelephony::TRemotePartyInfoV1Pckg iRemotePartyInfoV1Pckg;
  31. CTelephony::TCallSelectionV1Pckg iCallSelectionV1Pckg;
  32. CTelephony::TCallInfoV1Pckg iCallInfoV1Pckg;
  33. };
  34. #endif /* CTELEPHONYMONITOR_H */