accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp
changeset 0 4e1aa6a622a0
child 21 ccb4f6b3db21
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "AccFWUINotifierStubObserver.h"
       
    20 #include "AccFwUiDialogNotifierStub.h"
       
    21 
       
    22 #include "TfAccessoryTestControlTypes.h"
       
    23 
       
    24   	  
       
    25 CAccFWUINotifierStubObserver* CAccFWUINotifierStubObserver::NewL( CAccFwUiDialogNotifierStub* /*aService*/ )
       
    26 {
       
    27 /*	CAccFWUINotifierStubObserver * self = new (ELeave) CAccFWUINotifierStubObserver( aService );
       
    28 	CleanupStack::PushL( self );
       
    29 	
       
    30 	TInt err = self->iSubscribe.Attach( KTFAccessoryTestProperty, KTFAccessoryNotifierMethod );
       
    31     
       
    32 	CActiveScheduler::Add( self );
       
    33 	
       
    34 	
       
    35 	self->iStatus = KRequestPending;
       
    36 	self->iSubscribe.Subscribe( self->iStatus );		
       
    37 	self->SetActive();	
       
    38 	
       
    39 	
       
    40 	CleanupStack::Pop( self );
       
    41 	
       
    42 	return self;			    		     	*/
       
    43         return NULL;
       
    44 }
       
    45                		
       
    46 CAccFWUINotifierStubObserver::CAccFWUINotifierStubObserver( CAccFwUiDialogNotifierStub* aService )
       
    47 	: CActive( EPriorityNormal ), iService( aService )
       
    48 {	
       
    49 }
       
    50         	
       
    51 CAccFWUINotifierStubObserver::~CAccFWUINotifierStubObserver()
       
    52 {
       
    53 	
       
    54 }
       
    55                 
       
    56 void CAccFWUINotifierStubObserver::DoCancel()
       
    57 {
       
    58 	
       
    59 }
       
    60 
       
    61 
       
    62 void CAccFWUINotifierStubObserver::RunL()
       
    63 {
       
    64 /*	TInt retval(KErrNone);	
       
    65     TPckgBuf< TTFAccessoryPublishAndSubscribe > buf;
       
    66 	retval = iSubscribe.Get( KTFAccessoryTestProperty, KTFAccessoryNotifierMethod, buf );	
       
    67 	User::LeaveIfError( retval );			
       
    68 	RArray<TInt> some;
       
    69 	some.Append( buf().iParam1 );
       
    70 	TBool booli( EFalse );
       
    71 	booli = 1 & buf().iParam2;
       
    72 	
       
    73 	//iService->SetObserverSelection( some, booli/*buf().iParam1, buf().iParam2*/ //);
       
    74 /*	
       
    75 	if( !IsActive() )
       
    76 		{
       
    77 		iStatus = KRequestPending;
       
    78 		iSubscribe.Subscribe( iStatus );		
       
    79 		SetActive();		
       
    80 		}	 */
       
    81 }
       
    82 
       
    83 TInt CAccFWUINotifierStubObserver::RunError( TInt /*aError*/ )
       
    84 {
       
    85 	return KErrNone;	
       
    86 }
       
    87 
       
    88 
       
    89