|
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
8 // which accompanies this distribution, and is available |
|
9 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 |
|
23 /** |
|
24 @file |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <stddef.h> |
|
30 |
|
31 IMPORT_C void PosixServerName(TDes& aBuffer); |
|
32 |
|
33 /** |
|
34 Support for multi-thread operation is achieved using a CPosixServer |
|
35 active object - this can be installed in an active scheduler in the current thread, |
|
36 or run in a separate thread. |
|
37 */ |
|
38 |
|
39 IMPORT_C TInt InstallPosixServerActiveObject (TInt aPriority=CActive::EPriorityStandard); |
|
40 IMPORT_C TInt SpawnPosixServerThread(); |
|
41 |
|
42 /** |
|
43 Support for asynchronous ioctl |
|
44 There are no guarantees about when the parameters will be processed - some implementations may |
|
45 process the parameters in both the ioctl() and the ioctl_complete() functions. |
|
46 Do not wait on the TRequestStatus unless ioctl() returns 0. |
|
47 */ |
|
48 IMPORT_C int ioctl (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
49 IMPORT_C int ioctl_complete (int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
50 IMPORT_C int ioctl_cancel (int aFid); |
|
51 IMPORT_C int _ioctl_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
52 IMPORT_C int _ioctl_complete_r (struct _reent *r, int aFid, int aCmd, void* aParam, TRequestStatus& aStatus); |
|
53 IMPORT_C int _ioctl_cancel_r (struct _reent *r, int aFid); |
|
54 |
|
55 /** |
|
56 Support for crt0 variants |
|
57 Do whatever is necessary to get the command line arguments, environment etc. |
|
58 NB. This calls chdir(), so start the PosixServer before calling this if you want one. |
|
59 */ |
|
60 IMPORT_C void __crt0(int& argc, char**& argv, char**& envp); |
|
61 IMPORT_C void __crt0(int& argc, wchar_t**& argv, wchar_t**& envp); |
|
62 |
|
63 #endif |