camerauis/cameraapp/generic/src/CamNewFileService.cpp
branchRCL_3
changeset 16 53c8aa5d97a3
parent 0 1ddebce53859
child 22 f54ad444594d
equal deleted inserted replaced
15:bf64cebf4673 16:53c8aa5d97a3
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    67   {
    67   {
    68   PRINT( _L("Camera => ~CCamNewFileService") );
    68   PRINT( _L("Camera => ~CCamNewFileService") );
    69   if ( !iCompleted && iObserver )
    69   if ( !iCompleted && iObserver )
    70     {	    
    70     {	    
    71     TRAP_IGNORE( iObserver->HandleCompletedNewServiceL( EFalse ) );
    71     TRAP_IGNORE( iObserver->HandleCompletedNewServiceL( EFalse ) );
       
    72     CCamAppUi* appUi = static_cast< CCamAppUi* >( CEikonEnv::Static()->EikAppUi() );
       
    73     if ( appUi )
       
    74         {
       
    75         // Tell appui 'this' is not valid MCamEmbeddedObserver pointer anymore
       
    76         appUi->SetEmbeddedObserver( NULL );
       
    77         }
    72     }
    78     }
    73   PRINT( _L("Camera <= ~CCamNewFileService") );
    79   PRINT( _L("Camera <= ~CCamNewFileService") );
    74   }
    80   }
    75     
    81     
    76 // ---------------------------------------------------------------------------
    82 // ---------------------------------------------------------------------------
   151   	}
   157   	}
   152 
   158 
   153   CCamAppUi * appUi =
   159   CCamAppUi * appUi =
   154       static_cast< CCamAppUi* >( CEikonEnv::Static()->EikAppUi() );
   160       static_cast< CCamAppUi* >( CEikonEnv::Static()->EikAppUi() );
   155   appUi->SetRequestedNewFileResolution(requestedResolution);
   161   appUi->SetRequestedNewFileResolution(requestedResolution);
   156   appUi->StartAsServerAppL( this, mode );          
   162   appUi->StartAsServerAppL( this, mode ); // 'this' is used for MCamEmbeddedObserver pointer          
   157   }
   163   }
   158     	
   164     	
   159 // ---------------------------------------------------------------------------
   165 // ---------------------------------------------------------------------------
   160 // CCamNewFileService::ServiceCompleteL
   166 // CCamNewFileService::ServiceCompleteL
   161 // Receive message from service that file service has completed
   167 // Receive message from service that file service has completed