uifw/AvKon/src/AknNullService.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Server applications framework: Null service
       
    15  *
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 #include <apgcli.h>
       
    21 #include <eikenv.h>
       
    22 #include <eikappui.h>
       
    23 #include "AknNullServiceImpl.h"
       
    24 
       
    25 // ---------------------------------------------------------
       
    26 //
       
    27 // ---------------------------------------------------------
       
    28 //
       
    29 TUid RAknNullService::ServiceUid() const
       
    30     {
       
    31     return KAknNullServiceUid;
       
    32     }
       
    33 
       
    34 
       
    35 // ---------------------------------------------------------
       
    36 //
       
    37 // ---------------------------------------------------------
       
    38 //
       
    39 EXPORT_C CAknNullService* CAknNullService::NewL(const TUid& aAppUid, MAknServerAppExitObserver* aObserver)
       
    40     {
       
    41     CAknNullService* self = NewLC(aAppUid, aObserver);
       
    42     CleanupStack::Pop(self);
       
    43     return self;
       
    44     }
       
    45 
       
    46 // ---------------------------------------------------------
       
    47 //
       
    48 // ---------------------------------------------------------
       
    49 //
       
    50 CAknNullService* CAknNullService::NewLC(const TUid& aAppUid, MAknServerAppExitObserver* aObserver)
       
    51     {
       
    52     CAknNullServiceImpl* self = new(ELeave) CAknNullServiceImpl();
       
    53     CleanupStack::PushL(self);
       
    54     self->ConstructL(aAppUid, aObserver);
       
    55     return self;
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------
       
    59 //
       
    60 // ---------------------------------------------------------
       
    61 //
       
    62 CAknNullServiceImpl::CAknNullServiceImpl()
       
    63     {
       
    64     }
       
    65 
       
    66 // ---------------------------------------------------------
       
    67 //
       
    68 // ---------------------------------------------------------
       
    69 //
       
    70 CAknNullServiceImpl::~CAknNullServiceImpl()
       
    71     {
       
    72     delete iMonitor;
       
    73     iService.Close();
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------
       
    77 //
       
    78 // ---------------------------------------------------------
       
    79 //
       
    80 void CAknNullServiceImpl::ConstructL(const TUid& aAppUid, MAknServerAppExitObserver* aObserver)
       
    81     {
       
    82     iService.ConnectChainedAppL(aAppUid);
       
    83 
       
    84     if (aObserver)
       
    85         {
       
    86         iMonitor = CApaServerAppExitMonitor::NewL(iService, *aObserver, CActive::EPriorityStandard);
       
    87         }
       
    88     }
       
    89 
       
    90 // End of file.