]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/DisplayUpdateProgressLib.h
MdeModulePkg: Add DisplayUpdateProgressLib class
[mirror_edk2.git] / MdeModulePkg / Include / Library / DisplayUpdateProgressLib.h
1 /** @file
2 Provides services to display completion progress when processing a
3 firmware update that updates the firmware image in a firmware device.
4 A platform may provide its own instance of this library class to custoimize
5 how a user is informed of completion progress.
6
7 Copyright (c) 2016, Microsoft Corporation
8 Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
9
10 All rights reserved.
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions are met:
13 1. Redistributions of source code must retain the above copyright notice,
14 this list of conditions and the following disclaimer.
15 2. Redistributions in binary form must reproduce the above copyright notice,
16 this list of conditions and the following disclaimer in the documentation
17 and/or other materials provided with the distribution.
18
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30 **/
31
32 #ifndef __DISPLAY_PROGRESS_LIB__
33 #define __DISPLAY_PROGRESS_LIB__
34
35 #include <Protocol/GraphicsOutput.h>
36
37 /**
38 Indicates the current completion progress of a firmware update.
39
40 @param[in] Completion A value between 0 and 100 indicating the current
41 completion progress of a firmware update. This
42 value must the the same or higher than previous
43 calls to this service. The first call of 0 or a
44 value of 0 after reaching a value of 100 resets
45 the progress indicator to 0.
46 @param[in] Color Color of the progress indicator. Only used when
47 Completion is 0 to set the color of the progress
48 indicator. If Color is NULL, then the default color
49 is used.
50
51 @retval EFI_SUCCESS Progress displayed successfully.
52 @retval EFI_INVALID_PARAMETER Completion is not in range 0..100.
53 @retval EFI_INVALID_PARAMETER Completion is less than Completion value from
54 a previous call to this service.
55 @retval EFI_NOT_READY The device used to indicate progress is not
56 available.
57 **/
58 EFI_STATUS
59 EFIAPI
60 DisplayUpdateProgress (
61 IN UINTN Completion,
62 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION *Color OPTIONAL
63 );
64
65 #endif