2014-02-27 17:14:41 +08:00
|
|
|
/* types.h
|
|
|
|
|
2015-01-31 22:00:00 +08:00
|
|
|
Copyright (c) 2015, 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,
|
|
|
|
Create,
|
|
|
|
Insert,
|
|
|
|
Replace,
|
|
|
|
Remove,
|
|
|
|
Rebuild,
|
2018-04-30 13:38:54 +08:00
|
|
|
Rebase,
|
|
|
|
DoNotRebuild
|
2014-02-27 17:14:41 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// Types
|
|
|
|
namespace Types {
|
|
|
|
enum ItemTypes {
|
|
|
|
Root = 60,
|
|
|
|
Capsule,
|
|
|
|
Image,
|
|
|
|
Region,
|
|
|
|
Padding,
|
|
|
|
Volume,
|
|
|
|
File,
|
2015-02-06 16:47:19 +08:00
|
|
|
Section,
|
|
|
|
FreeSpace
|
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-08-30 16:52:19 +08:00
|
|
|
UefiCapsule,
|
|
|
|
ToshibaCapsule
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum VolumeSubtypes {
|
|
|
|
UnknownVolume = 90,
|
|
|
|
Ffs2Volume,
|
|
|
|
Ffs3Volume
|
|
|
|
};
|
|
|
|
|
|
|
|
enum RegionSubtypes {
|
|
|
|
DescriptorRegion = 100,
|
|
|
|
GbeRegion,
|
|
|
|
MeRegion,
|
|
|
|
BiosRegion,
|
2015-09-07 05:46:26 +08:00
|
|
|
PdrRegion,
|
|
|
|
EcRegion
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum PaddingSubtypes {
|
|
|
|
ZeroPadding = 110,
|
|
|
|
OnePadding,
|
|
|
|
DataPadding
|
|
|
|
};
|
|
|
|
};
|
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
|