📄 ansphonecallmaker.h
字号:
#ifndef __ANSPHONECALLMAKER_H__
#define __ANSPHONECALLMAKER_H__
#include <etel.h>
class MAnsPhoneCallMakerObserver
{
public:
virtual void HandleCallHungUpL() = 0;
};
/**
*
* @class CAnsPhoneCallMaker AnsPhoneCallMaker.h
* @brief This class makes a phone call
*
* An RCall handle is required to make the call. In order to open it, we need a handle on
* an RLine handle. This will have been opened before this class is constructed and is passed
* in as a parameter of the constructor.
*
* The MakeCallL() function is called in order to make the call.
* This uses one of the RCall.DialL() functions. The RunL() function is called when the number
* has been dialled. At this point, we ask the RCall handle to notify us if a change occurs to
* its status, using NotifyStatusChange(). This will result in the RunL() function being
* called when the status has changed. If the status is hanging up or idle, then we close the
* RCall handle.
* The observer is updated when the call has been hung up
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*
*/
class CAnsPhoneCallMaker : public CActive
{
public:
static CAnsPhoneCallMaker* NewL(MAnsPhoneCallMakerObserver& aObserver, RLine& aLine);
~CAnsPhoneCallMaker();
public: // CActive
virtual void RunL();
virtual void DoCancel();
public:
void MakeCallL(const TDesC& aNumber);
private:
// the state of this object governs what happens when the
// StartL() / Stop() / RunL() / DoCancel() functions are called.
enum TState { ENoState, EDialling, EWatching };
private:
CAnsPhoneCallMaker(MAnsPhoneCallMakerObserver& aObserver, RLine& aLine);
void ConstructL();
private:
void StartL();
void Stop();
private:
MAnsPhoneCallMakerObserver& iObserver;
RLine& iLine;
RCall iCall;
RCall::TStatus iCallStatus;
TState iState;
TPtrC iNumber;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -