iaupdate/IAD/ui/src/iaupdateapplication.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 0 ba25891c3a9e
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:   This module contains the implementation of CIAUpdateApplication
    14 * Description:   This module contains the implementation of IAUpdateApplication 
    15 *                class member functions.
    15 *                class member functions.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
       
    19 #include "iaupdateapplication.h"
       
    20 #include "iaupdatemainwindow.h"
       
    21 #include "iaupdateengine.h"
       
    22 #include "iaupdatemainview.h"
       
    23 #include "iaupdatesettingdialog.h"
    19 
    24 
    20 
    25 IAUpdateApplication::IAUpdateApplication(  int argc, char* argv[] ) :
    21 #include <eikstart.h>
    26     HbApplication( argc, argv ),
    22 #include "iaupdatedocument.h"
    27     mEngine (new IAUpdateEngine),
    23 #include "iaupdateapplication.h"
    28     mMainWindow (new IAUpdateMainWindow(mEngine))
    24 #include "iaupdateserver.h"
    29     {
    25 
    30     
    26 
    31     // get mainview 
    27 // ---------------------------------------------------------
    32     IAUpdateMainView* mainView = mMainWindow->GetMainView();
    28 // CAppMngrApp::CreateDocumentL()
    33     
    29 // Creates CIAUpdateDocumentt object
    34     // get settig view
    30 // ---------------------------------------------------------
    35     CIAUpdateSettingDialog* settingView = mMainWindow->GetSettingView();
    31 //
    36     
    32 CApaDocument* CIAUpdateApplication::CreateDocumentL()
    37     // Connect view change signals to the view change slots
    33     {  
    38     //connect(&(*mEngine), SIGNAL(toMainView()), &(*mMainWindow), SLOT(toMainView()));
    34     // Create an IAUpdate document, and return a pointer to it
    39     connect(&(*settingView), SIGNAL(toMainView()), &(*mMainWindow), SLOT(toMainView()));
    35     CApaDocument* document = CIAUpdateDocument::NewL(*this);
    40     connect(&(*mainView), SIGNAL(toSettingView()), &(*mMainWindow), SLOT(toSettingView()));
    36     return document;
    41     connect(&(*mEngine), SIGNAL(refresh(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)),
       
    42             &(*mMainWindow), SLOT(refreshMainView(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)));
    37     }
    43     }
    38 
    44 
    39 
    45 IAUpdateApplication::~IAUpdateApplication()
    40 // ---------------------------------------------------------
    46 {
    41 // CIAUpdateApplication::AppDllUid
    47     delete mEngine;    
    42 // Returns application UID
    48 }
    43 // ---------------------------------------------------------
       
    44 //
       
    45 TUid CIAUpdateApplication::AppDllUid() const
       
    46     {
       
    47     // Return the UID for the IAUpdate application
       
    48     return KUidIAUpdateApp;
       
    49     }
       
    50 
       
    51 // ---------------------------------------------------------
       
    52 // CIAUpdateApplication::NewAppServerL
       
    53 // Cretaes an instance of applicayion server class
       
    54 // ---------------------------------------------------------
       
    55 //
       
    56 void CIAUpdateApplication::NewAppServerL( CApaAppServer*& aAppServer )
       
    57     {
       
    58     aAppServer = CIAUpdateServer::NewL();    
       
    59     }
       
    60     
       
    61 	
       
    62 // ================= OTHER EXPORTED FUNCTIONS ==============
       
    63 //
       
    64 // Create an application, and return a pointer to it
       
    65 LOCAL_C CApaApplication* NewApplication()
       
    66     {
       
    67     return new CIAUpdateApplication;
       
    68     }
       
    69 
       
    70 GLDEF_C TInt E32Main()
       
    71     {
       
    72     return EikStart::RunApplication(NewApplication);
       
    73     }
       
    74 
       
    75 // End of File