Add check target to the CMake build
[centerim5.git] / src / Utils.h
blob8daf3170d8ea9331835ebf60a0aa450e0167f026
1 // Copyright (C) 2010-2015 Petr Pavlu <setup@dagobah.cz>
2 //
3 // This file is part of CenterIM.
4 //
5 // CenterIM is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // CenterIM is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with CenterIM. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef UTILS_H
19 #define UTILS_H
21 #include <libpurple/purple.h>
23 namespace Utils {
25 const char *getStatusIndicator(PurpleStatus *status);
26 char *stripAccelerator(const char *label);
28 // Converts a string to a number. Logs a warning if the value is non-numeric or
29 // out-of-range. Returns true if the conversion was successful, false otherwise.
30 bool stringToNumber(const char *text, long min, long max, long *out);
32 } // namespace Utils
34 #endif // UTILS_H
36 // vim: set tabstop=2 shiftwidth=2 textwidth=80 expandtab: