From a6c36209241e1ec7b7373eae0dbe01da3a927dae Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 24 Oct 2008 22:23:32 +0200 Subject: [PATCH] Reorded initialization classes. Reorded classes used for symbian app initialization. Classes are now ordered in reverse order of their usage for easier reading. --- src/main/symbian/sdlexe.cpp | 92 ++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 48 deletions(-) diff --git a/src/main/symbian/sdlexe.cpp b/src/main/symbian/sdlexe.cpp index a0c4ae1..5c843ec 100644 --- a/src/main/symbian/sdlexe.cpp +++ b/src/main/symbian/sdlexe.cpp @@ -83,54 +83,6 @@ class CSDLAppUi : public CAknAppUi CIdle* iStarter; }; -//////////////////////////////////////////////////////////////////////////// - -class CSDLDocument : public CEikDocument -{ - public: - CSDLDocument(CEikApplication& aApp) : CEikDocument(aApp) {} - - private: - CEikAppUi* CreateAppUiL() { return new CSDLAppUi; } -}; - -//////////////////////////////////////////////////////////////////////////// - -class CSDLApplication : public CAknApplication -{ - public: - CSDLApplication(); - - private: - CApaDocument* CreateDocumentL() { return new CSDLDocument(*this); } - TUid AppDllUid() const { return iUid; } - - TUid iUid; -}; - -//////////////////////////////////////////////////////////////////////////////////////// - -CSDLApplication::CSDLApplication() -{ - RApaLsSession apa; - User::LeaveIfError(apa.Connect()); - CleanupClosePushL(apa); - User::LeaveIfError(apa.GetAllApps()); - TFileName name = RProcess().FileName(); - TApaAppInfo info; - while(apa.GetNextApp(info) == KErrNone) - { - if(info.iFullName.CompareF(name) == 0) - { - iUid = info.iUid; - break; - } - } - CleanupStack::PopAndDestroy(); -} - -///////////////////////////////////////////////////////////////////////// - CSDLAppUi::~CSDLAppUi() { if(iStarter) @@ -228,6 +180,50 @@ void CSDLAppUi::HandleForegroundEventL(TBool aForeground) CAknAppUi::HandleForegroundEventL(aForeground); } +//////////////////////////////////////////////////////////////////////////// + +class CSDLDocument : public CEikDocument +{ + public: + CSDLDocument(CEikApplication& aApp) : CEikDocument(aApp) {} + + private: + CEikAppUi* CreateAppUiL() { return new CSDLAppUi; } +}; + +//////////////////////////////////////////////////////////////////////// + +class CSDLApplication : public CAknApplication +{ + public: + CSDLApplication(); + + private: + CApaDocument* CreateDocumentL() { return new CSDLDocument(*this); } + TUid AppDllUid() const { return iUid; } + + TUid iUid; +}; + +CSDLApplication::CSDLApplication() +{ + RApaLsSession apa; + User::LeaveIfError(apa.Connect()); + CleanupClosePushL(apa); + User::LeaveIfError(apa.GetAllApps()); + TFileName name = RProcess().FileName(); + TApaAppInfo info; + while(apa.GetNextApp(info) == KErrNone) + { + if(info.iFullName.CompareF(name) == 0) + { + iUid = info.iUid; + break; + } + } + CleanupStack::PopAndDestroy(); +} + //////////////////////////////////////////////////////////////////////// CApaApplication* NewApplication() -- 2.11.4.GIT