1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * Copyright (C) 2003 Imendio AB 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public License as 7 * published by the Free Software Foundation; either version 2 of the 8 * License, or (at your option) any later version. 9 * 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 GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this program; if not, see <https://www.gnu.org/licenses> 17 */ 18 19 #ifndef __LM_ERROR_H__ 20 #define __LM_ERROR_H__ 21 22 #if !defined (LM_INSIDE_LOUDMOUTH_H) && !defined (LM_COMPILATION) 23 #error "Only <loudmouth/loudmouth.h> can be included directly, this file may disappear or change contents." 24 #endif 25 26 #include <glib.h> 27 28 G_BEGIN_DECLS 29 30 /** 31 * LM_ERROR: 32 * 33 * Macro for getting the error quark. 34 */ 35 #define LM_ERROR lm_error_quark () 36 37 /** 38 * LmError: 39 * @LM_ERROR_CONNECTION_NOT_OPEN: Connection not open when trying to send a message 40 * @LM_ERROR_CONNECTION_OPEN: Connection is already open when trying to open it again. 41 * @LM_ERROR_AUTH_FAILED: Authentication failed while opening connection 42 * @LM_ERROR_CONNECTION_FAILED: 43 * 44 * Describes the problem of the error. 45 */ 46 typedef enum { 47 LM_ERROR_CONNECTION_NOT_OPEN, 48 LM_ERROR_CONNECTION_OPEN, 49 LM_ERROR_AUTH_FAILED, 50 LM_ERROR_CONNECTION_FAILED 51 } LmError; 52 53 GQuark lm_error_quark (void) G_GNUC_CONST; 54 55 G_END_DECLS 56 57 #endif /* __LM_ERROR_H__ */ 58