emailuis/nmailui/src/main.cpp
author hgs
Fri, 03 Sep 2010 14:07:42 +0300
changeset 66 084b5b1f02a7
parent 57 ae34e1715e21
child 68 83cc6bae1de8
permissions -rw-r--r--
201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
49
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     2
 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     3
 * All rights reserved.
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     4
 * This component and the accompanying materials are made available
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     6
 * which accompanies this distribution, and is available
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     8
 *
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
     9
 * Initial Contributors:
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    10
 * Nokia Corporation - initial contribution.
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    11
 *
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    12
 * Contributors:
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    13
 *
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    14
 * Description:
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    15
 *
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    16
 */
18
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
66
hgs
parents: 57
diff changeset
    18
#include <hbsplashscreen.h>
18
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#include "nmuiheaders.h"
66
hgs
parents: 57
diff changeset
    20
#include "nmapplication.h"
47
hgs
parents: 43
diff changeset
    21
18
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
/*!
49
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    23
    The main function.
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    24
 */
18
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
int main(int argc, char *argv[])
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
{
66
hgs
parents: 57
diff changeset
    27
    // Decide which splash screen to show.
hgs
parents: 57
diff changeset
    28
    if (!XQServiceUtil::isService(argc,argv)) {
hgs
parents: 57
diff changeset
    29
        HbSplashScreen::setScreenId("messagelist_screen");        
49
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    30
    } else {
66
hgs
parents: 57
diff changeset
    31
        QString interfaceName = XQServiceUtil::interfaceName(argc,argv);
hgs
parents: 57
diff changeset
    32
        
hgs
parents: 57
diff changeset
    33
        if (interfaceName == XQI_EMAIL_MESSAGE_SEND || 
hgs
parents: 57
diff changeset
    34
            interfaceName == XQI_URI_VIEW ||
hgs
parents: 57
diff changeset
    35
            interfaceName == XQI_FILE_SHARE) {
hgs
parents: 57
diff changeset
    36
            HbSplashScreen::setScreenId("editor_screen");
hgs
parents: 57
diff changeset
    37
        }
hgs
parents: 57
diff changeset
    38
        else if (interfaceName == XQI_EMAIL_MESSAGE_VIEW) {
hgs
parents: 57
diff changeset
    39
            HbSplashScreen::setScreenId("viewer_screen");
hgs
parents: 57
diff changeset
    40
        }
hgs
parents: 57
diff changeset
    41
        else if (interfaceName == XQI_EMAIL_INBOX_VIEW) {
hgs
parents: 57
diff changeset
    42
            HbSplashScreen::setScreenId("messagelist_screen");
hgs
parents: 57
diff changeset
    43
        }
49
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    44
    }
00c7ae862740 201025_2
hgs
parents: 47
diff changeset
    45
    
66
hgs
parents: 57
diff changeset
    46
    NmApplication app(argc,argv);
hgs
parents: 57
diff changeset
    47
18
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
    int ret = app.exec();
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
    return ret;
578830873419 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
}