1141cc406Sopenharmony_ci/* sane - Scanner Access Now Easy.
2141cc406Sopenharmony_ci
3141cc406Sopenharmony_ci   Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
4141cc406Sopenharmony_ci
5141cc406Sopenharmony_ci   This file is part of the SANE package.
6141cc406Sopenharmony_ci
7141cc406Sopenharmony_ci   This program is free software; you can redistribute it and/or
8141cc406Sopenharmony_ci   modify it under the terms of the GNU General Public License as
9141cc406Sopenharmony_ci   published by the Free Software Foundation; either version 2 of the
10141cc406Sopenharmony_ci   License, or (at your option) any later version.
11141cc406Sopenharmony_ci
12141cc406Sopenharmony_ci   This program is distributed in the hope that it will be useful, but
13141cc406Sopenharmony_ci   WITHOUT ANY WARRANTY; without even the implied warranty of
14141cc406Sopenharmony_ci   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15141cc406Sopenharmony_ci   General Public License for more details.
16141cc406Sopenharmony_ci
17141cc406Sopenharmony_ci   You should have received a copy of the GNU General Public License
18141cc406Sopenharmony_ci   along with this program.  If not, see <https://www.gnu.org/licenses/>.
19141cc406Sopenharmony_ci*/
20141cc406Sopenharmony_ci
21141cc406Sopenharmony_ci#define DEBUG_DECLARE_ONLY
22141cc406Sopenharmony_ci
23141cc406Sopenharmony_ci#include "status.h"
24141cc406Sopenharmony_ci#include <iostream>
25141cc406Sopenharmony_ci
26141cc406Sopenharmony_cinamespace genesys {
27141cc406Sopenharmony_ci
28141cc406Sopenharmony_cistd::ostream& operator<<(std::ostream& out, Status status)
29141cc406Sopenharmony_ci{
30141cc406Sopenharmony_ci    out << "Status{\n"
31141cc406Sopenharmony_ci        << "    replugged: " << (status.is_replugged ? "yes" : "no") << '\n'
32141cc406Sopenharmony_ci        << "    is_buffer_empty: " << (status.is_buffer_empty ? "yes" : "no") << '\n'
33141cc406Sopenharmony_ci        << "    is_feeding_finished: " << (status.is_feeding_finished ? "yes" : "no") << '\n'
34141cc406Sopenharmony_ci        << "    is_scanning_finished: " << (status.is_scanning_finished ? "yes" : "no") << '\n'
35141cc406Sopenharmony_ci        << "    is_at_home: " << (status.is_at_home ? "yes" : "no") << '\n'
36141cc406Sopenharmony_ci        << "    is_lamp_on: " << (status.is_lamp_on ? "yes" : "no") << '\n'
37141cc406Sopenharmony_ci        << "    is_front_end_busy: " << (status.is_front_end_busy ? "yes" : "no") << '\n'
38141cc406Sopenharmony_ci        << "    is_motor_enabled: " << (status.is_motor_enabled ? "yes" : "no") << '\n'
39141cc406Sopenharmony_ci        << "}\n";
40141cc406Sopenharmony_ci    return out;
41141cc406Sopenharmony_ci}
42141cc406Sopenharmony_ci
43141cc406Sopenharmony_ci} // namespace genesys
44