imfriendlistview.h

来自「国内著名嵌入式培训机构内部资料,内含一些实例代码,包括技术专题书籍」· C头文件 代码 · 共 98 行

H
98
字号
/*
 ============================================================================
 Author	  : hou maoqing
 Version	 : 1.0
 Copyright   : Copyright (c) Hou maoqing 2008
 Mail	: houmqing@163.com
 ============================================================================
 */

#ifndef IMFRIENDLISTVIEW_H
#define IMFRIENDLISTVIEW_H

// INCLUDES
#include <aknview.h>
#include <ImMsg.h>

// CONSTANTS
// UID of view
const TUid KImFriendListViewId = {4};

// FORWARD DECLARATIONS
class CImFriendListContainer;

// CLASS DECLARATION

/**
*  CImFriendListView view class.
* 
*/
class CImFriendListView : public CAknView
    {
    public: // Constructors and destructor

        /**
        * EPOC default constructor.
        */
        void ConstructL();

        /**
        * Destructor.
        */
        ~CImFriendListView();

    public: // Functions from base classes
        
        /**
        * From CAknView returns Uid of View
        * @return TUid uid of the view
        */
        TUid Id() const;

        /**
        * From MEikMenuObserver delegate commands from the menu
        * @param aCommand a command emitted by the menu 
        * @return void
        */
        void HandleCommandL(TInt aCommand);

        /**
        * From CAknView reaction if size change
        * @return void
        */
        void HandleClientRectChange();

    private:

        /**
        * From CAknView activate the view
        * @param aPrevViewId 
        * @param aCustomMessageId 
        * @param aCustomMessage 
        * @return void
        */
        void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
            const TDesC8& aCustomMessage);

        /**
        * From CAknView deactivate the view (free resources)
        * @return void
        */
        void DoDeactivate();
        
        void SendAddDelFriendMessage(int nCmdID,const TDesC& desUserAcc);
        
public:        
        void SendGetFriendListMessage();
        void HandleFriendListMessage(CImMsgBody* pMsgBody);
        void HandleImNotifyFriendStatusChange(CImMsgBody* pMsgBody);

    private: // Data
        CImFriendListContainer* iContainer;
        RPointerArray<HBufC> m_lstFriend;
    };

#endif

// End of File

⌨️ 快捷键说明

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