Loading...
Searching...
No Matches
oval_dbus.h
/*
* Copyright 2023 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Evgenii Kolesnikov <ekolesni@redhat.com>
*/
#ifndef OPENSCAP_OVAL_DBUS_H_
#define OPENSCAP_OVAL_DBUS_H_
#include <dbus/dbus.h>
// Old versions of libdbus API don't have DBusBasicValue and DBus8ByteStruct
// as a public typedefs.
// These two typedefs were copied from libdbus 1.8 branch, see
// http://cgit.freedesktop.org/dbus/dbus/tree/dbus/dbus-types.h?h=dbus-1.8#n137
typedef struct
{
dbus_uint32_t first32;
dbus_uint32_t second32;
} _DBus8ByteStruct;
typedef union
{
unsigned char bytes[8];
dbus_int16_t i16;
dbus_uint16_t u16;
dbus_int32_t i32;
dbus_uint32_t u32;
dbus_bool_t bool_val;
#ifdef DBUS_HAVE_INT64
dbus_int64_t i64;
dbus_uint64_t u64;
#endif
_DBus8ByteStruct eight;
double dbl;
unsigned char byt;
char *str;
int fd;
} _DBusBasicValue;
char *oval_dbus_value_to_string(DBusMessageIter *iter);
DBusConnection *oval_connect_dbus(void);
void oval_disconnect_dbus(DBusConnection *conn);
#endif
_DBus8ByteStruct
Definition oval_dbus.h:34
_DBusBasicValue
Definition oval_dbus.h:40
_DBusBasicValue::u16
dbus_uint16_t u16
as int16
Definition oval_dbus.h:43
_DBusBasicValue::i16
dbus_int16_t i16
as int16
Definition oval_dbus.h:42
_DBusBasicValue::dbl
double dbl
as double
Definition oval_dbus.h:52
_DBusBasicValue::bytes
unsigned char bytes[8]
as 8 individual bytes
Definition oval_dbus.h:41
_DBusBasicValue::eight
_DBus8ByteStruct eight
as 8-byte struct
Definition oval_dbus.h:51
_DBusBasicValue::str
char * str
as char* (string, object path or signature)
Definition oval_dbus.h:54
_DBusBasicValue::fd
int fd
as Unix file descriptor
Definition oval_dbus.h:55
_DBusBasicValue::u32
dbus_uint32_t u32
as int32
Definition oval_dbus.h:45
_DBusBasicValue::bool_val
dbus_bool_t bool_val
as boolean
Definition oval_dbus.h:46
_DBusBasicValue::byt
unsigned char byt
as byte
Definition oval_dbus.h:53
_DBusBasicValue::i32
dbus_int32_t i32
as int32
Definition oval_dbus.h:44