2017-02-14 14:39:16 +08:00
|
|
|
/* guiddatabase.h
|
|
|
|
|
2019-01-08 00:26:31 +08:00
|
|
|
Copyright (c) 2017, LongSoft. All rights reserved.
|
2017-02-14 14:39:16 +08:00
|
|
|
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
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GUID_DATABASE_H
|
|
|
|
#define GUID_DATABASE_H
|
|
|
|
|
2019-01-08 00:26:31 +08:00
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
|
2017-02-14 14:39:16 +08:00
|
|
|
#include "basetypes.h"
|
|
|
|
#include "ustring.h"
|
2019-01-08 00:26:31 +08:00
|
|
|
#include "ffsparser.h"
|
|
|
|
#include "ffs.h"
|
|
|
|
#include "utility.h"
|
|
|
|
|
2022-09-14 08:58:36 +08:00
|
|
|
struct OperatorLessForGuids
|
2019-01-08 00:26:31 +08:00
|
|
|
{
|
|
|
|
bool operator()(const EFI_GUID& lhs, const EFI_GUID& rhs) const
|
|
|
|
{
|
|
|
|
return (memcmp(&lhs, &rhs, sizeof(EFI_GUID)) < 0);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::map<EFI_GUID, UString, OperatorLessForGuids> GuidDatabase;
|
2017-02-14 14:39:16 +08:00
|
|
|
|
|
|
|
UString guidDatabaseLookup(const EFI_GUID & guid);
|
|
|
|
void initGuidDatabase(const UString & path = "", UINT32* numEntries = NULL);
|
2019-01-08 00:26:31 +08:00
|
|
|
GuidDatabase guidDatabaseFromTreeRecursive(TreeModel * model, const UModelIndex index);
|
2019-01-08 04:01:04 +08:00
|
|
|
USTATUS guidDatabaseExportToFile(const UString & outPath, GuidDatabase & db);
|
2017-02-14 14:39:16 +08:00
|
|
|
|
|
|
|
#endif // GUID_DATABASE_H
|