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