blob: e4b8565d60be74574757049ca50e517503363a31 [file] [log] [blame]
// Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef KERBEROS_KERBEROS_ADAPTOR_H_
#define KERBEROS_KERBEROS_ADAPTOR_H_
#include <memory>
#include <base/macros.h>
#include <brillo/dbus/async_event_sequencer.h>
#include "kerberos/org.chromium.Kerberos.h"
namespace brillo {
namespace dbus_utils {
class DBusObject;
}
} // namespace brillo
namespace kerberos {
// Implementation of the Kerberos D-Bus interface.
class KerberosAdaptor : public org::chromium::KerberosAdaptor,
public org::chromium::KerberosInterface {
public:
explicit KerberosAdaptor(
std::unique_ptr<brillo::dbus_utils::DBusObject> dbus_object);
~KerberosAdaptor();
// Registers the D-Bus object and interfaces.
void RegisterAsync(
const brillo::dbus_utils::AsyncEventSequencer::CompletionAction&
completion_callback);
// org::chromium::KerberosInterface: (see org.chromium.Kerberos.xml).
void Test(bool test) override;
private:
std::unique_ptr<brillo::dbus_utils::DBusObject> dbus_object_;
DISALLOW_COPY_AND_ASSIGN(KerberosAdaptor);
};
} // namespace kerberos
#endif // KERBEROS_KERBEROS_ADAPTOR_H_