src/hbservers/hbsplashgenerator/main.cpp
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 2 06ff229162e9
equal deleted inserted replaced
0:16d8024aca5e 1:f7ac710697a9
    25 
    25 
    26 #include <QMainWindow>
    26 #include <QMainWindow>
    27 #include <QPushButton>
    27 #include <QPushButton>
    28 #include <hbapplication.h>
    28 #include <hbapplication.h>
    29 #include "hbsplashgenerator_p.h"
    29 #include "hbsplashgenerator_p.h"
       
    30 #include "hbsplashdefs_p.h"
    30 
    31 
    31 #if defined(Q_OS_SYMBIAN)
    32 #if defined(Q_OS_SYMBIAN)
    32 #include "hbsplashgen_server_symbian_p.h"
    33 #include "hbsplashgen_server_symbian_p.h"
       
    34 #include <e32std.h>
    33 #include <eikenv.h>
    35 #include <eikenv.h>
    34 #include <apgwgnam.h>
    36 #include <apgwgnam.h>
       
    37 CApaApplication *appFactory()
       
    38 {
       
    39     return new HbSplashGenApplication;
       
    40 }
    35 #endif
    41 #endif
    36 
    42 
    37 int main(int argc, char **argv)
    43 int main(int argc, char **argv)
    38 {
    44 {
    39     HbApplication app(argc, argv, Hb::NoSplash);
       
    40 
       
    41 #if defined(Q_OS_SYMBIAN)
    45 #if defined(Q_OS_SYMBIAN)
       
    46     HbApplication app(appFactory, argc, argv, Hb::NoSplash);
    42     CEikonEnv *env = CEikonEnv::Static();
    47     CEikonEnv *env = CEikonEnv::Static();
    43     if (env) {
    48     if (env) {
    44         CApaWindowGroupName *wgName = CApaWindowGroupName::NewLC(env->WsSession());
    49         CApaWindowGroupName *wgName = CApaWindowGroupName::NewLC(env->WsSession());
    45         env->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNeverAtFront); // avoid coming to foreground
    50         env->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNeverAtFront); // avoid coming to foreground
    46         wgName->SetHidden(ETrue); // hide from FSW, OOM fw, GOOM fw, etc.
    51         wgName->SetHidden(ETrue); // hide from FSW, OOM fw, GOOM fw, etc.
    47         wgName->SetSystem(ETrue); // allow only apps with PowerManagement cap to shut us down
    52         wgName->SetSystem(ETrue); // allow only apps with PowerManagement cap to shut us down
    48         _LIT(KCaption, "HbSplashGenerator");
    53         wgName->SetCaptionL(hbsplash_server_name);
    49         wgName->SetCaptionL(KCaption);
       
    50         wgName->SetAppUid(KNullUid);
    54         wgName->SetAppUid(KNullUid);
    51         wgName->SetWindowGroupName(env->RootWin());
    55         wgName->SetWindowGroupName(env->RootWin());
    52         CleanupStack::PopAndDestroy();
    56         CleanupStack::PopAndDestroy();
       
    57         RThread::RenameMe(hbsplash_server_name);
    53     }
    58     }
       
    59 #else
       
    60     HbApplication app(argc, argv, Hb::NoSplash);
    54 #endif
    61 #endif
    55 
    62 
    56     qDebug("[hbsplashgenerator] initializing generator");
    63     qDebug("[hbsplashgenerator] initializing generator");
    57     HbSplashGenerator gen;
    64     HbSplashGenerator gen;
    58     bool forceRegen = false;
    65     bool forceRegen = false;