12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /*
- * Copyright (c) 2011-2012 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:
- *
- * Mapping between "our" handles and real OS filehandles.
- */
- #ifndef _FILEHANDLES_H_
- #define _FILEHANDLES_H_
- #include <sys/param.h>
- typedef struct {
- int opencount;
- int realfh;
- char name[MAXPATHLEN];
- } caseless_filehandle;
- #define FHTABLE_SIZE 1000
- void fhtable_init(void); /* Initialise filehandle map */
- int fh_new(int realfh); /* allocate one of "our" handles given a real one */
- int fh_close(int fh); /* unmap one of "our" handles */
- int fh_getreal(int fh); /* lookup a real handle using "our" handle */
- int fh_find(int realfh); /* reverse lookup from a real filehandle to "our" equivalent */
- extern caseless_filehandle fhtable[FHTABLE_SIZE];
- #define FH_ACCESS(fh) fhtable[fh]
- #endif
|