2
* Copyright © 2012 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Thomas Voß <thomas.voss@canonical.com>
18
#ifndef CORE_DBUS_MESSAGE_FACTORY_IMPL_H_
19
#define CORE_DBUS_MESSAGE_FACTORY_IMPL_H_
21
#include <core/dbus/message_factory.h>
29
struct MessageFactory : public core::dbus::MessageFactory
31
MessageFactory() = default;
33
inline std::shared_ptr<Message> make_method_call(
34
const std::string& destination,
35
const types::ObjectPath& path,
36
const std::string& interface,
37
const std::string& method)
39
return Message::make_method_call(destination, path, interface, method);
42
inline std::shared_ptr<Message> make_method_return(const Message::Ptr& msg)
44
return Message::make_method_return(msg);
47
inline std::shared_ptr<Message> make_signal(
48
const std::string& path,
49
const std::string& interface,
50
const std::string& signal)
52
return Message::make_signal(path, interface, signal);
55
inline std::shared_ptr<Message> make_error(
56
const Message::Ptr& in_reply_to,
57
const std::string& error_name,
58
const std::string& error_desc)
60
return Message::make_error(in_reply_to, error_name, error_desc);
67
#endif // CORE_DBUS_MESSAGE_FACTORY_H_