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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TYPES_H__
|
|
|
|
#define __TYPES_H__
|
|
|
|
|
|
|
|
#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-03-28 21:03:32 +08:00
|
|
|
NvramVariableNvar,
|
|
|
|
NvramStorageVss,
|
|
|
|
NvramVariableVss
|
2014-02-27 17:14:41 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-02-06 16:47:19 +08:00
|
|
|
namespace Subtypes {
|
|
|
|
enum ImageSubtypes{
|
|
|
|
IntelImage = 70,
|
|
|
|
UefiImage
|
|
|
|
};
|
|
|
|
|
|
|
|
enum CapsuleSubtypes {
|
|
|
|
AptioSignedCapsule = 80,
|
|
|
|
AptioUnsignedCapsule,
|
2015-09-01 03:34:42 +08:00
|
|
|
UefiCapsule,
|
|
|
|
ToshibaCapsule
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum VolumeSubtypes {
|
|
|
|
UnknownVolume = 90,
|
|
|
|
Ffs2Volume,
|
2016-03-28 21:03:32 +08:00
|
|
|
Ffs3Volume,
|
|
|
|
VssNvramVolume
|
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 {
|
|
|
|
ZeroPadding = 110,
|
|
|
|
OnePadding,
|
|
|
|
DataPadding
|
|
|
|
};
|
2016-03-21 06:59:03 +08:00
|
|
|
|
|
|
|
enum NvarVariableSubtypes {
|
|
|
|
InvalidNvar = 120,
|
2016-03-21 16:54:20 +08:00
|
|
|
InvalidLinkNvar,
|
2016-03-21 06:59:03 +08:00
|
|
|
LinkNvar,
|
|
|
|
DataNvar,
|
|
|
|
FullNvar
|
|
|
|
};
|
2016-03-28 21:03:32 +08:00
|
|
|
|
|
|
|
enum VssVariableSubtypes {
|
|
|
|
InvalidVss = 130,
|
|
|
|
StandardVss,
|
|
|
|
AppleCrc32Vss,
|
|
|
|
AuthVss
|
|
|
|
};
|
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
|
|
|
|
2014-02-27 17:14:41 +08:00
|
|
|
#endif
|