BIOexample.h
上传用户:sempras
上传日期:2007-03-04
资源大小:821k
文件大小:4k
源码类别:

Symbian

开发平台:

C/C++

  1. /*
  2.         BIOexample.H - header file for BIOexample application
  3.         C++ implementation
  4. */
  5. #ifndef __BIOEXAMPLE_H__
  6. #define __BIOEXAMPLE_H__
  7. // INCLUDES
  8. #if !defined(__SENDAS_H__)
  9. #include <sendas.h>                             // for MSendAsObserver
  10. #endif
  11. #if !defined(__COECNTRL_H__)
  12. #include <coecntrl.h>                           // for CCoeControl
  13. #endif
  14. #if !defined(__EIKDOC_H__)
  15. #include <eikdoc.h>                             // for CEikDocument
  16. #endif
  17. #if !defined(__EIKAPP_H__) 
  18. #include <eikapp.h>                             // for CEikApplication
  19. #endif
  20. #if !defined(__EIKAPPUI_H__)
  21. #include <eikappui.h>                           // for CEikAppUi
  22. #endif
  23. //CONSTANTS
  24. // FORWARD DECLARATIONS
  25. class CEikLabel;
  26. class CRichText;
  27. class CParaFormatLayer;
  28. class CCharFormatLayer;
  29. class CSendAppUi;
  30. // CLASS DEFINITIONS
  31. //
  32. //  CBIOexampleContainer
  33. //  Class used for creating a container for the application view
  34. //
  35. class CBIOexampleContainer : public CCoeControl
  36.     {
  37.     public:
  38.         ~CBIOexampleContainer();                                     
  39.         void ConstructL(TDes& text, TDes& sender);                                          
  40.         void SizeChanged();                                         // Function for calculating control layout
  41.         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); // Function for key event handling
  42.     protected:
  43.         TInt CountComponentControls() const;                        // Method for returning the number of component controls
  44.         CCoeControl* ComponentControl(TInt aIndex) const;           // Method for returning component control by index number
  45.     
  46.     private:
  47.         void ConstructContainerControlL();                          // Construct the container control
  48.         void ConstructComponentControlL(TDes& text, TDes& sender);  // Construct the component control
  49.         void Draw(const TRect& aRect) const;                        // Method for drawing the control area
  50.     
  51.     private:
  52.         CEikLabel* iComponentControl;                               // Pointer to component control of type CEikLabel
  53.         CEikLabel* iSender;
  54.     };
  55. //
  56. //  CBIOexampleAppUi
  57. //
  58. class CBIOexampleAppUi : public CEikAppUi, public MSendAsObserver
  59.     {
  60.     public:
  61.         ~CBIOexampleAppUi();
  62.         TBool ProcessCommandParametersL(TApaCommand aCommand,TFileName& aDocumentName,const TDesC8& aTail);
  63.     protected:        // from CEikAppui 
  64.         void HandleCommandL(TInt aCommand); 
  65.     protected:   // from MSendAsObserver
  66. TBool CapabilityOK(TUid aCapabilty, TInt aResponse);
  67.     private:
  68.         void ConstructL();
  69.         void CompleteConstructL();
  70.         void ReadMessageL(TDes& aText, TDes& aSender);
  71.         void SendMessageL();
  72.         void DeleteMessageL(TMsvId aId);
  73.         
  74.     private:
  75.         CBIOexampleContainer* iContainerControl;      // Pointer to the control created by the constructor
  76.         TMsvId* iId;                                  // 韓coming BIO message TMsvId
  77.         TBool iNormalStart;                           // Flag that indicates if app was started without command line params
  78.         CRichText* messageBodyContent;                // outgoing message body
  79.         CParaFormatLayer* paraFormatLayer;
  80.         CCharFormatLayer* charFormatLayer;
  81.         CSendAppUi* sendAppUi;                        // SendUI object that is used to trigger the messaging app
  82.     };
  83. //
  84. //  CBIOexampleDocument
  85. //
  86. class CBIOexampleDocument : public CEikDocument 
  87.     {
  88.     public:
  89.         CBIOexampleDocument(CEikApplication& aApp);
  90.     protected:
  91.         CEikAppUi* CreateAppUiL();
  92.     };
  93. //
  94. //  CBIOexampleApplication
  95. //
  96. class CBIOexampleApplication : public CEikApplication
  97.     {
  98.     private:        //From CEikApplication
  99.         CApaDocument* CreateDocumentL();
  100.         TUid AppDllUid() const;
  101.     };
  102. #endif  //__BIOEXAMPLE_H__
  103. //End of File