~ubuntu-branches/ubuntu/oneiric/gconf/oneiric-proposed

« back to all changes in this revision

Viewing changes to gconf/gconf-glib-public.h

  • Committer: Bazaar Package Importer
  • Author(s): Takuo KITAME
  • Date: 2002-03-17 01:51:39 UTC
  • Revision ID: james.westby@ubuntu.com-20020317015139-z4f8fdg1hoe049g0
Tags: upstream-1.0.9
ImportĀ upstreamĀ versionĀ 1.0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GConf
 
2
 * Copyright (C) 1999, 2000 Red Hat Inc.
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
#ifndef GCONF_GCONF_GLIB_PUBLIC_H
 
21
#define GCONF_GCONF_GLIB_PUBLIC_H
 
22
 
 
23
#include <glib.h>
 
24
 
 
25
#ifdef __cplusplus
 
26
extern "C" {
 
27
#endif /* __cplusplus */
 
28
 
 
29
typedef struct _GError GError;
 
30
 
 
31
struct _GError
 
32
{
 
33
  GQuark       domain;
 
34
  gint         code;
 
35
  gchar       *message;
 
36
};
 
37
 
 
38
GError*  g_error_new           (GQuark         domain,
 
39
                                gint           code,
 
40
                                const gchar   *format,
 
41
                                ...) G_GNUC_PRINTF (3, 4);
 
42
 
 
43
GError*  g_error_new_literal   (GQuark         domain,
 
44
                                gint           code,
 
45
                                const gchar   *message);
 
46
 
 
47
void     g_error_free          (GError        *error);
 
48
GError*  g_error_copy          (const GError  *error);
 
49
 
 
50
gboolean g_error_matches       (const GError  *error,
 
51
                                GQuark         domain,
 
52
                                gint           code);
 
53
 
 
54
/* if (err) *err = g_error_new(domain, code, format, ...), also has
 
55
 * some sanity checks.
 
56
 */
 
57
void     g_set_error           (GError       **err,
 
58
                                GQuark         domain,
 
59
                                gint           code,
 
60
                                const gchar   *format,
 
61
                                ...) G_GNUC_PRINTF (4, 5);
 
62
 
 
63
/* if (err && *err) { g_error_free(*err); *err = NULL; } */
 
64
void     g_clear_error         (GError       **err);
 
65
 
 
66
/* if (dest) *dest = src; also has some sanity checks.
 
67
 */
 
68
void     g_propagate_error     (GError       **dest,
 
69
                                GError        *src);
 
70
 
 
71
 
 
72
#ifdef __cplusplus
 
73
}
 
74
#endif /* __cplusplus */
 
75
 
 
76
#endif
 
77
 
 
78
 
 
79