1
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2
/* vim:set et sts=4: */
3
/* ibus - The Input Bus
4
* Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
5
* Copyright (C) 2008-2010 Red Hat, Inc.
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the
19
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
* Boston, MA 02111-1307, USA.
24
* @short_description: Error message output.
27
* An IBusError is actually a #DBusError.
28
* Functions listed here are convenient wrapper for IBusError new and free.
30
#ifndef __IBUS_ERROR_H_
31
#define __IBUS_ERROR_H_
40
* @returns: A newly allocated IBusError.
42
* New an empty IBusError.
44
IBusError *ibus_error_new (void);
47
* ibus_error_new_from_text:
48
* @name: The error name.
49
* @message: Detailed error message.
50
* @returns: A newly allocated IBusError.
52
* New an IBusError from error name and message.
54
IBusError *ibus_error_new_from_text (const gchar *name,
55
const gchar *message);
58
* ibus_error_new_from_printf:
59
* @name: The error name.
60
* @format_message: printf() formatted error message.
61
* @...: Formatting parameters.
62
* @returns: A newly allocated IBusError.
64
* New an IBusError from error name and a printf-formatted message.
66
IBusError *ibus_error_new_from_printf (const gchar *name,
67
const gchar *format_message,
71
* ibus_error_new_from_message:
72
* @message: A DBusMessage
73
* @returns: A newly allocated IBusError.
75
* New an IBusError from a #IBusMessage.
77
IBusError *ibus_error_new_from_message
78
(IBusMessage *message);
82
* @error: An IBusError
86
void ibus_error_free (IBusError *error);