📄 btpointtopointappview.h
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */
#ifndef __BTPOINTTOPOINTAPPVIEW_H__
#define __BTPOINTTOPOINTAPPVIEW_H__
// INCLUDES
#include <coecntrl.h>
#include <aknlists.h>
#include "Log.h"
// CONSTANTS
const TInt KMaxTIntLen = 8;
const TInt KMessageHeaderLen = 8;
// CLASS DECLARATIONS
/**
* CBTPointToPointAppView
* An instance of the CBTPointToPointAppView View object for the BTPointToPoint
* example application
*/
class CBTPointToPointAppView : public CCoeControl, public MLog
{
public: // Constructors and destructor
/**
* NewL()
* Create a CBTPointToPointAppView object, which will draw itself
* to aRect
* @param aRect the rectangle this view will be drawn to
* @return a pointer to the created instance of
* CBTPointToPointAppView
*/
static CBTPointToPointAppView* NewL( const TRect& aRect );
/**
* NewLC()
* Create a CBTPointToPointAppView object, which will draw
* itself to aRect
* @param aRect the rectangle this view will be drawn to
* @return a pointer to the created instance of
* CBTPointToPointAppView
*/
static CBTPointToPointAppView* NewLC( const TRect& aRect );
/**
* ~CBTPointToPointAppView()
* Destroy the object and release all memory objects
*/
virtual ~CBTPointToPointAppView();
public: // New functions
/**
* ContainsEntries()
* @return ETrue if the list view contains entries
*/
TBool ContainsEntries();
/**
* ClearMessageListL()
* Clear the list of messages.
*/
void ClearMessageListL();
public: // from MLog
/**
* LogL()
* Add an entry to the log.
* @param aText the text of the entry
*/
void LogL( const TDesC& aText );
/**
* LogL()
* Add an entry to the log.
* @param aText the text of the entry
* @param aExtraText extra text to append onto the entry
*/
void LogL( const TDesC& aText, const TDesC& aExtraText );
/**
* LogL()
* Add an entry to the log.
* @param aText the text of the entry
* @param aNumber a number to append onto the entry
*/
void LogL( const TDesC& aText, TInt aNumber );
public: // from CCoeControl
/**
* OfferKeyEventL()
* Offer the key event to the list box
* @param aKeyEvent the key that caused the event
* @param aType the type of event that occured
* @return indicates whether or not the key event
* was used by this control
*/
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
TEventCode aType );
/**
* CountComponentControls()
* Return the number of component controls
* @return the number of component controls
*/
TInt CountComponentControls() const;
/**
* ComponentControl()
* Return a component control
* @param aIndex the index of the control to return
* @return the specified component control
*/
CCoeControl* ComponentControl( TInt aIndex ) const;
private: // Constructors
/**
* ConstructL()
* Perform the second phase construction of a
* CBTPointToPointAppView object
* @param aRect the rectangle this view will be drawn to
*/
void ConstructL( const TRect& aRect );
/**
* CBTPointToPointAppView()
* Perform the first phase of two phase construction
*/
CBTPointToPointAppView();
private: // data
/**
* iListBox the control used to display the results
* Owned by CBTPointToPointAppView
*/
CEikTextListBox* iListBox;
/**
* iMessageList the list of messages to display
* Not owned by CBTPointToPointAppView
*/
CDesCArrayFlat* iMessageList;
/** iMsgIndex the id for the next message in the list */
TInt iMsgIndex;
};
#endif // __BTPOINTTOPOINTAPPVIEW_H__
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -