]> git.proxmox.com Git - mirror_edk2.git/blame - UnixPkg/Sec/Gasket.h
UnixPkg: Added missing EFIAPI for many Gasket functions
[mirror_edk2.git] / UnixPkg / Sec / Gasket.h
CommitLineData
f9b8ab56
HT
1/** @file\r
2\r
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
124f761f 4\r
f9b8ab56
HT
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
7ee3b613
A
14\r
15#ifndef _GASKET_H_\r
16#define _GASKET_H_\r
17\r
18#include <Library/PeCoffLib.h>\r
19\r
20#include <Protocol/UgaDraw.h>\r
21#include <Protocol/SimpleTextIn.h>\r
22#include <Protocol/UnixUgaIo.h>\r
23\r
24\r
25//\r
26// Gasket functions for EFI_UNIX_THUNK_PROTOCOL\r
27//\r
28\r
124f761f 29void\r
30EFIAPI\r
31GasketmsSleep (unsigned long Milliseconds);\r
32\r
33void\r
34EFIAPI\r
35Gasketexit (\r
36 int status\r
37 );\r
38\r
39void\r
40EFIAPI\r
41GasketSetTimer (\r
42 UINT64 PeriodMs,\r
43 VOID (*CallBack)(UINT64 DeltaMs)\r
44 );\r
45\r
46void\r
47EFIAPI\r
48GasketGetLocalTime (\r
49 EFI_TIME *Time\r
50 );\r
51\r
52struct tm *\r
53EFIAPI\r
54Gasketgmtime (\r
55 const time_t *clock\r
56 );\r
57\r
58long\r
59EFIAPI\r
60GasketGetTimeZone (\r
61 void\r
62 );\r
63\r
64int\r
65EFIAPI\r
66GasketGetDayLight (\r
67 void\r
68 );\r
69\r
70\r
71int\r
72EFIAPI\r
73Gasketpoll (\r
74 struct pollfd *pfd,\r
75 unsigned int nfds,\r
76 int timeout\r
77 );\r
78\r
79long\r
80EFIAPI\r
81Gasketread (\r
82 int fd,\r
83 void *buf,\r
84 int count);\r
85\r
86long\r
87EFIAPI\r
88Gasketwrite (\r
89 int fd,\r
90 const void *buf,\r
91 int count\r
92 );\r
93\r
94char *\r
95EFIAPI\r
96Gasketgetenv (\r
97 const char *name\r
98 );\r
99\r
100int\r
101EFIAPI\r
102Gasketopen (\r
103 const char *name,\r
104 int flags,\r
105 int mode\r
106 );\r
107\r
108off_t\r
109EFIAPI\r
110Gasketlseek (\r
111 int fd,\r
112 off_t off,\r
113 int whence\r
114 );\r
115\r
116int\r
117EFIAPI\r
118Gasketftruncate (\r
119 int fd,\r
120 long int len\r
121 );\r
122\r
123int\r
124EFIAPI\r
125Gasketclose (\r
126 int fd\r
127 );\r
128\r
129int\r
130EFIAPI\r
131Gasketmkdir (\r
132 const char *pathname,\r
133 mode_t mode\r
134 );\r
135\r
136int\r
137EFIAPI\r
138Gasketrmdir (\r
139 const char *pathname\r
140 );\r
141\r
142int\r
143EFIAPI\r
144Gasketunlink (\r
145 const char *pathname\r
146 );\r
147\r
148int\r
149EFIAPI\r
150GasketGetErrno (\r
151 void\r
152 );\r
153\r
154DIR *\r
155EFIAPI\r
156Gasketopendir (\r
157 const char *pathname\r
158 );\r
159\r
160void\r
161EFIAPI\r
162Gasketrewinddir (\r
163 DIR *dir\r
164 );\r
165\r
166struct dirent *\r
167EFIAPI\r
168Gasketreaddir (\r
169 DIR *dir\r
170 );\r
171\r
172int\r
173EFIAPI\r
174Gasketclosedir (\r
175 DIR *dir\r
176 );\r
177\r
178int\r
179EFIAPI\r
180Gasketstat (const char *path, STAT_FIX *buf);\r
181\r
182int\r
183EFIAPI\r
184Gasketstatfs (const char *path, struct statfs *buf);\r
185\r
186int\r
187EFIAPI\r
188Gasketrename (\r
189 const char *oldpath,\r
190 const char *newpath\r
191 );\r
192\r
193time_t\r
194EFIAPI\r
195Gasketmktime (\r
196 struct tm *tm\r
197 );\r
198\r
199int\r
200EFIAPI\r
201Gasketfsync (\r
202 int fd\r
203 );\r
204\r
205int\r
206EFIAPI\r
207Gasketchmod (\r
208 const char *path,\r
209 mode_t mode\r
210 );\r
211\r
212int\r
213EFIAPI\r
214Gasketutime (\r
215 const char *filename,\r
216 const struct utimbuf *buf\r
217 );\r
218\r
219int\r
220EFIAPI\r
221Gaskettcflush (\r
222 int fildes,\r
223 int queue_selector\r
224 );\r
225\r
226EFI_STATUS\r
227EFIAPI\r
228GasketUgaCreate (\r
229 struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,\r
230 CONST CHAR16 *Title\r
231 );\r
232\r
233void\r
234EFIAPI\r
235Gasketperror (\r
236 __const char *__s\r
237 );\r
7ee3b613
A
238\r
239//\r
240// ... is always an int or pointer to device specific data structure\r
241//\r
7ee3b613 242\r
124f761f 243int\r
244EFIAPI\r
245Gasketioctl (\r
246 int fd,\r
247 unsigned long int __request,\r
248 void *Arg\r
249 );\r
250\r
251int\r
252EFIAPI\r
253Gasketfcntl (\r
254 int __fd,\r
255 int __cmd,\r
256 void *Arg\r
257 );\r
258\r
259int\r
260EFIAPI\r
261Gasketcfsetispeed (\r
262 struct termios *__termios_p,\r
263 speed_t __speed\r
264 );\r
265\r
266int\r
267EFIAPI\r
268Gasketcfsetospeed (\r
269 struct termios *__termios_p,\r
270 speed_t __speed\r
271 );\r
272\r
273int\r
274EFIAPI\r
275Gaskettcgetattr (\r
276 int __fd,\r
277 struct termios *__termios_p\r
278 );\r
279\r
280int\r
281EFIAPI\r
282Gaskettcsetattr (\r
283 int __fd,\r
284 int __optional_actions,\r
285 __const struct termios *__termios_p\r
286 );\r
287\r
288int\r
289EFIAPI\r
290Gasketsigaction (\r
291 int sig,\r
292 const struct sigaction *act,\r
293 struct sigaction *oact\r
294 );\r
7ee3b613
A
295\r
296RETURN_STATUS\r
124f761f 297EFIAPI\r
7ee3b613
A
298GasketUnixPeCoffGetEntryPoint (\r
299 IN VOID *Pe32Data,\r
300 IN OUT VOID **EntryPoint\r
301 );\r
302\r
303VOID\r
124f761f 304EFIAPI\r
7ee3b613
A
305GasketUnixPeCoffRelocateImageExtraAction (\r
306 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
307 );\r
308\r
309VOID\r
124f761f 310EFIAPI\r
b9c8e50e 311GasketUnixPeCoffUnloadImageExtraAction (\r
7ee3b613
A
312 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
313 );\r
7ee3b613 314\r
7ee3b613 315\r
2ec364f9 316\r
124f761f 317UINTN\r
318EFIAPI\r
319GasketVoid (\r
320 void *api\r
321 );\r
322\r
323UINTN\r
324EFIAPI\r
325GasketUintn (\r
326 void *api,\r
327 UINTN a\r
328 );\r
329\r
330UINTN\r
331EFIAPI\r
332GasketUintnUintn (\r
333 void *api,\r
334 UINTN a,\r
335 UINTN b\r
336 );\r
337\r
338UINTN\r
339EFIAPI\r
340GasketUintnUintnUintn (\r
341 void *api,\r
342 UINTN a,\r
343 UINTN b,\r
344 UINTN c\r
345 );\r
346\r
347UINTN\r
348EFIAPI\r
349GasketUintnUintnUintnUintn (\r
350 void *api,\r
351 UINTN a,\r
352 UINTN b,\r
353 UINTN c,\r
354 UINTN d\r
355 );\r
356\r
357UINTN\r
358EFIAPI\r
359GasketUintn10Args (\r
360 void *api,\r
361 UINTN a,\r
362 UINTN b,\r
363 UINTN c,\r
364 UINTN d,\r
365 UINTN e,\r
366 UINTN f,\r
367 UINTN g,\r
368 UINTN h,\r
369 UINTN i,\r
370 UINTN j\r
371 );\r
372\r
373UINTN\r
374EFIAPI\r
375GasketUint64Uintn (\r
376 void *api,\r
377 UINT64 a,\r
378 UINTN b);\r
379\r
380UINT64\r
381EFIAPI\r
382GasketUintnUint64Uintn (\r
383 void *api,\r
384 UINTN a,\r
385 UINT64 b,\r
386 UINTN c\r
387 );\r
388\r
389UINTN\r
390EFIAPI\r
391GasketUintnUint16 (\r
392 void *api,\r
393 UINTN a,\r
394 UINT16 b\r
395 );\r
396\r
397typedef\r
398void\r
399(*CALL_BACK) (\r
400 UINT64 Delta\r
401 );\r
402\r
403UINTN\r
404ReverseGasketUint64 (\r
405 CALL_BACK CallBack,\r
406 UINT64 a\r
407 );\r
7ee3b613
A
408\r
409//\r
410// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
411//\r
412\r
124f761f 413\r
414EFI_STATUS\r
415EFIAPI\r
416GasketUgaClose (\r
417 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
418 );\r
419\r
420EFI_STATUS\r
421EFIAPI\r
422GasketUgaSize (\r
423 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
424 UINT32 Width,\r
425 UINT32 Height\r
426 );\r
427\r
428EFI_STATUS\r
429EFIAPI\r
430GasketUgaCheckKey (\r
431 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
432 );\r
433\r
434EFI_STATUS\r
435EFIAPI\r
436GasketUgaGetKey (\r
437 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
438 EFI_INPUT_KEY *key\r
439 );\r
440\r
441EFI_STATUS\r
442EFIAPI\r
443GasketUgaBlt (\r
7ee3b613
A
444 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
445 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
446 IN EFI_UGA_BLT_OPERATION BltOperation,\r
447 IN UINTN SourceX,\r
448 IN UINTN SourceY,\r
449 IN UINTN DestinationX,\r
450 IN UINTN DestinationY,\r
451 IN UINTN Width,\r
452 IN UINTN Height,\r
453 IN UINTN Delta OPTIONAL\r
454 );\r
455\r
124f761f 456EFI_STATUS\r
457EFIAPI\r
458UgaCreate (\r
459 EFI_UNIX_UGA_IO_PROTOCOL **Uga,\r
460 CONST CHAR16 *Title\r
461 );\r
7ee3b613
A
462\r
463\r
464//\r
465// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
466//\r
124f761f 467EFI_STATUS\r
468EFIAPI\r
469UgaClose (\r
470 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
471 );\r
472\r
473EFI_STATUS\r
474EFIAPI\r
475UgaSize(\r
476 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
477 UINT32 Width,\r
478 UINT32 Height\r
479 );\r
480\r
481EFI_STATUS\r
482EFIAPI\r
483UgaCheckKey(\r
484 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
485 );\r
486\r
487EFI_STATUS\r
488EFIAPI\r
489UgaGetKey (\r
490 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
491 EFI_INPUT_KEY *key\r
492 );\r
493\r
494EFI_STATUS\r
495EFIAPI\r
496UgaBlt (\r
497 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
498 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
499 IN EFI_UGA_BLT_OPERATION BltOperation,\r
500 IN UINTN SourceX,\r
501 IN UINTN SourceY,\r
502 IN UINTN DestinationX,\r
503 IN UINTN DestinationY,\r
504 IN UINTN Width,\r
505 IN UINTN Height,\r
506 IN UINTN Delta OPTIONAL\r
7ee3b613
A
507 );\r
508\r
509\r
510\r
511#endif\r
512\r
513\r