uiservicetab/vimpstui/src/cvimpstuicontactselection.cpp
branchRCL_3
changeset 22 3104fc151679
parent 21 2b7283837edb
child 23 9a48e301e94b
equal deleted inserted replaced
21:2b7283837edb 22:3104fc151679
     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:  Implementation for cvimpstuicontactselection ,a contact selection class from pbk
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "cvimpstuicontactselection.h"
       
    20 #include "cvimpstuitabbedview.h"
       
    21 #include "uiservicetabtracer.h"
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 // ================= MEMBER FUNCTIONS =======================
       
    26 
       
    27 // --------------------------------------------------------------------------
       
    28 // CVIMPSTUiContactSelection::NewL
       
    29 // --------------------------------------------------------------------------
       
    30 //
       
    31 CVIMPSTUiContactSelection* CVIMPSTUiContactSelection::NewL(CVIMPSTUiTabbedView& iViewObserver )
       
    32 	{
       
    33 	CVIMPSTUiContactSelection* self = new (ELeave) CVIMPSTUiContactSelection( iViewObserver );
       
    34     return self;
       
    35  	}
       
    36 
       
    37 // --------------------------------------------------------------------------
       
    38 // CVIMPSTUiContactSelection::~CVIMPSTUiContactSelection
       
    39 // --------------------------------------------------------------------------
       
    40 //
       
    41 CVIMPSTUiContactSelection::~CVIMPSTUiContactSelection()
       
    42 	{
       
    43 	Cancel();	
       
    44 	}
       
    45 	
       
    46 // --------------------------------------------------------------------------
       
    47 // CVIMPSTUiContactSelection::CVIMPSTUiContactSelection
       
    48 // --------------------------------------------------------------------------
       
    49 //
       
    50 CVIMPSTUiContactSelection::CVIMPSTUiContactSelection(CVIMPSTUiTabbedView& iViewObserver )
       
    51 : CActive( CActive::EPriorityStandard ),
       
    52 	iViewObserver( iViewObserver )
       
    53 	{
       
    54 	CActiveScheduler::Add( this );	
       
    55 	}
       
    56 	
       
    57 // --------------------------------------------------------------------------
       
    58 // CVIMPSTUiContactSelection::IssueRequest
       
    59 // --------------------------------------------------------------------------
       
    60 //
       
    61 void CVIMPSTUiContactSelection::IssueRequest()
       
    62 	{
       
    63 	TRACER_AUTO;
       
    64 	if( IsActive() )
       
    65 		{
       
    66 		Cancel();	
       
    67 		}
       
    68 	if( !IsActive() )
       
    69 		{
       
    70 		TRequestStatus* status = &iStatus;
       
    71 		User::RequestComplete( status, KErrNone );
       
    72 		SetActive();	
       
    73 		}
       
    74 	}
       
    75 	
       
    76 // --------------------------------------------------------------------------
       
    77 // CVIMPSTUiContactSelection::RunL
       
    78 // --------------------------------------------------------------------------
       
    79 //
       
    80 void CVIMPSTUiContactSelection::RunL()
       
    81 	{
       
    82 	if( iStatus.Int() == 0 )
       
    83 		{
       
    84 		iViewObserver.HandleContactSelectionCompleteL();	
       
    85 		}
       
    86 	}
       
    87 	
       
    88 // --------------------------------------------------------------------------
       
    89 // CVIMPSTUiContactSelection::DoCancel
       
    90 // --------------------------------------------------------------------------
       
    91 //
       
    92 void CVIMPSTUiContactSelection::DoCancel()
       
    93 	{
       
    94 	if( IsActive() )
       
    95 		{
       
    96 		Cancel();	
       
    97 		}
       
    98 	}
       
    99 	
       
   100 // --------------------------------------------------------------------------
       
   101 // CVIMPSTUiContactSelection::RunError
       
   102 // --------------------------------------------------------------------------
       
   103 //
       
   104 TInt CVIMPSTUiContactSelection::RunError( TInt aError )
       
   105 	{
       
   106 	return aError;
       
   107 	}
       
   108 	
       
   109 //end of file