- /*
- GDSMS.H - header file for GDSMS application
- */
- #ifndef __GDSMS_H__
- #define __GDSMS_H__
- #if !defined(__EIKAPP_H__)
- #include <eikapp.h> // for CEikApplication
- #endif
- #if !defined(__EIKDOC_H__)
- #include <eikdoc.h> // for CEikDocument
- #endif
- #if !defined(__EIKAPPUI_H__)
- #include <eikappui.h> // for CEikAppUi
- #endif
- #if !defined(__EIKDIALG_H__)
- #include <eikdialg.h> // for CEikDialog, CCoeControl
- #endif
- #if !defined(__MSVAPI_H__)
- #include <msvapi.h> // for MMsvSessionObserver
- #endif
- // Forward declarations
- class CClientMtmRegistry;
- class CMsvSession;
- class CBaseMtm;
- //
- // A dialog class for entering a gsm number
- //
- class CGDSMSTelNumDialog : public CEikDialog
- {
- public:
- CGDSMSTelNumDialog(TDesC& aRecipientsTelNum);
- private:
- TBool OkToExitL(TInt aButtonId);
- void PreLayoutDynInitL();
- private:
- TDesC* iRecipientsTelNum;
- };
- //
- // Application View class
- //
- class CGDSMSAppView : public CCoeControl
- {
- public:
- static CGDSMSAppView* NewL(const TRect& aRect);
- static CGDSMSAppView* NewLC(const TRect& aRect);
- protected:
- private:
- CGDSMSAppView();
- void ConstructL(const TRect& aRect);
- void Draw(const TRect& aRect) const;
- };
- //
- // Application Ui class, this contains all application functionality
- //
- class CGDSMSAppUi : public CEikAppUi, public MMsvSessionObserver
- {
- public:
- void ConstructL();
- ~CGDSMSAppUi();
- TBool MessageReceivedL(TMsvId aEntryId);
- void HandleCommandL(TInt aCommand);
- protected:
- private:
- void CompleteConstructL();
- void CmdSendL();
- void CmdExitL();
- TBool InitializeCommunicationsL();
- TMsvId CreateNewMessageL();
- TBool SendMessageL();
- void SetEntryL(TMsvId aEntryId);
- TMsvId MoveMessageEntryL(TMsvId aTarget);
- void SetScheduledSendingStateL(CMsvEntrySelection* aSelection);
- TBool DeleteSentEntry(TMsvId aEntryId);
- void DeleteMessagesFromInboxL();
- private: // from MMsvSessionObserver
- void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
- private:
- CGDSMSAppView* iAppView;
- HBufC* iRecipient; // recipients gsm number
- TMsvId iMsvId; // message server entry id
- CMsvSession* iSession; // Client session on the message server
- CBaseMtm* iMtm; // Message Type Module (sms)
- CClientMtmRegistry* iMtmReg; // Mtm client registry for creating new mtms
- };
- //
- // Application document class
- //
- class CGDSMSDocument : public CEikDocument
- {
- public:
- static CGDSMSDocument* NewL(CEikApplication& aApp);
- CEikAppUi* CreateAppUiL();
- protected:
- private:
- CGDSMSDocument(CEikApplication& aApp);
- void ConstructL();
- };
- //
- // Application class
- //
- class CGDSMSApplication : public CEikApplication
- {
- public:
- TUid AppDllUid() const;
- private:
- CApaDocument* CreateDocumentL();
- };
- #endif // __GDSMS_H__