]> git.proxmox.com Git - mirror_edk2.git/blob - UnixPkg/Sec/Gasket.h
Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard.
[mirror_edk2.git] / UnixPkg / Sec / Gasket.h
1
2 #ifndef _GASKET_H_
3 #define _GASKET_H_
4
5 #include <Library/PeCoffLib.h>
6
7 #include <Protocol/UgaDraw.h>
8 #include <Protocol/SimpleTextIn.h>
9 #include <Protocol/UnixUgaIo.h>
10
11
12 //
13 // Gasket functions for EFI_UNIX_THUNK_PROTOCOL
14 //
15
16 void GasketmsSleep (unsigned long Milliseconds);
17 void Gasketexit (int status);
18 void GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));
19 void GasketGetLocalTime (EFI_TIME *Time);
20 struct tm *Gasketgmtime (const time_t *clock);
21 long GasketGetTimeZone (void);
22 int GasketGetDayLight (void);
23 int Gasketpoll (struct pollfd *pfd, int nfds, int timeout);
24 int Gasketread (int fd, void *buf, int count);
25 int Gasketwrite (int fd, const void *buf, int count);
26 char *Gasketgetenv (const char *name);
27 int Gasketopen (const char *name, int flags, int mode);
28 off_t Gasketlseek (int fd, off_t off, int whence);
29 int Gasketftruncate (int fd, long int len);
30 int Gasketclose (int fd);
31 int Gasketmkdir (const char *pathname, mode_t mode);
32 int Gasketrmdir (const char *pathname);
33 int Gasketunlink (const char *pathname);
34 int GasketGetErrno (void);
35 DIR *Gasketopendir (const char *pathname);
36 void *Gasketrewinddir (DIR *dir);
37 struct dirent *Gasketreaddir (DIR *dir);
38 int Gasketclosedir (DIR *dir);
39 int Gasketstat (const char *path, STAT_FIX *buf);
40 int Gasketstatfs (const char *path, struct statfs *buf);
41 int Gasketrename (const char *oldpath, const char *newpath);
42 time_t Gasketmktime (struct tm *tm);
43 int Gasketfsync (int fd);
44 int Gasketchmod (const char *path, mode_t mode);
45 int Gasketutime (const char *filename, const struct utimbuf *buf);
46 int Gaskettcflush (int fildes, int queue_selector);
47 EFI_STATUS GasketUgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);
48 void Gasketperror (__const char *__s);
49
50 //
51 // ... is always an int or pointer to device specific data structure
52 //
53 int Gasketioctl (int fd, unsigned long int __request, ...);
54 int Gasketfcntl (int __fd, int __cmd, ...);
55
56 int Gasketcfsetispeed (struct termios *__termios_p, speed_t __speed);
57 int Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed);
58 int Gaskettcgetattr (int __fd, struct termios *__termios_p);
59 int Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p);
60 int Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact);
61 int Gasketsetcontext (const ucontext_t *ucp);
62 int Gasketgetcontext (ucontext_t *ucp);
63 int Gasketsigemptyset (sigset_t *set);
64 int Gasketsigaltstack (const stack_t *ss, stack_t *oss);
65
66 RETURN_STATUS
67 GasketUnixPeCoffGetEntryPoint (
68 IN VOID *Pe32Data,
69 IN OUT VOID **EntryPoint
70 );
71
72 VOID
73 GasketUnixPeCoffRelocateImageExtraAction (
74 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
75 );
76
77 VOID
78 GasketPeCoffLoaderUnloadImageExtraAction (
79 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
80 );
81
82
83 int GasketVoid (void *api);
84 int GasketUintn (void *api, UINTN a);
85 int GasketUintnUintn (void *api, UINTN a, UINTN b);
86 int GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c);
87 int GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d);
88 int GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j);
89 int GasketUint64Uintn (void *api, UINT64 a, UINTN b);
90 UINT64 GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c);
91 int GasketUintnUint16 (void *api, UINTN a, UINT16 b);
92
93
94 //
95 // Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL
96 //
97
98 EFI_STATUS EFIAPI GasketUgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
99 EFI_STATUS EFIAPI GasketUgaSize (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);
100 EFI_STATUS EFIAPI GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
101 EFI_STATUS EFIAPI GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);
102 EFI_STATUS EFIAPI GasketUgaBlt (
103 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
104 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
105 IN EFI_UGA_BLT_OPERATION BltOperation,
106 IN UINTN SourceX,
107 IN UINTN SourceY,
108 IN UINTN DestinationX,
109 IN UINTN DestinationY,
110 IN UINTN Width,
111 IN UINTN Height,
112 IN UINTN Delta OPTIONAL
113 );
114
115 EFI_STATUS UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title);
116
117
118 //
119 // Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL
120 //
121 EFI_STATUS UgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
122 EFI_STATUS UgaSize(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);
123 EFI_STATUS UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
124 EFI_STATUS UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);
125 EFI_STATUS UgaBlt (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
126 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
127 IN EFI_UGA_BLT_OPERATION BltOperation,
128 IN UINTN SourceX,
129 IN UINTN SourceY,
130 IN UINTN DestinationX,
131 IN UINTN DestinationY,
132 IN UINTN Width,
133 IN UINTN Height,
134 IN UINTN Delta OPTIONAL
135 );
136
137
138
139 #endif
140
141