]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/ServiceBinding.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / ServiceBinding.h
CommitLineData
d1f95000 1/** @file\r
c311f86b 2\r
4ca9b6c4
LG
3 The file defines the generic Service Binding Protocol functions.\r
4 It provides services that are required to create and destroy child \r
5 handles that support a given set of protocols.\r
c311f86b 6\r
4ca9b6c4 7 Copyright (c) 2006 - 2008, Intel Corporation \r
d1f95000 8 All rights reserved. This program and the accompanying materials \r
9 are licensed and made available under the terms and conditions of the BSD License \r
10 which accompanies this distribution. The full text of the license may be found at \r
11 http://opensource.org/licenses/bsd-license.php \r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
15\r
d1f95000 16**/\r
17\r
18#ifndef __EFI_SERVICE_BINDING_H__\r
19#define __EFI_SERVICE_BINDING_H__\r
20\r
99e8ed21 21///\r
22/// Forward reference for pure ANSI compatability\r
23///\r
d1f95000 24typedef struct _EFI_SERVICE_BINDING_PROTOCOL EFI_SERVICE_BINDING_PROTOCOL;\r
25\r
26/**\r
27 Creates a child handle with a set of I/O services.\r
28\r
29 @param This Protocol instance pointer.\r
30 @param ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
31 then a new handle is created. If it is not NULL, then the\r
32 I/O services are added to the existing child handle.\r
33\r
34 @retval EFI_SUCCES The child handle was created with the I/O services\r
35 @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
36 @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r
37 the child\r
38 @retval other The child handle was not created\r
39\r
40**/\r
41typedef\r
42EFI_STATUS\r
8b13229b 43(EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD)(\r
d1f95000 44 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
45 IN OUT EFI_HANDLE *ChildHandle\r
ed66e1bc 46 );\r
d1f95000 47\r
48/**\r
49 Destroys a child handle with a set of I/O services.\r
50\r
51 @param This Protocol instance pointer.\r
52 @param ChildHandle Handle of the child to destroy\r
53\r
54 @retval EFI_SUCCES The I/O services were removed from the child handle\r
55 @retval EFI_UNSUPPORTED The child handle does not support the I/O services\r
56 that are being removed.\r
57 @retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.\r
58 @retval EFI_ACCESS_DENIED The child handle could not be destroyed because its\r
59 I/O services are being used.\r
60 @retval other The child handle was not destroyed\r
61\r
62**/\r
63typedef\r
64EFI_STATUS\r
8b13229b 65(EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD)(\r
d1f95000 66 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
67 IN EFI_HANDLE ChildHandle\r
ed66e1bc 68 );\r
d1f95000 69\r
44717a39 70///\r
71/// The EFI_SERVICE_BINDING_PROTOCOL provides member functions to create and destroy \r
72/// child handles. A driver is responsible for adding protocols to the child handle \r
73/// in CreateChild() and removing protocols in DestroyChild(). It is also required \r
74/// that the CreateChild() function opens the parent protocol BY_CHILD_CONTROLLER \r
75/// to establish the parent-child relationship, and closes the protocol in DestroyChild().\r
76/// The pseudo code for CreateChild() and DestroyChild() is provided to specify the \r
77/// required behavior, not to specify the required implementation. Each consumer of \r
78/// a software protocol is responsible for calling CreateChild() when it requires the \r
79/// protocol and calling DestroyChild() when it is finished with that protocol.\r
80///\r
d1f95000 81struct _EFI_SERVICE_BINDING_PROTOCOL {\r
82 EFI_SERVICE_BINDING_CREATE_CHILD CreateChild;\r
83 EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;\r
84};\r
85\r
86#endif\r