lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type46.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: LGPL-2.1-or-later
3 *
4 * This file is part of lazybios.
5 *
6 * lazybios is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * lazybios is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with lazybios. If not, see <https://www.gnu.org/licenses/>.
18 */
19/**
20 * @file type46.h
21 * @brief Public API for SMBIOS Type 46 String Property.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE46_H
26#define LAZYBIOS_TYPE46_H
27
28#ifndef LAZYBIOS_SHARED_API_H
29#define LAZYBIOS_TYPE_HEADER_ONLY
30#include "lazybios/lazybios.h"
31#undef LAZYBIOS_TYPE_HEADER_ONLY
32#endif
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/** @brief Availability metadata for SMBIOS Type 46 fields. */
44
45/**
46 * @brief Decoded forms of the Type 46 encoded fields.
47 *
48 * Each member holds the decoded form of the raw field it is named for.
49 * Consult the matching `field_status` member before using one.
50 */
51typedef struct {
52 const char* string_property_id;
54
55/**
56 * @brief Parsed SMBIOS Type 46 String Property.
57 * @ingroup api_type46
58 */
68
69/**
70 * @brief A parsed set of SMBIOS Type 46 structures.
71 * @ingroup api_type46
72 */
77
78/** @addtogroup api_type46
79 * @{
80 */
81
82/**
83 * @brief Parses all SMBIOS Type 46 structures.
84 * @param DMIData Raw DMI table container to parse.
85 * @return Newly allocated set, empty when the table holds no Type 46 structure,
86 * or NULL when the arguments are unusable or an allocation fails.
87 */
89
90/**
91 * @brief Releases a parsed set of SMBIOS Type 46 structures.
92 * @param Type46 Set to release; may be NULL.
93 */
95
96/** @} */
97
98#ifdef __cplusplus
99}
100#endif
101
102#endif
void lazybiosFreeType46(lazybiosType46Array_t *Type46)
Releases a parsed set of SMBIOS Type 46 structures.
LAZYBIOS_WARN_UNUSED lazybiosType46Array_t * lazybiosGetType46(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 46 structures.
Public API for lazybios. Include this and nothing else.
uint8_t lazybiosFieldStatus_t
Storage for one field's availability.
Definition lazybios.h:115
#define LAZYBIOS_WARN_UNUSED
Expands to nothing on compilers without a return-value check.
Definition lazybios.h:150
Owns raw DMI table data and its parsed SMBIOS entry point.
Definition lazybios.h:218
A parsed set of SMBIOS Type 46 structures.
Definition type46.h:73
lazybiosType46_t * entries
Definition type46.h:74
Decoded forms of the Type 46 encoded fields.
Definition type46.h:51
const char * string_property_id
Definition type46.h:52
Availability metadata for SMBIOS Type 46 fields.
Definition type46.h:39
lazybiosFieldStatus_t string_property_id
Definition type46.h:40
lazybiosFieldStatus_t parent_handle
Definition type46.h:42
lazybiosFieldStatus_t string_property_value
Definition type46.h:41
Parsed SMBIOS Type 46 String Property.
Definition type46.h:59
uint16_t parent_handle
Definition type46.h:64
uint16_t string_property_id
Definition type46.h:62
uint8_t length
Definition type46.h:61
lazybiosType46Decoded_t decoded
Definition type46.h:65
lazybiosType46FieldStatus_t field_status
Definition type46.h:66
const char * string_property_value
Definition type46.h:63
uint16_t handle
Definition type46.h:60