⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smscryptosymbiancppuilistbox.h

📁 symbian 发送短信例子 S60 SMS Sample
💻 H
字号:
/*
* ============================================================================
*  Name     : SMSCryptoSymbianCppUIListBox.h
*  Part of  : Open C SMS Crypto Example
*  Created  : 05/25/2007 by Forum Nokia
*  Version  : 1.0
*  Copyright: Nokia Corporation
* ============================================================================
*/

#ifndef SMSCRYPTOSYMBIANCPPUILISTBOX_H
#define SMSCRYPTOSYMBIANCPPUILISTBOX_H

#include <coecntrl.h>
#include <msvapi.h>
#include <mtclreg.h>
#include <smsclnt.h>
#include <badesca.h>

const TUint bufferSize = 110;

class MEikCommandObserver;		
class CAknSingleStyleListBox;
class CEikTextListBox;

/**
 * Container class for SMSCryptoSymbianCppUIListBox
 * 
 * @class	CSMSCryptoSymbianCppUIListBox SMSCryptoSymbianCppUIListBox.h
 */
class CSMSCryptoSymbianCppUIListBox : public CCoeControl, public MMsvSessionObserver
	{
public:
	// constructors and destructor
	CSMSCryptoSymbianCppUIListBox();
	static CSMSCryptoSymbianCppUIListBox* NewL( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver );
	static CSMSCryptoSymbianCppUIListBox* NewLC( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver );
	void ConstructL( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver );
	virtual ~CSMSCryptoSymbianCppUIListBox();

public:
	// from base class CCoeControl
	TInt CountComponentControls() const;
	CCoeControl* ComponentControl( TInt aIndex ) const;
	TKeyResponse OfferKeyEventL( 
			const TKeyEvent& aKeyEvent, 
			TEventCode aType );
	void HandleResourceChange( TInt aType );
	
protected:
	// from base class CCoeControl
	void SizeChanged();

private:
	// from base class CCoeControl
	void Draw( const TRect& aRect ) const;

private:
	void InitializeControlsL();
	void LayoutControls();
	CCoeControl* iFocusControl;
	MEikCommandObserver* iCommandObserver;

public: 
	static void AddListBoxItemL(
			CEikTextListBox* aListBox,
			const TDesC& aString);
	static RArray< TInt >* GetSelectedListBoxItemsLC( CEikTextListBox* aListBox );
	static void DeleteSelectedListBoxItemsL( CEikTextListBox* aListBox );
	CAknSingleStyleListBox* ListBox();
	static void CreateListBoxItemL( TDes& aBuffer, 
			const TDesC& aMainText );
	void AddListBoxResourceArrayItemL( TInt aResourceId );
	void SetupListBoxIconsL();
	TBool HandleMarkableListCommandL( TInt aCommand );
	void GetFolderSMSMessageInformationL(CDesCArrayFlat* arrayAddr, CDesCArrayFlat* arrayMsgBody);
	void GetSMSFromInboxL();
	// From msvapi.h / MMsvSessionObserver
	virtual void HandleSessionEventL(TMsvSessionEvent aEvent,
			TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/);
	TBuf<bufferSize> GetSMSL();

public: 

private: 
	CAknSingleStyleListBox* iListBox;
	CMsvSession* iSession;
	CClientMtmRegistry* iClientMtmReg;
	CSmsClientMtm* iSmsMtm;
	CDesCArrayFlat* iArrayAddr;
	CDesCArrayFlat* iArrayMsgBody;

protected: 

protected: 
	
public: 
	enum TControls
		{
		EListBox,
		
		// add any user-defined entries here...
		
		ELastControl
		};
	enum TListBoxImages
		{
		EListBoxFirstUserImageIndex
		
		};
	};
				
#endif // SMSCRYPTOSYMBIANCPPUILISTBOX_H

⌨️ 快捷键说明

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