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