clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditor.cpp
branchRCL_3
changeset 30 bd7edf625bdd
parent 0 f979ecb2b13e
equal deleted inserted replaced
29:12af337248b1 30:bd7edf625bdd
       
     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:   This is the source file for the CClockAlarmEditor class.
       
    15 *
       
    16 */
       
    17 
       
    18 // System includes
       
    19 #include <e32cmn.h>
       
    20 #include <avkon.rsg>
       
    21 #include <clock.rsg>
       
    22 #include <akntitle.h>
       
    23 #include <eikspane.h>
       
    24 #include <aknpopupsettingpage.h>
       
    25 #include <StringLoader.h>
       
    26 #include <wakeupalarm.h>
       
    27 #include <bautils.h>
       
    28 #include <clockalarmeditor.h>
       
    29 
       
    30 // User includes
       
    31 #include "clockalarmeditorimpl.h"
       
    32 #include "clock_debug.h"
       
    33 #include "clock.hrh"
       
    34 
       
    35 // ---------------------------------------------------------
       
    36 // CClockAlarmEditor::NewL
       
    37 // rest of the details are commented in the header
       
    38 // ---------------------------------------------------------
       
    39 //
       
    40 EXPORT_C CClockAlarmEditor* CClockAlarmEditor::NewL( TAlarmId aExistingAlarmId )
       
    41     {
       
    42 	__PRINTS( "CClockAlarmEditor::NewL - Entry" );
       
    43 
       
    44     CClockAlarmEditor* self = new( ELeave ) CClockAlarmEditor();
       
    45     
       
    46     CleanupStack::PushL( self );
       
    47     self->ConstructL( aExistingAlarmId );
       
    48     CleanupStack::Pop( self );
       
    49 	
       
    50 	__PRINTS( "CClockAlarmEditor::NewL - Exit" );
       
    51     
       
    52     return self;
       
    53     }
       
    54 
       
    55 // ---------------------------------------------------------
       
    56 // CClockAlarmEditor::~CClockAlarmEditor
       
    57 // rest of the details are commented in the header
       
    58 // ---------------------------------------------------------
       
    59 //
       
    60 EXPORT_C CClockAlarmEditor::~CClockAlarmEditor()
       
    61     {
       
    62 	__PRINTS( "CClockAlarmEditor::~CClockAlarmEditor - Entry" );
       
    63 	
       
    64 	// No implementation yet.
       
    65 	
       
    66     __PRINTS( "CClockAlarmEditor::~CClockAlarmEditor - Exit" );
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------
       
    70 // CClockAlarmEditor::LaunchL
       
    71 // rest of the details are commented in the header
       
    72 // ---------------------------------------------------------
       
    73 //
       
    74 EXPORT_C TInt CClockAlarmEditor::LaunchL()
       
    75     {
       
    76     __PRINTS( "CClockAlarmEditor::LaunchL - Entry" );
       
    77     
       
    78 	// Launch the editor.
       
    79     TInt returnVal( iClockAlarmEditorImpl->ExecuteLD() );
       
    80 	
       
    81     if( KErrNone != returnVal &&
       
    82         EClockAlarmExit != returnVal &&
       
    83         EClockAlarmDelete != returnVal &&
       
    84         EClockAlarmDiscardChanges != returnVal ) 
       
    85         {
       
    86         __PRINTS( "CClockAlarmEditor::LaunchL - Exit" );
       
    87         
       
    88         // Return the value of the new alarm id.
       
    89         return iAlarmId;
       
    90         }
       
    91     
       
    92     __PRINTS( "CClockAlarmEditor::LaunchL - Exit" );
       
    93     
       
    94     return returnVal;
       
    95     }
       
    96 
       
    97 // ---------------------------------------------------------
       
    98 // CClockAlarmEditor::ConstructL
       
    99 // rest of the details are commented in the header
       
   100 // ---------------------------------------------------------
       
   101 //
       
   102 void CClockAlarmEditor::ConstructL( TAlarmId aExistingAlarmId )
       
   103     {
       
   104 	__PRINTS( "CClockAlarmEditor::ConstructL - Entry" );
       
   105 	
       
   106 	iAlarmId = aExistingAlarmId;
       
   107 	
       
   108 	// Construct the alarm editor implementation.
       
   109 	iClockAlarmEditorImpl = CClockAlarmEditorImpl::NewL( iAlarmId );
       
   110 		
       
   111 	__PRINTS( "CClockAlarmEditor::ConstructL - Exit" );
       
   112     }
       
   113 
       
   114 // ---------------------------------------------------------
       
   115 // CClockAlarmEditor::CClockAlarmEditor
       
   116 // rest of the details are commented in the header
       
   117 // ---------------------------------------------------------
       
   118 //
       
   119 CClockAlarmEditor::CClockAlarmEditor()
       
   120     {
       
   121 	__PRINTS( "CClockAlarmEditor::CClockAlarmEditor - Entry" );
       
   122 	
       
   123     // No implementation yet.
       
   124 	
       
   125 	__PRINTS( "CClockAlarmEditor::CClockAlarmEditor - Exit" );
       
   126     }
       
   127 
       
   128 // End of file