calendarui/controller/src/calenasynccallback.cpp
branchRCL_3
changeset 30 bd7edf625bdd
parent 29 12af337248b1
equal deleted inserted replaced
29:12af337248b1 30:bd7edf625bdd
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Calendar async callback implementation
    14 * Description:   Calendar async callback implementation
    15  *
    15  *
    16 */
    16 */
       
    17 
    17 
    18 
    18  
    19  
    19  // INCLUDE FILES
    20  // INCLUDE FILES
    20  
    21  
    21 #include "calenasynccallback.h"
    22 #include "calenasynccallback.h"
    22 #include "calendarui_debug.h"
    23 #include "calendarui_debug.h" 
    23 #include "OstTraceDefinitions.h"
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 #include "calenasynccallbackTraces.h"
       
    26 #endif
       
    27  
       
    28 
    24 
    29 
    25 
    30 // ---------------------------------------------------------------------------
    26 // ---------------------------------------------------------------------------
    31 // CalenAsyncCallBack::CalenAsyncCallBack
    27 // CCalenAsyncCallBack::CCalenAsyncCallBack
    32 // C++ constructor
    28 // C++ constructor
    33 // (other items were commented in a header).
    29 // (other items were commented in a header).
    34 // ---------------------------------------------------------------------------
    30 // ---------------------------------------------------------------------------
    35 //
    31 //
    36 CalenAsyncCallBack::CalenAsyncCallBack(TCallBack& aCallBack, CActive::TPriority  aPriority,
    32 CCalenAsyncCallBack::CCalenAsyncCallBack(TCallBack& aCallBack, CActive::TPriority  aPriority,
    37                                          CCalenController& aController)
    33                                          CCalenController& aController)
    38     :CAsyncCallBack(aCallBack, aPriority),
    34     :CAsyncCallBack(aCallBack, aPriority),
    39     iController(aController)
    35     iController(aController)
    40     {
    36     {
    41     OstTraceFunctionEntry0( CALENASYNCCALLBACK_CALENASYNCCALLBACK_ENTRY );
    37     TRACE_ENTRY_POINT;
    42      
    38     TRACE_EXIT_POINT;    
    43     OstTraceFunctionExit0( CALENASYNCCALLBACK_CALENASYNCCALLBACK_EXIT );
       
    44     }
    39     }
    45 
    40 
    46 // ---------------------------------------------------------------------------
    41 // ---------------------------------------------------------------------------
    47 // CalenAsyncCallBack::NewL
    42 // CCalenAsyncCallBack::NewL
    48 // First phase construction
    43 // First phase construction
    49 // (other items were commented in a header).
    44 // (other items were commented in a header).
    50 // ---------------------------------------------------------------------------
    45 // ---------------------------------------------------------------------------
    51 //  
    46 //  
    52 CalenAsyncCallBack* CalenAsyncCallBack::NewL(TCallBack& aCallBack, CActive::TPriority  aPriority,
    47 CCalenAsyncCallBack* CCalenAsyncCallBack::NewL(TCallBack& aCallBack, CActive::TPriority  aPriority,
    53                              CCalenController& aController)
    48                              CCalenController& aController)
    54     {
    49     {
    55     OstTraceFunctionEntry0( CALENASYNCCALLBACK_NEWL_ENTRY );
    50     TRACE_ENTRY_POINT;
    56     
    51   
    57     CalenAsyncCallBack* self = new( ELeave ) CalenAsyncCallBack( aCallBack, aPriority , aController );
    52     CCalenAsyncCallBack* self = new( ELeave ) CCalenAsyncCallBack( aCallBack, aPriority , aController );
    58 
    53 
    59     OstTraceFunctionExit0( CALENASYNCCALLBACK_NEWL_EXIT );
    54     TRACE_EXIT_POINT;
    60     return self;
    55     return self;
    61     }
    56     }
    62 // ---------------------------------------------------------------------------
    57 // ---------------------------------------------------------------------------
    63 // CalenAsyncCallBack::~CalenAsyncCallBack
    58 // CCalenAsyncCallBack::~CCalenAsyncCallBack
    64 // C++ Destructor
    59 // C++ Destructor
    65 // (other items were commented in a header).
    60 // (other items were commented in a header).
    66 // ---------------------------------------------------------------------------
    61 // ---------------------------------------------------------------------------
    67 //	
    62 //	
    68 CalenAsyncCallBack::~CalenAsyncCallBack()
    63 CCalenAsyncCallBack::~CCalenAsyncCallBack()
    69 	{
    64 	{
    70 	OstTraceFunctionEntry0( DUP1_CALENASYNCCALLBACK_CALENASYNCCALLBACK_ENTRY );
    65 	TRACE_ENTRY_POINT;
    71 	
    66     TRACE_EXIT_POINT;
    72 	OstTraceFunctionExit0( DUP1_CALENASYNCCALLBACK_CALENASYNCCALLBACK_EXIT );
       
    73 	}
    67 	}
    74 
    68 
    75 // ---------------------------------------------------------------------------
    69 // ---------------------------------------------------------------------------
    76 // CalenAsyncCallBack::BaseConstructL
    70 // CCalenAsyncCallBack::BaseConstructL
    77 // (other items were commented in a header).
    71 // (other items were commented in a header).
    78 // ---------------------------------------------------------------------------
    72 // ---------------------------------------------------------------------------
    79 //
    73 //
    80 void CalenAsyncCallBack::BaseConstructL()
    74 void CCalenAsyncCallBack::BaseConstructL()
    81 	{
    75 	{
    82 	OstTraceFunctionEntry0( CALENASYNCCALLBACK_BASECONSTRUCTL_ENTRY );
    76 	TRACE_ENTRY_POINT;
    83 
    77 
    84 	OstTraceFunctionExit0( CALENASYNCCALLBACK_BASECONSTRUCTL_EXIT );
    78     TRACE_EXIT_POINT;
    85 	}
    79 	}
    86 	
    80 	
    87 // ---------------------------------------------------------------------------
    81 // ---------------------------------------------------------------------------
    88 // CalenAsyncCallBack::RunL
    82 // CCalenAsyncCallBack::RunL
    89 // Handle Completion
    83 // Handle Completion
    90 // (other items were commented in a header).
    84 // (other items were commented in a header).
    91 // ---------------------------------------------------------------------------
    85 // ---------------------------------------------------------------------------
    92 //	
    86 //	
    93 void CalenAsyncCallBack::RunL()
    87 void CCalenAsyncCallBack::RunL()
    94 	{
    88 	{
    95 	OstTraceFunctionEntry0( CALENASYNCCALLBACK_RUNL_ENTRY );
    89 	TRACE_ENTRY_POINT;
    96 	
    90 	
    97 	if(iCallBack.CallBack())
    91 	if(iCallBack.CallBack())
    98 	    {
    92 	    {
    99 	    // callback only if any of the command handlers 
    93 	    // callback only if any of the command handlers 
   100 	    // request for continuing the executing command
    94 	    // request for continuing the executing command
   101 	    CallBack();
    95 	    CallBack();
   102 	    }
    96 	    }
   103 	
    97         
   104 	OstTraceFunctionExit0( CALENASYNCCALLBACK_RUNL_EXIT );
    98 	TRACE_EXIT_POINT;
   105 	}
    99 	}
   106 
   100 
   107 
   101