installationservices/swi/source/swis/server/adornedutilities.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 17 741e5bba2bd1
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
     1 /*
     1 /*
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2009 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 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".
    21  @file
    21  @file
    22 */
    22 */
    23 
    23 
    24 #include "adornedutilities.h"
    24 #include "adornedutilities.h"
    25 #include "log.h"
    25 #include "log.h"
    26 #include "cleanuputils.h"
       
    27 
    26 
    28 _LIT(KAdornedWildCharString, "{????????}");
    27 _LIT(KAdornedWildCharString, "{????????}");
    29 const TInt Swi::FileNameUnadornedPartLength = 10;
    28 const TInt Swi::FileNameUnadornedPartLength = 10;
    30 
    29 
    31 void Swi::GetUnadornedFileName(const TDesC& aAdornedFilename, TDes& aUnadornedFilename)
    30 void Swi::GetUnadornedFileName(const TDesC& aAdornedFilename, TDes& aUnadornedFilename)
    74 	return ret;
    73 	return ret;
    75 	}
    74 	}
    76 
    75 
    77 void Swi::FindAllAdornedVariantsL(RFs& aFs, const TDesC& aSearchNameWild, const TDesC& aSearchPath, RPointerArray<HBufC>& aAdornedFileNamesFound)
    76 void Swi::FindAllAdornedVariantsL(RFs& aFs, const TDesC& aSearchNameWild, const TDesC& aSearchPath, RPointerArray<HBufC>& aAdornedFileNamesFound)
    78 	{
    77 	{
    79 	CleanupResetAndDestroyPushL(aAdornedFileNamesFound);
       
    80 	TFindFile finder(aFs);
    78 	TFindFile finder(aFs);
    81 	CDir* dirList=0;
    79 	CDir* dirList=0;
    82 	TBool matchFound = (finder.FindWildByDir( aSearchNameWild, aSearchPath, *&dirList) == KErrNone);
    80 	TBool matchFound = (finder.FindWildByDir( aSearchNameWild, aSearchPath, *&dirList) == KErrNone);
    83 	CleanupStack::PushL(dirList);
    81 	CleanupStack::PushL(dirList);
    84 	
    82 	
   104 		dirList = 0;
   102 		dirList = 0;
   105 		matchFound = (finder.FindWild(dirList) == KErrNone);
   103 		matchFound = (finder.FindWild(dirList) == KErrNone);
   106 		CleanupStack::PushL(dirList);
   104 		CleanupStack::PushL(dirList);
   107 		}
   105 		}
   108 	CleanupStack::PopAndDestroy(dirList);
   106 	CleanupStack::PopAndDestroy(dirList);
   109 	CleanupStack::Pop(&aAdornedFileNamesFound);
       
   110 	}
   107 	}
   111 
   108 
   112 void Swi::GenerateSearchNameWildL(const TDesC& aFileName, TDes& aSearchNameWild)
   109 void Swi::GenerateSearchNameWildL(const TDesC& aFileName, TDes& aSearchNameWild)
   113 	{
   110 	{
   114 	RBuf unadornedFileName;
   111 	RBuf unadornedFileName;