cbs/cbsui/UiSrc/CCbsUiappDocument.cpp
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     1 /*
       
     2 * Copyright (c) 2002 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 the CCbsUiappDocument class.
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDES
       
    22 #include <RCbs.h>
       
    23 #include "CCbsUiappDocument.h"
       
    24 #include "CCbsUiappAppUi.h"
       
    25 #include "RCbsUi.h"
       
    26 
       
    27 
       
    28 
       
    29 // ================= MEMBER FUNCTIONS =======================
       
    30 //
       
    31 
       
    32 CCbsUiappDocument::CCbsUiappDocument( CEikApplication& aApp ) : 
       
    33     CEikDocument(aApp) 
       
    34     { 
       
    35     }
       
    36 
       
    37 void CCbsUiappDocument::ConstructL()
       
    38     {
       
    39     iServer = new (ELeave) RCbsUi;
       
    40     // Create connection to the server.
       
    41     User::LeaveIfError( iServer->Connect() );
       
    42     }
       
    43 
       
    44 CCbsUiappDocument* CCbsUiappDocument::NewL( CEikApplication& aApp )
       
    45     {
       
    46     CCbsUiappDocument* self = new( ELeave ) CCbsUiappDocument( aApp );
       
    47     CleanupStack::PushL( self );
       
    48     self->ConstructL();
       
    49     CleanupStack::Pop();  // self
       
    50     return self;
       
    51     }
       
    52 
       
    53 CCbsUiappDocument::~CCbsUiappDocument()
       
    54     {
       
    55     delete iServer;
       
    56     }
       
    57 
       
    58 CEikAppUi* CCbsUiappDocument::CreateAppUiL()
       
    59     {
       
    60     return new (ELeave) CCbsUiappAppUi( *iServer );
       
    61     }
       
    62 
       
    63 
       
    64 //  End of File