1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/backend/inc/lposix.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,73 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Support routines for managing paths and directories
1.18 +// provided by the LPOSIX.LIB component of STDLIB
1.19 +//
1.20 +//
1.21 +
1.22 +#ifndef LPOSIX_H
1.23 +#define LPOSIX_H
1.24 +
1.25 +#include <f32file.h> // for TParse
1.26 +#include <sys/dirent.h>
1.27 +
1.28 +/*
1.29 +@internalComponent
1.30 +*/
1.31 +
1.32 +/*
1.33 + various combinations that one can get as parameters for link , rename system call
1.34 + */
1.35 +
1.36 +#ifdef SYMBIAN_OE_LIBRT
1.37 +#define SHM_CHUNKSIZE 4096
1.38 +#endif //SYMBIAN_OE_LIBRT
1.39 +
1.40 +
1.41 +enum Path_Combinations
1.42 + {
1.43 + DirEmpty_DirEmpty= 0 ,
1.44 + DirEmpty_DirNotEmpty ,
1.45 + DirEmpty_File ,
1.46 + DirNotEmpty_DirEmpty ,
1.47 + DirNotEmpty_DirNotEmpty ,
1.48 + DirNotEmpty_File ,
1.49 + Dir_NotEmpty ,
1.50 + File_Dir ,
1.51 + File_File ,
1.52 + Dir_File ,
1.53 + Invalid_Path_EnotDir ,
1.54 + Invalid_Path_Eent ,
1.55 + Permission_Denied ,
1.56 + } ;
1.57 +
1.58 +
1.59 +GLREF_C TInt GetFullPath(TParse& aParse, const TText16* upath, TDes* aFileName);
1.60 +GLREF_C TInt GetFullFile(TFileName& aName, const TText16* upath, RFs& aSession);
1.61 +GLDEF_C TInt Find_Error(const wchar_t *name, RSessionBase& aSession) ;
1.62 +GLDEF_C TInt Find_Error(TFileName& aName, RSessionBase& aSession) ;
1.63 +IMPORT_C int MapError(TInt err, int& anErrno);
1.64 +int StrCmp(const char *aDst, const char *aSrc);
1.65 +wchar_t* WcsCpy(wchar_t* __restrict aDst, const wchar_t * __restrict aSrc);
1.66 +int WcsCmp(const wchar_t* aDst, const wchar_t* aSrc);
1.67 +size_t WcsLen(wchar_t* aSrc);
1.68 +size_t StrlCopy(char *aDst, const char *aSrc, size_t aSize);
1.69 +char* StrCopy(char* aDst, const char* aSrc);
1.70 +GLDEF_C TInt Get_PathCombinations(TFileName& aOldName, TFileName& aNewName ,RFs & aSession) ;
1.71 +#ifdef SYMBIAN_OE_LIBRT
1.72 +TInt GeneratePathKey(const TDesC& aName);
1.73 +#endif //SYMBIAN_OE_LIBRT
1.74 +TInt ConvertUnicodeToUtf8(const TDesC16 &aUnicode,HBufC8*& aUtf8Buf,TInt &aErrNum);
1.75 +GLDEF_C TInt GetFullFileUtf8(TDes8 &aName, const char* apath, RFs& aSession);
1.76 +#endif /* LPOSIX_H */