#ifndef COMPONENTS_DBUS_PROPERTIES_TYPES_H_
#define COMPONENTS_DBUS_PROPERTIES_TYPES_H_
#include <stdint.h>
#include <map>
#include <memory>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include "base/component_export.h"
#include "base/memory/scoped_refptr.h"
#include "dbus/message.h"
namespace base {
class RefCountedMemory;
}
namespace detail {
template <std::size_t i,
typename... Ts,
std::enable_if_t<i == sizeof...(Ts), int> = 0>
void WriteDbusTypeTuple(const std::tuple<Ts...>&, dbus::MessageWriter*) { … }
template <std::size_t i,
typename... Ts,
std::enable_if_t<(i < sizeof...(Ts)), int> = 0>
void WriteDbusTypeTuple(const std::tuple<Ts...>& ts,
dbus::MessageWriter* writer) { … }
template <typename... Ts>
void WriteDbusTypeTuple(const std::tuple<Ts...>& ts,
dbus::MessageWriter* writer) { … }
template <std::size_t i,
typename... Ts,
std::enable_if_t<i == sizeof...(Ts), int> = 0>
std::string GetDbusTypeTupleSignature() { … }
template <std::size_t i,
typename... Ts,
std::enable_if_t<(i < sizeof...(Ts)), int> = 0>
std::string GetDbusTypeTupleSignature() { … }
template <typename... Ts>
std::string GetDbusTypeTupleSignature() { … }
}
class COMPONENT_EXPORT(DBUS) DbusType { … };
template <typename T>
class DbusTypeImpl : public DbusType { … };
class COMPONENT_EXPORT(DBUS) DbusBoolean : public DbusTypeImpl<DbusBoolean> { … };
class COMPONENT_EXPORT(DBUS) DbusInt32 : public DbusTypeImpl<DbusInt32> { … };
class COMPONENT_EXPORT(DBUS) DbusUint32 : public DbusTypeImpl<DbusUint32> { … };
class COMPONENT_EXPORT(DBUS) DbusInt64 : public DbusTypeImpl<DbusInt64> { … };
class COMPONENT_EXPORT(DBUS) DbusDouble : public DbusTypeImpl<DbusDouble> { … };
class COMPONENT_EXPORT(DBUS) DbusString : public DbusTypeImpl<DbusString> { … };
class COMPONENT_EXPORT(DBUS) DbusObjectPath
: public DbusTypeImpl<DbusObjectPath> { … };
class COMPONENT_EXPORT(DBUS) DbusVariant : public DbusTypeImpl<DbusVariant> { … };
template <typename T>
DbusVariant MakeDbusVariant(T t) { … }
template <typename T>
class COMPONENT_EXPORT(DBUS) DbusArray : public DbusTypeImpl<DbusArray<T>> { … };
template <typename... Ts>
auto MakeDbusArray(Ts&&... ts) { … }
class COMPONENT_EXPORT(DBUS) DbusByteArray
: public DbusTypeImpl<DbusByteArray> { … };
template <typename... Ts>
class COMPONENT_EXPORT(DBUS) DbusStruct
: public DbusTypeImpl<DbusStruct<Ts...>> { … };
template <typename... Ts>
auto MakeDbusStruct(Ts&&... ts) { … }
template <typename K, typename V>
class COMPONENT_EXPORT(DBUS) DbusDictEntry
: public DbusTypeImpl<DbusDictEntry<K, V>> { … };
template <typename K, typename V>
auto MakeDbusDictEntry(K&& k, V&& v) { … }
class COMPONENT_EXPORT(DBUS) DbusDictionary
: public DbusTypeImpl<DbusDictionary> { … };
#endif