devicediagnostics/devdiagapp/src/devdiagappdocument.cpp
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of diagnostics components
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "devdiagappappui.h"
       
    21 #include "devdiagappdocument.h"
       
    22 #include "devdiagengine.h"
       
    23 
       
    24 // Standard Symbian OS construction sequence
       
    25 CDevDiagAppDocument* CDevDiagAppDocument::NewL(CEikApplication& aApp)
       
    26     {
       
    27     //LOGSTRING("CDevDiagAppDocument* CDevDiagAppDocument::NewL");
       
    28     CDevDiagAppDocument* self = NewLC(aApp);
       
    29     CleanupStack::Pop(self);
       
    30     return self;
       
    31     }
       
    32 
       
    33 CDevDiagAppDocument* CDevDiagAppDocument::NewLC(CEikApplication& aApp)
       
    34     {
       
    35     //LOGSTRING("CDevDiagAppDocument* CDevDiagAppDocument::NewLC");
       
    36     CDevDiagAppDocument* self = new (ELeave) CDevDiagAppDocument(aApp);
       
    37     CleanupStack::PushL(self);
       
    38     self->ConstructL();
       
    39     return self;
       
    40     }
       
    41 
       
    42 void CDevDiagAppDocument::ConstructL()
       
    43     {
       
    44 	iEngine = CDevDiagEngine::NewL();
       
    45     }    
       
    46 
       
    47 CDevDiagAppDocument::CDevDiagAppDocument(CEikApplication& aApp) : CAknDocument(aApp) 
       
    48     {
       
    49     }
       
    50 
       
    51 CDevDiagAppDocument::~CDevDiagAppDocument()
       
    52     {
       
    53 	if ( iEngine )    
       
    54         {
       
    55         delete iEngine;
       
    56         iEngine = NULL;
       
    57         } 
       
    58     }
       
    59 
       
    60 CEikAppUi* CDevDiagAppDocument::CreateAppUiL()
       
    61     {
       
    62     // Create the application user interface, and return a pointer to it,
       
    63     // the framework takes ownership of this object
       
    64     //LOGSTRING("CDevDiagAppDocument::CreateAppUiL");
       
    65     CEikAppUi* appUi = new (ELeave) CDevDiagAppAppUi;
       
    66     return appUi;
       
    67     }
       
    68 
       
    69 
       
    70 CDevDiagEngine& CDevDiagAppDocument::Engine()
       
    71     {
       
    72     //LOGSTRING("CDevDiagEngine& CDevDiagAppDocument::Engine");
       
    73     return *iEngine;
       
    74     }
       
    75 ///@@@KSR: changes for BAD Warnings - Added a new Line.