]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/BdsDxe/Hotkey.h
clean up the un-suitable ';' location when declaring the functions.
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / Hotkey.h
1 /** @file
2 Provides a way for 3rd party applications to register themselves for launch by the
3 Boot Manager based on hot key
4
5 Copyright (c) 2007 - 2008, Intel Corporation. <BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _HOTKEY_H_
17 #define _HOTKEY_H_
18
19 #include "Bds.h"
20 #include "String.h"
21
22 #define GET_KEY_CODE_COUNT(KeyOptions) (((KeyOptions) & EFI_KEY_CODE_COUNT) >> 8)
23
24 #define BDS_HOTKEY_OPTION_SIGNATURE EFI_SIGNATURE_32 ('B', 'd', 'K', 'O')
25 typedef struct {
26 UINTN Signature;
27 LIST_ENTRY Link;
28
29 EFI_HANDLE NotifyHandle;
30 UINT16 BootOptionNumber;
31 UINT8 CodeCount;
32 UINT8 WaitingKey;
33 EFI_KEY_DATA KeyData[3];
34 } BDS_HOTKEY_OPTION;
35
36 #define BDS_HOTKEY_OPTION_FROM_LINK(a) CR (a, BDS_HOTKEY_OPTION, Link, BDS_HOTKEY_OPTION_SIGNATURE)
37
38 #define VAR_KEY_ORDER L"KeyOrder"
39
40 /**
41
42 Create Key#### for the given hotkey.
43
44
45 @param KeyOption - The Hot Key Option to be added.
46 @param KeyOptionNumber - The key option number for Key#### (optional).
47
48 @retval EFI_SUCCESS Register hotkey successfully.
49 @retval EFI_INVALID_PARAMETER The hotkey option is invalid.
50
51 **/
52 EFI_STATUS
53 RegisterHotkey (
54 IN EFI_KEY_OPTION *KeyOption,
55 OUT UINT16 *KeyOptionNumber
56 );
57
58 /**
59
60 Delete Key#### for the given Key Option number.
61
62
63 @param KeyOptionNumber - Key option number for Key####
64
65 @retval EFI_SUCCESS Unregister hotkey successfully.
66 @retval EFI_NOT_FOUND No Key#### is found for the given Key Option number.
67
68 **/
69 EFI_STATUS
70 UnregisterHotkey (
71 IN UINT16 KeyOptionNumber
72 );
73
74
75 /**
76
77 Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.
78
79
80 @param VOID
81
82 @retval EFI_SUCCESS Hotkey services successfully initialized.
83
84 **/
85 EFI_STATUS
86 InitializeHotkeyService (
87 VOID
88 );
89
90 #endif