equal
deleted
inserted
replaced
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 the License "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". |
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 |
|
18 |
17 |
19 |
18 |
20 // INCLUDE FILES |
19 // INCLUDE FILES |
21 #include <apgcli.h> |
20 #include <apgcli.h> |
22 #include <apacmdln.h> |
21 #include <apacmdln.h> |
24 #include <bautils.h> |
23 #include <bautils.h> |
25 #include <utf.h> |
24 #include <utf.h> |
26 #include <e32property.h> |
25 #include <e32property.h> |
27 |
26 |
28 #include "cbsinstallhandler.h" |
27 #include "cbsinstallhandler.h" |
29 #include "DebugTrace.h" |
28 #include "debugtrace.h" |
30 #include "bsimportconstants.h" |
29 #include "bsimportconstants.h" |
31 #include "cbsstoragemanager.h" |
30 #include "cbsstoragemanager.h" |
32 |
31 |
33 |
32 |
34 // CONSTANTS |
33 // CONSTANTS |
342 |
341 |
343 // check file directly: |
342 // check file directly: |
344 // aaa$bbb -> aaa$bbb.install |
343 // aaa$bbb -> aaa$bbb.install |
345 CDir* dir = NULL; |
344 CDir* dir = NULL; |
346 iFs.GetDir( file, KEntryAttNormal, ESortNone, dir ); |
345 iFs.GetDir( file, KEntryAttNormal, ESortNone, dir ); |
347 if( dir->Count() > 0 ) |
346 if( dir && dir->Count() > 0 ) |
348 { |
347 { |
349 // brand is installed |
348 // brand is installed |
350 delete dir; |
349 delete dir; |
351 TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") ); |
350 TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") ); |
352 return ETrue; |
351 return ETrue; |
361 file.Append( KBrandInstallExt ); |
360 file.Append( KBrandInstallExt ); |
362 |
361 |
363 // check file with different versions: |
362 // check file with different versions: |
364 // aaa$bbb -> aaa$bbb$*.install |
363 // aaa$bbb -> aaa$bbb$*.install |
365 iFs.GetDir( file, KEntryAttNormal, ESortNone, dir ); |
364 iFs.GetDir( file, KEntryAttNormal, ESortNone, dir ); |
366 if( dir->Count() > 0 ) |
365 if( dir && dir->Count() > 0 ) |
367 { |
366 { |
368 // brand is installed |
367 // brand is installed |
369 delete dir; |
368 delete dir; |
370 TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") ); |
369 TRACE( T_LIT( "CBSInstallHandler::IsBrandInstalled true") ); |
371 return ETrue; |
370 return ETrue; |