2 * Copyright (C) 2017 Simon Fels <morphis@gravedo.de>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
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/>.
18 #ifndef ANBOX_DBUS_CODECS_H_
19 #define ANBOX_DBUS_CODECS_H_
21 #include "anbox/wm/stack.h"
23 #include <core/dbus/codec.h>
30 struct Codec<anbox::wm::Stack::Id> {
31 inline static void encode_argument(Message::Writer &out, const anbox::wm::Stack::Id &stack) {
35 out.push_stringn(s.c_str(), s.length());
38 inline static void decode_argument(Message::Reader &in, anbox::wm::Stack::Id &stack) {
40 ss << in.pop_string();