chromium/dbus/property.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "dbus/property.h"

#include <stddef.h>

#include <memory>

#include "base/functional/bind.h"
#include "base/logging.h"

#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"

namespace dbus {

//
// PropertyBase implementation.
//

PropertyBase::PropertyBase() :{}

PropertyBase::~PropertyBase() = default;

void PropertyBase::Init(PropertySet* property_set, const std::string& name) {}

//
// PropertySet implementation.
//

PropertySet::PropertySet(
    ObjectProxy* object_proxy,
    const std::string& interface,
    const PropertyChangedCallback& property_changed_callback)
    :{}

PropertySet::~PropertySet() = default;

void PropertySet::RegisterProperty(const std::string& name,
                                   PropertyBase* property) {}

void PropertySet::ConnectSignals() {}


void PropertySet::ChangedReceived(Signal* signal) {}

void PropertySet::ChangedConnected(const std::string& interface_name,
                                   const std::string& signal_name,
                                   bool success) {}


void PropertySet::Get(PropertyBase* property, GetCallback callback) {}

void PropertySet::OnGet(PropertyBase* property, GetCallback callback,
                        Response* response) {}

bool PropertySet::GetAndBlock(PropertyBase* property) {}

void PropertySet::GetAll() {}

void PropertySet::OnGetAll(Response* response) {}

void PropertySet::Set(PropertyBase* property, SetCallback callback) {}

bool PropertySet::SetAndBlock(PropertyBase* property) {}

void PropertySet::OnSet(PropertyBase* property,
                        SetCallback callback,
                        Response* response) {}

bool PropertySet::UpdatePropertiesFromReader(MessageReader* reader) {}

bool PropertySet::UpdatePropertyFromReader(MessageReader* reader) {}

bool PropertySet::InvalidatePropertiesFromReader(MessageReader* reader) {}

void PropertySet::NotifyPropertyChanged(const std::string& name) {}

//
// Property<Byte> specialization.
//

template <>
Property<uint8_t>::Property()
    :{}

template <>
bool Property<uint8_t>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<uint8_t>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<bool> specialization.
//

template <>
Property<bool>::Property() :{}

template <>
bool Property<bool>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<bool>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<int16_t> specialization.
//

template <>
Property<int16_t>::Property()
    :{}

template <>
bool Property<int16_t>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<int16_t>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<uint16_t> specialization.
//

template <>
Property<uint16_t>::Property()
    :{}

template <>
bool Property<uint16_t>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<uint16_t>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<int32_t> specialization.
//

template <>
Property<int32_t>::Property()
    :{}

template <>
bool Property<int32_t>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<int32_t>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<uint32_t> specialization.
//

template <>
Property<uint32_t>::Property()
    :{}

template <>
bool Property<uint32_t>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<uint32_t>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<int64_t> specialization.
//

template <>
Property<int64_t>::Property()
    :{}

template <>
bool Property<int64_t>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<int64_t>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<uint64_t> specialization.
//

template <>
Property<uint64_t>::Property()
    :{}

template <>
bool Property<uint64_t>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<uint64_t>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<double> specialization.
//

template <>
Property<double>::Property() :{}

template <>
bool Property<double>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<double>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<std::string> specialization.
//

template <>
bool Property<std::string>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<std::string>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<ObjectPath> specialization.
//

template <>
bool Property<ObjectPath>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<ObjectPath>::AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<std::vector<std::string>> specialization.
//

template <>
bool Property<std::vector<std::string>>::PopValueFromReader(
    MessageReader* reader) {}

template <>
void Property<std::vector<std::string>>::AppendSetValueToWriter(
    MessageWriter* writer) {}

//
// Property<std::vector<ObjectPath>> specialization.
//

template <>
bool Property<std::vector<ObjectPath>>::PopValueFromReader(
    MessageReader* reader) {}

template <>
void Property<std::vector<ObjectPath>>::AppendSetValueToWriter(
    MessageWriter* writer) {}

//
// Property<std::vector<uint8_t>> specialization.
//

template <>
bool Property<std::vector<uint8_t>>::PopValueFromReader(MessageReader* reader) {}

template <>
void Property<std::vector<uint8_t>>::AppendSetValueToWriter(
    MessageWriter* writer) {}

//
// Property<std::map<std::string, std::string>> specialization.
//

template <>
bool Property<std::map<std::string, std::string>>::PopValueFromReader(
    MessageReader* reader) {}

template <>
void Property<std::map<std::string, std::string>>::AppendSetValueToWriter(
    MessageWriter* writer) {}

//
// Property<std::vector<std::pair<std::vector<uint8_t>, uint16_t>>>
// specialization.
//

template <>
bool Property<std::vector<std::pair<std::vector<uint8_t>, uint16_t>>>::
    PopValueFromReader(MessageReader* reader) {}

template <>
void Property<std::vector<std::pair<std::vector<uint8_t>, uint16_t>>>::
    AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<std::map<std::string, std::vector<uint8_t>>>
// specialization.
//

template <>
bool Property<std::map<std::string, std::vector<uint8_t>>>::PopValueFromReader(
    MessageReader* reader) {}

template <>
void Property<std::map<std::string, std::vector<uint8_t>>>::
    AppendSetValueToWriter(MessageWriter* writer) {}

//
// Property<std::map<uint16_t, std::vector<uint8_t>>>
// specialization.
//

template <>
bool Property<std::map<uint16_t, std::vector<uint8_t>>>::PopValueFromReader(
    MessageReader* reader) {}

template <>
void Property<std::map<uint16_t, std::vector<uint8_t>>>::AppendSetValueToWriter(
    MessageWriter* writer) {}

template class Property<uint8_t>;
template class Property<bool>;
template class Property<int16_t>;
template class Property<uint16_t>;
template class Property<int32_t>;
template class Property<uint32_t>;
template class Property<int64_t>;
template class Property<uint64_t>;
template class Property<double>;
template class Property<std::string>;
template class Property<ObjectPath>;
template class Property<std::vector<std::string>>;
template class Property<std::vector<ObjectPath>>;
template class Property<std::vector<uint8_t>>;
template class Property<std::map<std::string, std::string>>;
template class Property<std::vector<std::pair<std::vector<uint8_t>, uint16_t>>>;
template class Property<std::map<std::string, std::vector<uint8_t>>>;
template class Property<std::map<uint16_t, std::vector<uint8_t>>>;

}  // namespace dbus