menufw/menufwui/matrixmenu/src/mmnomemory.cpp
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2008 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: Subscribes properties from P&S
       
    15 *
       
    16 */
       
    17 
       
    18 #include "mmnomemory.h"
       
    19 
       
    20 // ---------------------------------------------------------------------------
       
    21 //
       
    22 // ---------------------------------------------------------------------------
       
    23 //
       
    24 CMmNoMemory::CMmNoMemory() :
       
    25     CActive( EPriorityIdle )
       
    26     {
       
    27     }
       
    28 
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 // ---------------------------------------------------------------------------
       
    32 //
       
    33 CMmNoMemory* CMmNoMemory::NewLC()
       
    34     {
       
    35     CMmNoMemory* self = new (ELeave) CMmNoMemory();
       
    36     CleanupStack::PushL( self );
       
    37     self->ConstructL();
       
    38     return self;
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 CMmNoMemory* CMmNoMemory::NewL()
       
    46     {
       
    47     CMmNoMemory* self = CMmNoMemory::NewLC();
       
    48     CleanupStack::Pop( self );
       
    49     return self;
       
    50     }
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 void CMmNoMemory::ConstructL()
       
    57     {
       
    58     CActiveScheduler::Add( this );
       
    59     }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 void CMmNoMemory::Start()
       
    66     {
       
    67     Cancel();
       
    68     TRequestStatus* status = &iStatus;
       
    69     User::RequestComplete( status, KErrNone );
       
    70     SetActive();
       
    71     }
       
    72 
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 // ---------------------------------------------------------------------------
       
    76 //
       
    77 CMmNoMemory::~CMmNoMemory()
       
    78     {
       
    79     Cancel();
       
    80     }
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 //
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 void CMmNoMemory::DoCancel()
       
    87     {
       
    88     }
       
    89 
       
    90 // ---------------------------------------------------------------------------
       
    91 //
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 void CMmNoMemory::RunL()
       
    95     {
       
    96     User::Leave( KErrNoMemory );
       
    97     }
       
    98 
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 // ---------------------------------------------------------------------------
       
   102 //
       
   103 TInt CMmNoMemory::RunError(TInt aError)
       
   104     {
       
   105     return aError;
       
   106     }