iaupdate/IAD/ui/src/iaupdateapplication.cpp
changeset 29 26b6f0522fd8
parent 0 ba25891c3a9e
child 33 8110bf1194d1
equal deleted inserted replaced
25:98b66e4fb0be 29:26b6f0522fd8
     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"
    19 
    22 
    20 
    23 IAUpdateApplication::IAUpdateApplication(  int argc, char* argv[] ) :
    21 #include <eikstart.h>
    24     HbApplication( argc, argv ),
    22 #include "iaupdatedocument.h"
    25     mEngine (new IAUpdateEngine),
    23 #include "iaupdateapplication.h"
    26     mMainWindow (new IAUpdateMainWindow())
    24 #include "iaupdateserver.h"
    27     {
    25 
    28     
    26 
    29     // Connect view change signals to the view change slots
    27 // ---------------------------------------------------------
    30     connect(&(*mEngine), SIGNAL(toMainView()), &(*mMainWindow), SLOT(toMainView()));
    28 // CAppMngrApp::CreateDocumentL()
    31     connect(&(*mEngine), SIGNAL(refresh(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)),
    29 // Creates CIAUpdateDocumentt object
    32             &(*mMainWindow), SLOT(refreshMainView(const RPointerArray<MIAUpdateNode>&, const RPointerArray<MIAUpdateFwNode>&,int)));
    30 // ---------------------------------------------------------
       
    31 //
       
    32 CApaDocument* CIAUpdateApplication::CreateDocumentL()
       
    33     {  
       
    34     // Create an IAUpdate document, and return a pointer to it
       
    35     CApaDocument* document = CIAUpdateDocument::NewL(*this);
       
    36     return document;
       
    37     }
    33     }
    38 
    34 
    39 
    35 IAUpdateApplication::~IAUpdateApplication()
    40 // ---------------------------------------------------------
       
    41 // CIAUpdateApplication::AppDllUid
       
    42 // Returns application UID
       
    43 // ---------------------------------------------------------
       
    44 //
       
    45 TUid CIAUpdateApplication::AppDllUid() const
       
    46     {
    36     {
    47     // Return the UID for the IAUpdate application
       
    48     return KUidIAUpdateApp;
       
    49     }
    37     }
    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