5 * Copyright (C) 2014 Intel Corporation. All rights reserved.
6 * Copyright (C) 2018 GlobalLogic. All rights reserved.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #include "tethering.h"
28 void __connmanctl_tethering_clients_list(DBusMessageIter *iter)
30 DBusMessageIter array;
33 if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
36 dbus_message_iter_recurse(iter, &array);
37 while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_STRING) {
38 dbus_message_iter_get_basic(&array, &addr);
40 fprintf(stdout, "%s", addr);
42 if (dbus_message_iter_has_next(&array))
43 fprintf(stdout, "\n");
45 dbus_message_iter_next(&array);
48 dbus_message_iter_next(iter);
49 if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
52 dbus_message_iter_recurse(iter, &array);
53 while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_STRING) {
54 dbus_message_iter_get_basic(&array, &addr);
56 fprintf(stdout, "\n%s %s", "removed", addr);
58 if (dbus_message_iter_has_next(&array))
59 fprintf(stdout, "\n");
61 dbus_message_iter_next(&array);