📄 smsexampleappui.h
字号:
/*
* ============================================================================
* Name : CSMSExampleAppUi from SMSExampleAppui.h
* Part of : SMSExample
* Created : 13.03.2005 by Forum Nokia
* Description:
* Declares UI class for application. Handles also new SMS message
* interception and capture (observer).
* Version : 1.0
* Copyright: Nokia Corporation
* ============================================================================
*/
#ifndef SMSEXAMPLEAPPUI_H
#define SMSEXAMPLEAPPUI_H
// INCLUDES
#include <aknappui.h>
#include <eikapp.h>
#include <eikdoc.h>
#include <e32std.h>
#include <coeccntx.h>
#include <msvapi.h> // MMsvSessionObserver, CMsvSession, CMsvEntry
#include <aknViewAppUi.h>
#include "SMSExample.hrh"
#include "SMSExampleMtmsEngine.h"
#include "SMSExampleParser.h"
// FORWARD DECLARATIONS
class CSMSExampleRTEContainer;
class CSMSExampleMtmsEngine;
class CLogView;
class CListboxView;
const TInt KSmsMessageLength = 512;
// CLASS DECLARATION
/**
* Application UI class.
*
*/
class CSMSExampleAppUi : public CAknViewAppUi, public MSMSExampleMtmsEngineObserver, public MMsvSessionObserver
{
public: // // Constructors and destructor
/**
* default constructor.
*/
void ConstructL();
/**
* Destructor.
*/
~CSMSExampleAppUi();
public: // New functions
/**
* Query message address (recipient).
* @return Result of a query dialog Execute
*/
TInt GetAddressL();
/**
* Query message body.
* @return Result of a query dialog Execute
*/
TInt QueryMessageL();
/**
* Execute one operation according to ListBox mode.
* @param aMode Mode of the ListBox.
* @param aOriginFolderID Source folder of the operation.
* @param aDestinationFolderID Target folder of the operation.
*/
void QueryMessagesAndExecute(TInt aMode, TMsvId aOriginFolderID,
TMsvId aDestinationFolderID);
private:
/**
* From MEikMenuObserver
*/
void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
/**
* from MMsvSessionObserver. Observe received messages.
*/
virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
/**
* from MMtmsExampleEngineObserver
*/
virtual void HandleMessageSentL(TInt aError);
private:
/**
* From CEikAppUi, takes care of command handling.
* @param aCommand command to be handled
*/
void HandleCommandL(TInt aCommand);
/**
* From CEikAppUi, handles key events.
* @param aKeyEvent Event to handled.
* @param aType Type of the key event.
* @return Response code (EKeyWasConsumed, EKeyWasNotConsumed).
*/
virtual TKeyResponse HandleKeyEventL(
const TKeyEvent& aKeyEvent,TEventCode aType);
private: // Data members
// The application view 1
CLogView* iLogView;
/// The application view 2
CListboxView* iListboxView;
// SMS engine
CSMSExampleMtmsEngine* iEngine;
// Parser that searches phone numbers
CSMSExampleParser* iParser;
// Recipient address
TBuf<EMtmsExampleMaxAddressLength> iAddress;
// Message body
TBuf<KSmsMessageLength> iMessage;
// ETrue is automatic delete is on, EFalse otherwise
TBool iAutomaticDelete;
// Session with the messaging server
CMsvSession* iMsvSession;
// CMsvEntry accesses and acts upon a particular Message Server entry
CMsvEntry* iMsvEntry;
// Id of a new message
TMsvId iNewMessageId;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -