libstorage-ng
Toggle main menu visibility
Loading...
Searching...
No Matches
Gpt.h
1
/*
2
* Copyright (c) [2014-2015] Novell, Inc.
3
* Copyright (c) [2016-2020] SUSE LLC
4
*
5
* All Rights Reserved.
6
*
7
* This program is free software; you can redistribute it and/or modify it
8
* under the terms of version 2 of the GNU General Public License as published
9
* by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14
* more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program; if not, contact Novell, Inc.
18
*
19
* To contact Novell about this file by physical or electronic mail, you may
20
* find current contact information at www.novell.com.
21
*/
22
23
24
#ifndef STORAGE_GPT_H
25
#define STORAGE_GPT_H
26
27
28
#include "storage/Devices/PartitionTable.h"
29
30
31
namespace
storage
32
{
33
34
class
Gpt :
public
PartitionTable
35
{
36
public
:
37
44
static
Gpt*
create
(
Devicegraph
* devicegraph);
45
46
static
Gpt* load(
Devicegraph
* devicegraph,
const
xmlNode* node);
47
51
static
std::vector<Gpt*>
get_all
(
Devicegraph
* devicegraph);
52
56
static
std::vector<const Gpt*>
get_all
(
const
Devicegraph
* devicegraph);
57
61
bool
is_pmbr_boot
()
const
;
62
66
void
set_pmbr_boot
(
bool
pmbr_boot);
67
68
public
:
69
70
class
Impl;
71
72
Impl& get_impl();
73
const
Impl& get_impl()
const
;
74
75
virtual
Gpt* clone()
const override
;
76
virtual
std::unique_ptr<Device> clone_v2()
const override
;
77
78
Gpt(Impl* impl);
79
ST_NO_SWIG Gpt(std::unique_ptr<Device::Impl>&& impl);
80
81
};
82
83
89
bool
is_gpt
(
const
Device
* device);
90
97
Gpt
*
to_gpt
(
Device
* device);
98
102
const
Gpt
*
to_gpt
(
const
Device
* device);
103
104
}
105
106
#endif
storage::Device
An abstract base class for storage devices.
Definition
Device.h:82
storage::Devicegraph
The main container of the libstorage-ng.
Definition
Devicegraph.h:170
storage::Gpt
Definition
Gpt.h:35
storage::Gpt::get_all
static std::vector< Gpt * > get_all(Devicegraph *devicegraph)
Get all GPTs.
storage::Gpt::is_pmbr_boot
bool is_pmbr_boot() const
Query the protective MBR boot flag.
storage::Gpt::get_all
static std::vector< const Gpt * > get_all(const Devicegraph *devicegraph)
Get all GPTs.
storage::Gpt::set_pmbr_boot
void set_pmbr_boot(bool pmbr_boot)
Set the protective MBR boot flag.
storage::Gpt::create
static Gpt * create(Devicegraph *devicegraph)
Create a device of type Gpt.
storage
The storage namespace.
Definition
Actiongraph.h:40
storage::is_gpt
bool is_gpt(const Device *device)
Checks whether device points to a Gpt.
storage::to_gpt
Gpt * to_gpt(Device *device)
Converts pointer to Device to pointer to Gpt.
storage
Devices
Gpt.h
Generated by
1.17.0