~thomas-voss/dbus-cpp/add_support_for_get_connection_app_armor_security_context

« back to all changes in this revision

Viewing changes to include/core/dbus/message_streaming_operators.h

  • Committer: Tarmac
  • Author(s): thomas-voss, Thomas Voß
  • Date: 2013-12-12 13:25:20 UTC
  • mfrom: (11.2.42 dbus-cpp-refactoring)
  • Revision ID: tarmac-20131212132520-gi9pig97oo57tke5
 * Add introspect function to autogenerated protocol header files.
 * Add a code generator for protocol header files.
 * Split up files and move the boost::asio executor implementation into src.
 * Force definitions inline.

Approved by Timo Jyrinki, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2012 Canonical Ltd.
 
3
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 *
 
16
 * Authored by: Thomas Voß <thomas.voss@canonical.com>
 
17
 */
 
18
#ifndef CORE_DBUS_MESSAGE_STREAMING_OPERATORS_H_
 
19
#define CORE_DBUS_MESSAGE_STREAMING_OPERATORS_H_
 
20
 
 
21
#include <core/dbus/codec.h>
 
22
 
 
23
namespace core
 
24
{
 
25
namespace dbus
 
26
{
 
27
template<typename T>
 
28
Message::Reader operator>>(Message::Reader reader, T& out)
 
29
{
 
30
    decode_argument(reader, out);
 
31
    return std::move(reader);
 
32
}
 
33
 
 
34
template<typename T>
 
35
Message::Writer operator<<(Message::Writer writer, const T& out)
 
36
{
 
37
    encode_argument(writer, out);
 
38
    return std::move(writer);
 
39
}
 
40
}
 
41
}
 
42
 
 
43
#endif // CORE_DBUS_MESSAGE_STREAMING_OPERATORS_H_