secureswitools/swisistools/source/sisxlibrary/utility_interface.h
changeset 60 245df5276b97
parent 25 98b66e4fb0be
equal deleted inserted replaced
53:ae54820ef82c 60:245df5276b97
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 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 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".
    35 #ifdef _WIN32
    35 #ifdef _WIN32
    36 #include <windows.h>
    36 #include <windows.h>
    37 #endif // _WIN32
    37 #endif // _WIN32
    38 
    38 
    39 // common interface for Windows and Linux
    39 // common interface for Windows and Linux
       
    40 
       
    41 const int commandLength = 512;
    40 
    42 
    41 wchar_t** CommandLineArgs(int &argc , char *argv[]);
    43 wchar_t** CommandLineArgs(int &argc , char *argv[]);
    42 
    44 
    43 void cleanup(int argc, wchar_t **argv);
    45 void cleanup(int argc, wchar_t **argv);
    44 
    46 
    98  * 			the complete conversion of the source string.
   100  * 			the complete conversion of the source string.
    99  */
   101  */
   100 int ConvertMultiByteToWideChar(const char* aSource, int aSourceLen, wchar_t* aTarget, int aTargetLen, TUint32 aCodePage = 0);
   102 int ConvertMultiByteToWideChar(const char* aSource, int aSourceLen, wchar_t* aTarget, int aTargetLen, TUint32 aCodePage = 0);
   101 
   103 
   102 /*
   104 /*
   103 Copies an existing file to a new file.
   105  * Copies an existing file to a new file. 
   104 @Parameters : The name of an existing file. 
   106  *
   105 If lpExistingFileName does not exist, CopyFile fails, and GetLastError returns ERROR_FILE_NOT_FOUND.
   107  * @Parameters aSrc					The name of an existing file.  
   106 
   108  * @Parameters aDest				The name of the new file. 
   107 @Parameters : The name of the new file. 
   109  * @Parameters aFailIfExistsFlag    If this parameter is TRUE and the new file specified by aDest already exists, 
   108 
   110  *									the function fails. If this parameter is FALSE and the new file already exists, 
   109 @Parameters : If this parameter is TRUE and the new file specified by lpNewFileName already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds.
   111  *									the function overwrites the existing file and succeeds.
   110 
   112  * @return 
   111 Return Value
   113  *									If the function succeeds, the return value is zero.
   112 If the function succeeds, the return value is nonzero.
   114  *									If the function fails, the return value is non-zero.
   113 If the function fails, the return value is zero.
   115  */
   114 */
   116 
   115 
   117 int FileCopyA(const char* aSrc, const char* aDest, bool aFailIfExistsFlag);
   116 int FileCopyA(const char* aSrc, const char* aDest, size_t aFlag);
       
   117 
   118 
   118 
   119 
   119 /*
   120 /*
   120 Moves an existing file or a directory, including its children
   121  * Moves an existing file or a directory, including its children.
   121 @Parameters : The current name of the file or directory on the local computer. 
   122  *
   122 @Parameters : The new name for the file or directory. The new name must not already exist. A new file may be on a different file system or drive. A new directory must be on the same drive. 
   123  * @Parameters aSrc					The current name of the file or directory on the local computer. 
   123 
   124  * @Parameters aDest				The new name for the file or directory. The new name must not already exist. 
   124 Return Value
   125  *									A new file may be on a different file system or drive. A new directory must be 
   125 If the function succeeds, the return value is nonzero.
   126  *									on the same drive. 
   126 If the function fails, the return value is zero.
   127  *
   127 */
   128  * @return
       
   129  *									If the function succeeds, the return value is zero.
       
   130  *									If the function fails, the return value is non-zero.
       
   131  */
   128 
   132 
   129 int FileMoveA(const char* aSrc, const char* aDest);
   133 int FileMoveA(const char* aSrc, const char* aDest);
   130 
   134 
   131 
   135 
   132 // interface for only Linux
   136 // interface for only Linux