|
1 #ifndef __ESTLIB_H__ |
|
2 #define __ESTLIB_H__ |
|
3 |
|
4 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 // All rights reserved. |
|
6 // This component and the accompanying materials are made available |
|
7 // under the terms of "Eclipse Public License v1.0" |
|
8 // which accompanies this distribution, and is available |
|
9 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 // |
|
11 // Initial Contributors: |
|
12 // Nokia Corporation - initial contribution. |
|
13 // |
|
14 // Contributors: |
|
15 // |
|
16 // Description: |
|
17 // ESTLIB control for multi-thread and multi-process operation |
|
18 // |
|
19 // |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalComponent |
|
24 */ |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <stddef.h> |
|
28 |
|
29 IMPORT_C void PosixServerName(TDes& aBuffer); |
|
30 |
|
31 /** |
|
32 Support for multi-thread operation is achieved using a CPosixServer |
|
33 active object - this can be installed in an active scheduler in the current thread, |
|
34 or run in a separate thread. |
|
35 */ |
|
36 |
|
37 IMPORT_C TInt InstallPosixServerActiveObject (TInt aPriority=CActive::EPriorityStandard); |
|
38 IMPORT_C TInt SpawnPosixServerThread(); |
|
39 |
|
40 /** |
|
41 Support for asynchronous ioctl |
|
42 There are no guarantees about when the parameters will be processed - some implementations may |
|
43 process the parameters in both the ioctl() and the ioctl_complete() functions. |
|
44 Do not wait on the TRequestStatus unless ioctl() returns 0. |
|
45 */ |
|
46 IMPORT_C int ioctl (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
47 IMPORT_C int ioctl_complete (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
48 IMPORT_C int ioctl_cancel (int aFid); |
|
49 IMPORT_C int _ioctl_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
50 IMPORT_C int _ioctl_complete_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
51 IMPORT_C int _ioctl_cancel_r (struct _reent *r, int aFid); |
|
52 |
|
53 /** |
|
54 Support for crt0 variants |
|
55 Do whatever is necessary to get the command line arguments, environment etc. |
|
56 NB. This calls chdir(), so start the PosixServer before calling this if you want one. |
|
57 */ |
|
58 IMPORT_C void __crt0(int& argc, char**& argv, char**& envp); |
|
59 IMPORT_C void __crt0(int& argc, wchar_t**& argv, wchar_t**& envp); |
|
60 |
|
61 |
|
62 #endif |