]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/DevicePathFromText.h
327c5e27a3d0b46f91c217da7e6e67bbe79b5c03
[mirror_edk2.git] / MdePkg / Include / Protocol / DevicePathFromText.h
1 /** @file
2 EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0.
3 This protocol provides service to convert text to device paths and device nodes.
4
5 Copyright (c) 2006 - 2008, Intel Corporation
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 __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__
17 #define __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__
18
19 #include <Protocol/DevicePath.h>
20
21 ///
22 /// Device Path From Text protocol
23 ///
24 #define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
25 { \
26 0x5c99a21, 0xc70f, 0x4ad2, {0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } \
27 }
28
29 /**
30 Convert text to the binary representation of a device node.
31
32 @param TextDeviceNode TextDeviceNode points to the text representation of a device
33 node. Conversion starts with the first character and continues
34 until the first non-device node character.
35
36 @retval a_pointer Pointer to the EFI device node.
37 @retval NULL if TextDeviceNode is NULL or there was insufficient memory.
38
39 **/
40 typedef
41 EFI_DEVICE_PATH_PROTOCOL*
42 (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE)(
43 IN CONST CHAR16 *TextDeviceNode
44 );
45
46
47 /**
48 Convert text to the binary representation of a device node.
49
50 @param TextDeviceNode TextDevicePath points to the text representation of a device
51 path. Conversion starts with the first character and continues
52 until the first non-device path character.
53
54 @retval a_pointer Pointer to the allocated device path.
55 @retval NULL if TextDeviceNode is NULL or there was insufficient memory.
56
57 **/
58 typedef
59 EFI_DEVICE_PATH_PROTOCOL*
60 (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH)(
61 IN CONST CHAR16 *TextDevicePath
62 );
63
64 /**
65 @par Protocol Description:
66 This protocol converts text to device paths and device nodes.
67 **/
68 typedef struct {
69 EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;
70 EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;
71 } EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
72
73 extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
74
75 #endif