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