/** @file
This is an example of how a driver retrieve HII data using HII Package List
Protocol, and how to publish the HII data.
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <Uefi.h>
#include <Guid/HiiResourceSampleHii.h>
#include <Protocol/HiiPackageList.h>
#include <Library/DevicePathLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiHiiServicesLib.h>
#pragma pack(1)
///
/// HII specific Vendor Device Path definition.
///
typedef struct {
#pragma pack()
{
{
{
(UINT8) (sizeof (VENDOR_DEVICE_PATH)),
}
},
},
{
{
}
}
};
/**
Main entry for this driver.
@param[in] ImageHandle Image handle this driver.
@param[in] SystemTable Pointer to SystemTable.
@retval EFI_SUCESS This function always complete successfully.
**/
)
{
//
// Retrieve HII package list from ImageHandle
//
(VOID **) &PackageList,
NULL,
);
return Status;
}
//
// Publish sample Fromset
//
);
return Status;
}
//
// Publish HII package list to HII Database.
//
);
return Status;
}
return EFI_SUCCESS;
}
/**
Unloads the application and its installed protocol.
@param[in] ImageHandle Handle that identifies the image to be unloaded.
@retval EFI_SUCCESS The image has been unloaded.
**/
)
{
if (mDriverHandle != NULL) {
);
}
if (mHiiHandle != NULL) {
mHiiHandle = NULL;
}
return EFI_SUCCESS;
}