brandingserver/bsserver/cbsinstallhandler.cpp
branchRCL_3
changeset 21 cfd5c2994f10
parent 11 0b696286a1b2
child 22 113b91e0a2ad
equal deleted inserted replaced
20:eedf17a17c27 21:cfd5c2994f10
     1 /*
     1 /*
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006 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 the License "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".
     8 *
     8 *
     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: CBSInstallhandler.cpp
    14 * Description:  CBSInstallhandler.cpp
    15 *
    15 *
    16 */
    16 */
       
    17 
    17 
    18 
    18 
    19 
    19 //  INCLUDE FILES
    20 //  INCLUDE FILES
    20 #include <apgcli.h>
    21 #include <apgcli.h>
    21 #include <apacmdln.h>
    22 #include <apacmdln.h>
    23 #include <bautils.h>
    24 #include <bautils.h>
    24 #include <utf.h>
    25 #include <utf.h>
    25 #include <e32property.h>
    26 #include <e32property.h>
    26 
    27 
    27 #include "cbsinstallhandler.h"
    28 #include "cbsinstallhandler.h"
    28 #include "debugtrace.h"
    29 #include "DebugTrace.h"
    29 #include "bsimportconstants.h"
    30 #include "bsimportconstants.h"
    30 #include "cbsstoragemanager.h"
    31 #include "cbsstoragemanager.h"
    31 
    32 
    32 
    33 
    33 // CONSTANTS
    34 // CONSTANTS
   341     
   342     
   342     // check file directly: 
   343     // check file directly: 
   343     // aaa$bbb -> aaa$bbb.install
   344     // aaa$bbb -> aaa$bbb.install
   344     CDir* dir = NULL;
   345     CDir* dir = NULL;
   345     iFs.GetDir( file, KEntryAttNormal, ESortNone, dir );
   346     iFs.GetDir( file, KEntryAttNormal, ESortNone, dir );
   346     if( dir && dir->Count() > 0 )
   347     if( dir->Count() > 0 )
   347         {
   348         {
   348         // brand is installed
   349         // brand is installed
   349         delete dir;
   350         delete dir;
   350     	TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") );
   351     	TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") );
   351         return ETrue;
   352         return ETrue;
   360     file.Append( KBrandInstallExt );
   361     file.Append( KBrandInstallExt );
   361     
   362     
   362     // check file with different versions:
   363     // check file with different versions:
   363     // aaa$bbb -> aaa$bbb$*.install
   364     // aaa$bbb -> aaa$bbb$*.install
   364     iFs.GetDir( file, KEntryAttNormal, ESortNone, dir );
   365     iFs.GetDir( file, KEntryAttNormal, ESortNone, dir );
   365     if( dir && dir->Count() > 0 )
   366     if( dir->Count() > 0 )
   366         {
   367         {
   367         // brand is installed
   368         // brand is installed
   368         delete dir;
   369         delete dir;
   369     	TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") );
   370     	TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") );
   370         return ETrue;
   371         return ETrue;