outcallview.h

来自「symbian 2rd下可以获取并显示来电号码」· C头文件 代码 · 共 85 行

H
85
字号
#ifndef __OUTCALLVIEW_H__
#define __OUTCALLVIEW_H__

// INCLUDES
#include <coecntrl.h> // CCoeControl
#include "CallEngine.h"

// FORWARD DECLARATIONS

// CLASS DECLARATION
class CEikLabel;
class CCegoViewManager;
class CCallEngine;

/**
*
* @class OutCallView OutCallView.h 
* @brief This is a container class for the information displaying of a out going call. When use call a phone this class will
* display the homepage of the callee.
*
* Copyright (c) BJNNI Ltd 2009.12
* @author Perry Yan 2008.01.19
* @version 1.0
* 
*/

class COutCallView : public CCoeControl, MCoeControlObserver, MCallEngineObserver
   {
    public:
        // Constructor and destructor
        static COutCallView* NewL(const TRect& aRect, const CCoeControl* aParent);
        static COutCallView* NewLC(const TRect& aRect, const CCoeControl* aParent);
        void ConstructL(const TRect& aRect);
        ~COutCallView();

        // Virtual function from MInCallEngineObserver
        virtual void HandleCallChangeL(const RCall::TStatus& aStatus);
        virtual void ShowPhoneNumber(HBufC * aPhoneNumber);

        // New method for this class
        void SetViewManager(CCegoViewManager* aViewManager);
        // Dial function
        void MakeCallL(const TDesC& aNumber);
        inline void SetCallEngine(CCallEngine* aCallEngine);
        void DisplayView(); //
        void ShowCalleePage();

    private:
        // Constructor
        void ConstructL(const TRect& aRect, const CCoeControl* aParent);

        // Method from CCoeControl
        TInt CountComponentControls() const;
        CCoeControl* ComponentControl(TInt aIndex) const;
        void Draw(const TRect& aRect) const;
        void SizeChanged();
        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
        void CalculateRects();
        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);

        // Attributes
        TRect iTopRect;
        TRect iBottomRect;
        CEikLabel* iTopCtrl;
        CEikLabel* iBottomCtrl;
        // Telephony
        CCallEngine* iCallEngine;
        // TPtrC iPhoneNumber;
        HBufC* iPhoneNumber;
        // View Management
        CCegoViewManager* iViewManager;

        // Enumeration
        enum TComponentControls
            {
            ETop = 0,
            EBottom,
            ENumberOfControls
            };
    };

void COutCallView::SetCallEngine(CCallEngine * aCallEngine) { iCallEngine = aCallEngine; }

#endif

⌨️ 快捷键说明

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