1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  *  Copyright (C) 2008  Kouhei Sutou <kou@cozmixng.org>
4  *
5  *  This library is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Lesser 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.
9  *
10  *  This library 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 Lesser General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Lesser General Public License
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef __CUT_BACKTRACE_ENTRY_H__
21 #define __CUT_BACKTRACE_ENTRY_H__
22 
23 #include <glib-object.h>
24 
25 G_BEGIN_DECLS
26 
27 #define CUT_TYPE_BACKTRACE_ENTRY            (cut_backtrace_entry_get_type ())
28 #define CUT_BACKTRACE_ENTRY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CUT_TYPE_BACKTRACE_ENTRY, CutBacktraceEntry))
29 #define CUT_BACKTRACE_ENTRY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), CUT_TYPE_BACKTRACE_ENTRY, CutBacktraceEntryClass))
30 #define CUT_IS_BACKTRACE_ENTRY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUT_TYPE_BACKTRACE_ENTRY))
31 #define CUT_IS_BACKTRACE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUT_TYPE_BACKTRACE_ENTRY))
32 #define CUT_BACKTRACE_ENTRY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), CUT_TYPE_BACKTRACE_ENTRY, CutBacktraceEntryClass))
33 
34 typedef struct _CutBacktraceEntry      CutBacktraceEntry;
35 typedef struct _CutBacktraceEntryClass CutBacktraceEntryClass;
36 
37 struct _CutBacktraceEntry
38 {
39     GObject object;
40 };
41 
42 struct _CutBacktraceEntryClass
43 {
44     GObjectClass parent_class;
45 };
46 
47 GType              cut_backtrace_entry_get_type  (void) G_GNUC_CONST;
48 
49 CutBacktraceEntry *cut_backtrace_entry_new       (const gchar *file,
50                                                   guint        line,
51                                                   const gchar *function,
52                                                   const gchar *info);
53 CutBacktraceEntry *cut_backtrace_entry_new_empty (void);
54 
55 const gchar       *cut_backtrace_entry_get_file  (CutBacktraceEntry *entry);
56 void               cut_backtrace_entry_set_file  (CutBacktraceEntry *entry,
57                                                   const gchar       *file);
58 guint              cut_backtrace_entry_get_line  (CutBacktraceEntry *entry);
59 void               cut_backtrace_entry_set_line  (CutBacktraceEntry *entry,
60                                                   guint              line);
61 const gchar       *cut_backtrace_entry_get_function
62                                                  (CutBacktraceEntry *entry);
63 void               cut_backtrace_entry_set_function
64                                                  (CutBacktraceEntry *entry,
65                                                   const gchar       *function);
66 const gchar       *cut_backtrace_entry_get_info  (CutBacktraceEntry *entry);
67 void               cut_backtrace_entry_set_info  (CutBacktraceEntry *entry,
68                                                   const gchar       *info);
69 
70 gchar             *cut_backtrace_entry_to_xml    (CutBacktraceEntry *entry);
71 void               cut_backtrace_entry_to_xml_string
72                                                  (CutBacktraceEntry *entry,
73                                                   GString           *string,
74                                                   guint              indent);
75 
76 gchar             *cut_backtrace_entry_format    (CutBacktraceEntry *entry);
77 void               cut_backtrace_entry_format_string
78                                                  (CutBacktraceEntry *entry,
79                                                   GString           *string);
80 
81 G_END_DECLS
82 
83 #endif /* __CUT_BACKTRACE_ENTRY_H__ */
84 
85 /*
86 vi:ts=4:nowrap:ai:expandtab:sw=4
87 */
88