phoneuis/ussdeditor/src/main.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 12:31:11 +0300
changeset 27 2f8f8080a020
child 45 6b911d05207e
permissions -rw-r--r--
Revision: 201015 Kit: 201018

/*
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*
*/

// INCLUDE FILES
#include <hbapplication.h>
#include <hbmainwindow.h> 
#include <hbview.h>

#include "ussdeditorquery.h"
#include "ussdcomms.h"
#include "tflogger.h"

// ---------------------------------------------------------
// main()
// Entry point function
// Returns: 0: success
// ---------------------------------------------------------
//
int main(int argc, char *argv[])
{
    TFLOGSTRING("USSDEDITOR: main IN")

    // Create application instance
    HbApplication application(argc, argv);
    TFLOGSTRING("USSDEDITOR: main app")
    
    // Create main widow
    HbMainWindow window;
    window.show();
    TFLOGSTRING("USSDEDITOR: main window")
   
    // Add a virtual view and hidden it
    HbView *view = new HbView();
    // TODO: Still show
    view->setViewFlags(HbView::ViewStatusBarHidden);
    view->setViewFlags(HbView::ViewTitleBarHidden);
    window.addView(view);
    TFLOGSTRING("USSDEDITOR: main addView")

    // Create CUssdComms - ussd client
    CUssdComms *ussdComms = new CUssdComms(view);
    TFLOGSTRING("USSDEDITOR: main ussdComms")
    
    // Create HbInputDialog
    UssdEditorQuery *query = new UssdEditorQuery(*ussdComms);
    query->show();
    TFLOGSTRING("USSDEDITOR: main query")
   
    // Execute application loop
    int result = application.exec();
    TFLOGSTRING2("USSDEDITOR: main application OUT %d", result)
    delete query;
    query = 0;
    return result;
}

// End of file