00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef __EMBEDDED_H__
00017 #define __EMBEDDED_H__
00018 
00019 #include <coeccntx.h>
00020 
00021 #include <apgtask.h>
00022 #include <eikenv.h>
00023 #include <eikappui.h>
00024 #include <eikapp.h>
00025 #include <eikdoc.h>
00026 #include <eikmenup.h>
00027 
00028 #include <ecom.h>
00029 #include <implementationproxy.h>
00030 
00031 _LIT(KExampleText, "Welcome to the embedded application example");
00032 
00033 
00034 class CExampleApplication : public CEikApplication
00035         {
00036 private:
00037         CApaDocument* CreateDocumentL();
00038         TUid AppDllUid() const;
00039 private:
00040         TFileName ResourceFileName() const;
00041 private:
00042         CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); }
00043         };
00044 
00045 
00046 class CExampleAppView : public CCoeControl
00047     {
00048 public:
00049         static CExampleAppView* NewL(const TRect& aRect);
00050         CExampleAppView();
00051         ~CExampleAppView();
00052     void ConstructL(const TRect& aRect);
00053 
00054 private:
00055         void Draw(const TRect& ) const;
00056 private:
00057         HBufC*  iExampleText;
00058     };
00059 
00060 
00061 class CExampleAppUi : public CEikAppUi
00062     {
00063 public:
00064     void ConstructL();
00065         ~CExampleAppUi();
00066 
00067 private:
00068         void HandleCommandL(TInt aCommand);
00069 private:
00070         CCoeControl* iAppView;
00071         };
00072 
00073 
00074 class CExampleDocument : public CEikDocument
00075         {
00076 public:
00077         static CExampleDocument* NewL(CEikApplication& aApp);
00078         CExampleDocument(CEikApplication& aApp);
00079         void ConstructL();
00080 private:
00081         CEikAppUi* CreateAppUiL();
00082         };
00083 
00084 #endif //__EMBEDDED_H__
00085