2014-02-27 17:14:41 +08:00
|
|
|
/* types.h
|
|
|
|
|
2016-02-02 09:08:08 +08:00
|
|
|
Copyright (c) 2016, Nikolaj Schlej. All rights reserved.
|
2014-02-27 17:14:41 +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,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#ifndef TYPES_H
|
|
|
|
#define TYPES_H
|
2014-02-27 17:14:41 +08:00
|
|
|
|
|
|
|
#include "basetypes.h"
|
|
|
|
|
|
|
|
// Actions
|
|
|
|
namespace Actions
|
|
|
|
{
|
|
|
|
enum ActionTypes {
|
|
|
|
NoAction = 50,
|
2015-05-15 01:15:19 +08:00
|
|
|
Erase,
|
2014-02-27 17:14:41 +08:00
|
|
|
Create,
|
|
|
|
Insert,
|
|
|
|
Replace,
|
|
|
|
Remove,
|
|
|
|
Rebuild,
|
|
|
|
Rebase
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// Types
|
|
|
|
namespace Types {
|
|
|
|
enum ItemTypes {
|
|
|
|
Root = 60,
|
|
|
|
Capsule,
|
|
|
|
Image,
|
|
|
|
Region,
|
|
|
|
Padding,
|
|
|
|
Volume,
|
|
|
|
File,
|
2015-02-06 16:47:19 +08:00
|
|
|
Section,
|
2016-03-21 06:59:03 +08:00
|
|
|
FreeSpace,
|
2016-04-07 14:23:37 +08:00
|
|
|
NvramStoreVss,
|
|
|
|
NvramStoreFdc,
|
|
|
|
NvramStoreFsys,
|
|
|
|
NvramStoreEvsa,
|
2016-04-13 07:35:18 +08:00
|
|
|
NvramStoreFlashMap,
|
|
|
|
NvramStoreFtw,
|
2016-03-28 21:03:32 +08:00
|
|
|
NvramVariableNvar,
|
2016-04-05 06:47:34 +08:00
|
|
|
NvramVariableVss,
|
2016-04-13 07:35:18 +08:00
|
|
|
NvramEntryFsys,
|
|
|
|
NvramEntryEvsa,
|
|
|
|
NvramEntryFlashMap,
|
2014-02-27 17:14:41 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-02-06 16:47:19 +08:00
|
|
|
namespace Subtypes {
|
|
|
|
enum ImageSubtypes{
|
2016-04-07 14:23:37 +08:00
|
|
|
IntelImage = 90,
|
2015-02-06 16:47:19 +08:00
|
|
|
UefiImage
|
|
|
|
};
|
|
|
|
|
|
|
|
enum CapsuleSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
AptioSignedCapsule = 100,
|
2015-02-06 16:47:19 +08:00
|
|
|
AptioUnsignedCapsule,
|
2015-09-01 03:34:42 +08:00
|
|
|
UefiCapsule,
|
|
|
|
ToshibaCapsule
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum VolumeSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
UnknownVolume = 110,
|
2015-02-06 16:47:19 +08:00
|
|
|
Ffs2Volume,
|
2016-03-28 21:03:32 +08:00
|
|
|
Ffs3Volume,
|
2016-04-07 14:23:37 +08:00
|
|
|
NvramVolume
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum RegionSubtypes {
|
2016-02-02 09:08:08 +08:00
|
|
|
DescriptorRegion = 0,
|
2015-02-06 16:47:19 +08:00
|
|
|
BiosRegion,
|
2016-02-02 09:08:08 +08:00
|
|
|
MeRegion,
|
|
|
|
GbeRegion,
|
2015-12-30 06:39:43 +08:00
|
|
|
PdrRegion,
|
2016-02-02 09:08:08 +08:00
|
|
|
Reserved1Region,
|
|
|
|
Reserved2Region,
|
|
|
|
Reserved3Region,
|
|
|
|
EcRegion,
|
|
|
|
Reserved4Region
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum PaddingSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
ZeroPadding = 120,
|
2015-02-06 16:47:19 +08:00
|
|
|
OnePadding,
|
|
|
|
DataPadding
|
|
|
|
};
|
2016-03-21 06:59:03 +08:00
|
|
|
|
|
|
|
enum NvarVariableSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
InvalidNvarVariable = 130,
|
|
|
|
InvalidLinkNvarVariable,
|
|
|
|
LinkNvarVariable,
|
|
|
|
DataNvarVariable,
|
|
|
|
FullNvarVariable
|
2016-03-21 06:59:03 +08:00
|
|
|
};
|
2016-03-28 21:03:32 +08:00
|
|
|
|
|
|
|
enum VssVariableSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
InvalidVssVariable = 140,
|
|
|
|
StandardVssVariable,
|
|
|
|
Crc32VssVariable,
|
|
|
|
AuthVssVariable
|
|
|
|
};
|
|
|
|
|
|
|
|
enum EvsaVariableSubtypes {
|
|
|
|
InvalidEvsaEntry = 150,
|
|
|
|
UnknownEvsaEntry,
|
|
|
|
GuidEvsaEntry,
|
|
|
|
NameEvsaEntry,
|
|
|
|
DataEvsaEntry,
|
2016-03-28 21:03:32 +08:00
|
|
|
};
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
2014-02-27 17:14:41 +08:00
|
|
|
|
|
|
|
// *ToQString conversion routines
|
|
|
|
extern QString actionTypeToQString(const UINT8 action);
|
|
|
|
extern QString itemTypeToQString(const UINT8 type);
|
2015-02-06 16:47:19 +08:00
|
|
|
extern QString itemSubtypeToQString(const UINT8 type, const UINT8 subtype);
|
2015-01-31 22:00:00 +08:00
|
|
|
extern QString compressionTypeToQString(const UINT8 algorithm);
|
2014-02-27 17:14:41 +08:00
|
|
|
extern QString regionTypeToQString(const UINT8 type);
|
2015-02-06 16:47:19 +08:00
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#endif // TYPES_H
|