epoc32/include/estlib.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations

#ifndef __ESTLIB_H__
#define __ESTLIB_H__

// Copyright (c) 1998-2009 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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
// which accompanies this distribution, and is available
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// ESTLIB control for multi-thread and multi-process operation
// 
//



/**
 @file
 @internalComponent
*/

#include <e32base.h>
#include <stddef.h>

IMPORT_C void PosixServerName(TDes& aBuffer);

/**
Support for multi-thread operation is achieved using a CPosixServer
active object - this can be installed in an active scheduler in the current thread,
or run in a separate thread.
*/

IMPORT_C TInt InstallPosixServerActiveObject (TInt aPriority=CActive::EPriorityStandard);
IMPORT_C TInt SpawnPosixServerThread();

/**
Support for asynchronous ioctl
There are no guarantees about when the parameters will be processed - some implementations may
process the parameters in both the ioctl() and the ioctl_complete() functions.
Do not wait on the TRequestStatus unless ioctl() returns 0. 
*/
IMPORT_C int ioctl (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus);
IMPORT_C int ioctl_complete (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus);
IMPORT_C int ioctl_cancel (int aFid);
IMPORT_C int _ioctl_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus);
IMPORT_C int _ioctl_complete_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus);
IMPORT_C int _ioctl_cancel_r (struct _reent *r, int aFid);

/**
Support for crt0 variants
Do whatever is necessary to get the command line arguments, environment etc.
NB. This calls chdir(), so start the PosixServer before calling this if you want one.
*/
IMPORT_C void __crt0(int& argc, char**& argv, char**& envp);
IMPORT_C void __crt0(int& argc, wchar_t**& argv, wchar_t**& envp);

#endif