- /*
- BIOexample.H - header file for BIOexample application
- C++ implementation
- */
- #ifndef __BIOEXAMPLE_H__
- #define __BIOEXAMPLE_H__
- // INCLUDES
- #if !defined(__SENDAS_H__)
- #include <sendas.h> // for MSendAsObserver
- #endif
- #if !defined(__COECNTRL_H__)
- #include <coecntrl.h> // for CCoeControl
- #endif
- #if !defined(__EIKDOC_H__)
- #include <eikdoc.h> // for CEikDocument
- #endif
- #if !defined(__EIKAPP_H__)
- #include <eikapp.h> // for CEikApplication
- #endif
- #if !defined(__EIKAPPUI_H__)
- #include <eikappui.h> // for CEikAppUi
- #endif
- //CONSTANTS
- // FORWARD DECLARATIONS
- class CEikLabel;
- class CRichText;
- class CParaFormatLayer;
- class CCharFormatLayer;
- class CSendAppUi;
- // CLASS DEFINITIONS
- //
- // CBIOexampleContainer
- // Class used for creating a container for the application view
- //
- class CBIOexampleContainer : public CCoeControl
- {
- public:
- ~CBIOexampleContainer();
- void ConstructL(TDes& text, TDes& sender);
- void SizeChanged(); // Function for calculating control layout
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); // Function for key event handling
- protected:
- TInt CountComponentControls() const; // Method for returning the number of component controls
- CCoeControl* ComponentControl(TInt aIndex) const; // Method for returning component control by index number
- private:
- void ConstructContainerControlL(); // Construct the container control
- void ConstructComponentControlL(TDes& text, TDes& sender); // Construct the component control
- void Draw(const TRect& aRect) const; // Method for drawing the control area
- private:
- CEikLabel* iComponentControl; // Pointer to component control of type CEikLabel
- CEikLabel* iSender;
- };
- //
- // CBIOexampleAppUi
- //
- class CBIOexampleAppUi : public CEikAppUi, public MSendAsObserver
- {
- public:
- ~CBIOexampleAppUi();
- TBool ProcessCommandParametersL(TApaCommand aCommand,TFileName& aDocumentName,const TDesC8& aTail);
- protected: // from CEikAppui
- void HandleCommandL(TInt aCommand);
- protected: // from MSendAsObserver
- TBool CapabilityOK(TUid aCapabilty, TInt aResponse);
- private:
- void ConstructL();
- void CompleteConstructL();
- void ReadMessageL(TDes& aText, TDes& aSender);
- void SendMessageL();
- void DeleteMessageL(TMsvId aId);
- private:
- CBIOexampleContainer* iContainerControl; // Pointer to the control created by the constructor
- TMsvId* iId; // 韓coming BIO message TMsvId
- TBool iNormalStart; // Flag that indicates if app was started without command line params
- CRichText* messageBodyContent; // outgoing message body
- CParaFormatLayer* paraFormatLayer;
- CCharFormatLayer* charFormatLayer;
- CSendAppUi* sendAppUi; // SendUI object that is used to trigger the messaging app
- };
- //
- // CBIOexampleDocument
- //
- class CBIOexampleDocument : public CEikDocument
- {
- public:
- CBIOexampleDocument(CEikApplication& aApp);
- protected:
- CEikAppUi* CreateAppUiL();
- };
- //
- // CBIOexampleApplication
- //
- class CBIOexampleApplication : public CEikApplication
- {
- private: //From CEikApplication
- CApaDocument* CreateDocumentL();
- TUid AppDllUid() const;
- };
- #endif //__BIOEXAMPLE_H__
- //End of File