secureswitools/swisistools/source/interpretsislib/adornedutilities.h
changeset 0 ba25891c3a9e
child 24 5cc91383ab1e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2008-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 the License "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 /**
       
    20  @file ADORNEDUTILITIES.H
       
    21  @internalComponent
       
    22  @released
       
    23 */
       
    24 
       
    25 #ifndef	ADORNED_UTILITIES_H
       
    26 #define	ADORNED_UTILITIES_H
       
    27 
       
    28 #pragma warning (disable: 4786)
       
    29 
       
    30 #include <algorithm>
       
    31 #include <string>
       
    32 #include <list>
       
    33 #include <sstream>
       
    34 #include <iostream>
       
    35 
       
    36 #include "configmanager.h"
       
    37 
       
    38 /** Checks if the input filename is adorned and cuts off the adorned part 
       
    39 @param aAdornedFilename buffer containing the input filename (possibly adorned)
       
    40 @param pointer to the output buffer where the unadorned name is returned
       
    41 */
       
    42 void GetUnadornedFileName(const std::wstring& aAdornedFilename, std::wstring& aUnadornedFilename);
       
    43 
       
    44 /** Checks if the two input filenames  are variants of each other (belong to the same adorned name "family")
       
    45 @param aFileName1 first name to compare (full path and name)
       
    46 @param aFileName2 second name to compare (full path and name)
       
    47 */
       
    48 bool IsAdornedVariationOf(const std::wstring& aFileName1, const std::wstring& aFileName2);
       
    49 	
       
    50 /** Searches through the file system looking for all variants of searchNameWild
       
    51 @param aSearchNameWild represents the filename pattern that is to be searched for (i.e: afile{????????}.ext)
       
    52 @param aSearchPath represents the path to be searched through on all drives (i.e: \sys\bin\)
       
    53 @param aAdornedFileNamesFound all files matching the pattern are returned in this array (contains fully qualified filenames i.e. full path+name+ext)
       
    54 */
       
    55 void FindAllAdornedVariants(const std::wstring& aSearchNameWild, const std::wstring& aSearchPath, std::list<std::wstring>& aAdornedFileNamesFound, const DrivesMap& aDriveMap);
       
    56 
       
    57 /** Generates adorned filename pattern using wild chars for searching
       
    58 @param aFileName the filename that is the base of the pattern; can be either unadorned or adorned name (i.e: somename.ext or somename{12345678}.ext) 
       
    59 @param aSearchNameWild the calculated pattern output (i.e: somename{????????}.ext)
       
    60 */
       
    61 void GenerateSearchNameWild(const std::wstring& aFileName, std::wstring& aSearchNameWild);
       
    62 
       
    63 #endif	/* ADORNED_UTILITIES_H */