]> git.proxmox.com Git - ceph.git/blob - ceph/src/mon/CommandHandler.h
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / mon / CommandHandler.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2019 Red Hat Ltd
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15
16 #ifndef COMMAND_HANDLER_H_
17 #define COMMAND_HANDLER_H_
18
19 #include <ostream>
20 #include <string_view>
21
22 class CommandHandler
23 {
24 public:
25 /**
26 * Parse true|yes|1 style boolean string from `bool_str`
27 * `result` must be non-null.
28 * `ss` will be populated with error message on error.
29 *
30 * @return 0 on success, else -EINVAL
31 */
32 int parse_bool(std::string_view str, bool* result, std::ostream& ss);
33 };
34
35 #endif