Initial attempt at timestretching implementation.
[calfbox.git] / errors.h
blobae8206dcf9e3b02a13846305d0ef14e432cf2a11
1 /*
2 Calf Box, an open source musical instrument.
3 Copyright (C) 2010-2011 Krzysztof Foltman
5 This program 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 3 of the License, or
8 (at your option) any later version.
10 This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CBOX_ERRORS_H
20 #define CBOX_ERRORS_H
22 #include <glib.h>
23 #include "cmd.h"
25 #define CBOX_MODULE_ERROR cbox_module_error_quark()
27 enum CboxModuleError
29 CBOX_MODULE_ERROR_FAILED,
30 CBOX_MODULE_ERROR_INVALID_COMMAND,
31 CBOX_MODULE_ERROR_OUT_OF_RANGE,
34 struct cbox_osc_command;
36 extern GQuark cbox_module_error_quark(void);
37 extern void cbox_force_error(GError **error);
38 extern void cbox_print_error(GError *error);
39 extern void cbox_print_error_if(GError *error);
40 extern gboolean cbox_set_command_error(GError **error, const struct cbox_osc_command *cmd);
41 extern gboolean cbox_set_command_error_with_msg(GError **error, const struct cbox_osc_command *cmd, const char *extra_msg);
42 extern gboolean cbox_set_range_error(GError **error, const char *param, double minv, double maxv);
44 #endif