2013-07-12 10:13:04 +00:00
|
|
|
/*
|
|
|
|
* virdbuspriv.h: internal APIs for testing DBus code
|
|
|
|
*
|
2014-11-19 21:57:30 +00:00
|
|
|
* Copyright (C) 2012-2014 Red Hat, Inc.
|
2013-07-12 10:13:04 +00:00
|
|
|
*
|
|
|
|
* 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, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#ifndef LIBVIRT_VIRDBUSPRIV_H_ALLOW
|
2018-12-13 13:32:06 +00:00
|
|
|
# error "virdbuspriv.h may only be included by virdbus.c or test suites"
|
2018-12-13 14:53:50 +00:00
|
|
|
#endif /* LIBVIRT_VIRDBUSPRIV_H_ALLOW */
|
2018-12-13 13:32:06 +00:00
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#ifndef LIBVIRT_VIRDBUSPRIV_H
|
|
|
|
# define LIBVIRT_VIRDBUSPRIV_H
|
2013-07-12 10:13:04 +00:00
|
|
|
|
|
|
|
# include "virdbus.h"
|
|
|
|
|
2014-11-20 15:48:19 +00:00
|
|
|
# if defined(WITH_DBUS) && !HAVE_DBUSBASICVALUE
|
2014-11-19 21:57:30 +00:00
|
|
|
/* Copied (and simplified) from dbus 1.6.12, for use with older dbus headers */
|
|
|
|
typedef union
|
|
|
|
{
|
|
|
|
dbus_int16_t i16; /**< as int16 */
|
|
|
|
dbus_uint16_t u16; /**< as int16 */
|
|
|
|
dbus_int32_t i32; /**< as int32 */
|
|
|
|
dbus_uint32_t u32; /**< as int32 */
|
|
|
|
dbus_bool_t bool_val; /**< as boolean */
|
|
|
|
dbus_int64_t i64; /**< as int64 */
|
|
|
|
dbus_uint64_t u64; /**< as int64 */
|
|
|
|
double dbl; /**< as double */
|
|
|
|
unsigned char byt; /**< as byte */
|
|
|
|
} DBusBasicValue;
|
|
|
|
# endif
|
2013-07-12 10:13:04 +00:00
|
|
|
|
|
|
|
int virDBusMessageEncodeArgs(DBusMessage* msg,
|
|
|
|
const char *types,
|
|
|
|
va_list args);
|
|
|
|
|
|
|
|
int virDBusMessageDecodeArgs(DBusMessage* msg,
|
|
|
|
const char *types,
|
|
|
|
va_list args);
|
|
|
|
|
|
|
|
int virDBusMessageEncode(DBusMessage* msg,
|
|
|
|
const char *types,
|
|
|
|
...);
|
|
|
|
|
|
|
|
int virDBusMessageDecode(DBusMessage* msg,
|
|
|
|
const char *types,
|
|
|
|
...);
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#endif /* LIBVIRT_VIRDBUSPRIV_H */
|