williamr@2: #ifndef __ESTLIB_H__ williamr@2: #define __ESTLIB_H__ williamr@2: williamr@2: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // ESTLIB control for multi-thread and multi-process operation williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @internalComponent williamr@2: */ williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: IMPORT_C void PosixServerName(TDes& aBuffer); williamr@2: williamr@2: /** williamr@2: Support for multi-thread operation is achieved using a CPosixServer williamr@2: active object - this can be installed in an active scheduler in the current thread, williamr@2: or run in a separate thread. williamr@2: */ williamr@2: williamr@2: IMPORT_C TInt InstallPosixServerActiveObject (TInt aPriority=CActive::EPriorityStandard); williamr@2: IMPORT_C TInt SpawnPosixServerThread(); williamr@2: williamr@2: /** williamr@2: Support for asynchronous ioctl williamr@2: There are no guarantees about when the parameters will be processed - some implementations may williamr@2: process the parameters in both the ioctl() and the ioctl_complete() functions. williamr@2: Do not wait on the TRequestStatus unless ioctl() returns 0. williamr@2: */ williamr@2: IMPORT_C int ioctl (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); williamr@2: IMPORT_C int ioctl_complete (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); williamr@2: IMPORT_C int ioctl_cancel (int aFid); williamr@2: IMPORT_C int _ioctl_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); williamr@2: IMPORT_C int _ioctl_complete_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); williamr@2: IMPORT_C int _ioctl_cancel_r (struct _reent *r, int aFid); williamr@2: williamr@2: /** williamr@2: Support for crt0 variants williamr@2: Do whatever is necessary to get the command line arguments, environment etc. williamr@2: NB. This calls chdir(), so start the PosixServer before calling this if you want one. williamr@2: */ williamr@2: IMPORT_C void __crt0(int& argc, char**& argv, char**& envp); williamr@2: IMPORT_C void __crt0(int& argc, wchar_t**& argv, wchar_t**& envp); williamr@2: williamr@2: #endif