- /*
- MMSExample.H - header file for MMSExample application
- */
- #ifndef __MMSEXAMPLE_H__
- #define __MMSEXAMPLE_H__
- #if !defined(__AKNVIEW_H__)
- #include <aknview.h> // for CAknView
- #endif
- #if !defined(__AKNVIEWAPPUI_H__)
- #include <aknviewappui.h> // for CAknViewAppUi
- #endif
- #if !defined(__EIKAPP_H__)
- #include <eikapp.h> // for CEikApplication
- #endif
- #if !defined(__EIKDOC_H__)
- #include <eikdoc.h> // for CEikDocument
- #endif
- #if !defined(__MSVAPI_H__)
- #include <msvapi.h> // for MMsvSessionObserver
- #endif
- #if !defined(__MMSCLIENT_H__)
- #include <mmsclient.h> // for CMmsClientMtm
- #endif
- // Forward declarations
- class CClientMtmRegistry;
- class CMsvSession;
- //
- // Container class to draw text on screen
- //
- class CMMSExampleContainer : public CCoeControl
- {
- public:
- void ConstructL();
- private:
- void Draw(const TRect& aRect) const;
- };
- //
- // Application View class
- //
- class CMMSExampleAppView : public CAknView
- {
- public:
- static CMMSExampleAppView* NewL();
- static CMMSExampleAppView* NewLC();
- ~CMMSExampleAppView();
- public:
- TUid Id() const;
- protected:
- private:
- void DoActivateL(const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/);
- void DoDeactivate();
- private:
- CMMSExampleAppView();
- void ConstructL();
- private:
- CMMSExampleContainer* iContainer;
- };
- //
- // Application Ui class, this contains all application functionality
- //
- class CMMSExampleAppUi : public CAknViewAppUi, public MMsvSessionObserver
- {
- public:
- void ConstructL();
- ~CMMSExampleAppUi();
- void HandleCommandL(TInt aCommand);
- private:
- void CompleteConstructL();
- void CmdSendL();
- void CmdExitL();
- TBool InitializeCommunicationsL();
- void CreateNewMessageL();
- TBool SendMessageL();
- private: // from MMsvSessionObserver
- void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
- private:
- HBufC* iRecipient; // recipients address
- CMsvSession* iSession; // Client session on the message server
- CMmsClientMtm* iMmsMtm; // Message Type Module (MMS)
- CClientMtmRegistry* iMtmReg; // Mtm client registry for creating new mtms
- };
- //
- // Application document class
- //
- class CMMSExampleDocument : public CEikDocument
- {
- public:
- static CMMSExampleDocument* NewL(CEikApplication& aApp);
- CEikAppUi* CreateAppUiL();
- protected:
- private:
- CMMSExampleDocument(CEikApplication& aApp);
- void ConstructL();
- };
- //
- // Application class
- //
- class CMMSExampleApplication : public CEikApplication
- {
- public:
- TUid AppDllUid() const;
- private:
- CApaDocument* CreateDocumentL();
- };
- #endif // __MMSEXAMPLE_H__