os/ossrv/genericopenlibs/openenvcore/backend/inc/lposix.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Support routines for managing paths and directories
    15 // provided by the LPOSIX.LIB component of STDLIB
    16 // 
    17 //
    18 
    19 #ifndef LPOSIX_H
    20 #define LPOSIX_H
    21 
    22 #include <f32file.h>	// for TParse
    23 #include <sys/dirent.h>
    24 
    25 /*
    26 @internalComponent
    27 */
    28 
    29 /*
    30  various combinations that one can get  as parameters for link , rename system call
    31  */
    32  
    33 #ifdef SYMBIAN_OE_LIBRT
    34 #define SHM_CHUNKSIZE 4096
    35 #endif //SYMBIAN_OE_LIBRT
    36 
    37 
    38 enum Path_Combinations   
    39 	{
    40 	DirEmpty_DirEmpty= 0    ,
    41 	DirEmpty_DirNotEmpty    ,
    42 	DirEmpty_File	        ,
    43 	DirNotEmpty_DirEmpty    ,
    44 	DirNotEmpty_DirNotEmpty ,
    45 	DirNotEmpty_File        ,
    46 	Dir_NotEmpty            ,
    47 	File_Dir                ,
    48 	File_File               ,
    49 	Dir_File                ,
    50 	Invalid_Path_EnotDir    ,
    51 	Invalid_Path_Eent       ,
    52 	Permission_Denied		,
    53 	} ; 
    54 	  
    55 	
    56 GLREF_C TInt GetFullPath(TParse& aParse, const TText16* upath, TDes* aFileName);
    57 GLREF_C TInt GetFullFile(TFileName& aName, const TText16* upath, RFs& aSession);
    58 GLDEF_C TInt Find_Error(const wchar_t *name, RSessionBase& aSession) ; 
    59 GLDEF_C TInt Find_Error(TFileName& aName, RSessionBase& aSession) ;
    60 IMPORT_C int MapError(TInt err, int& anErrno);
    61 int StrCmp(const char *aDst, const char *aSrc);
    62 wchar_t* WcsCpy(wchar_t* __restrict aDst, const wchar_t * __restrict aSrc);
    63 int WcsCmp(const wchar_t* aDst, const wchar_t* aSrc);
    64 size_t WcsLen(wchar_t*  aSrc);
    65 size_t StrlCopy(char *aDst, const char *aSrc, size_t aSize);
    66 char* StrCopy(char* aDst, const char* aSrc);
    67 GLDEF_C TInt Get_PathCombinations(TFileName& aOldName, TFileName& aNewName ,RFs & aSession) ; 
    68 #ifdef SYMBIAN_OE_LIBRT
    69 TInt GeneratePathKey(const TDesC& aName);
    70 #endif //SYMBIAN_OE_LIBRT
    71 TInt ConvertUnicodeToUtf8(const TDesC16 &aUnicode,HBufC8*& aUtf8Buf,TInt &aErrNum);
    72 GLDEF_C TInt GetFullFileUtf8(TDes8 &aName, const char* apath, RFs& aSession);
    73 #endif /* LPOSIX_H */