satyr  0.24.15.g3735.dirty
java/frame.h
Go to the documentation of this file.
1 /*
2  java_frame.h
3 
4  Copyright (C) 2012 ABRT Team
5  Copyright (C) 2012 Red Hat, Inc.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program 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
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License along
18  with this program; if not, write to the Free Software Foundation, Inc.,
19  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21 #ifndef SATYR_JAVA_FRAME_H
22 #define SATYR_JAVA_FRAME_H
23 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include "../report_type.h"
34 #include <stdbool.h>
35 #include <stdint.h>
36 
37 struct sr_strbuf;
38 struct sr_location;
39 struct sr_json_value;
40 
42 {
43  enum sr_report_type type;
44 
54  char *name;
55 
60  char *file_name;
61 
66  uint32_t file_line;
67 
72  char *class_path;
73 
78  bool is_native;
79 
84 
89  char *message;
90 
91  struct sr_java_frame *next;
92 };
93 
100 struct sr_java_frame *
101 sr_java_frame_new(void);
102 
109 struct sr_java_frame *
111 
118 void
119 sr_java_frame_init(struct sr_java_frame *frame);
120 
127 void
128 sr_java_frame_free(struct sr_java_frame *frame);
129 
135 void
137 
143 struct sr_java_frame *
145  struct sr_java_frame *item);
146 
154 struct sr_java_frame *
156 
170 struct sr_java_frame *
171 sr_java_frame_dup(struct sr_java_frame *frame,
172  bool siblings);
173 
187 int
188 sr_java_frame_cmp(struct sr_java_frame *frame1,
189  struct sr_java_frame *frame2);
190 
204 int
206  struct sr_java_frame *frame2);
207 
208 
216 void
218  struct sr_strbuf *dest);
219 
236 struct sr_java_frame *
237 sr_java_frame_parse_exception(const char **input,
238  struct sr_location *location);
239 
256 struct sr_java_frame *
257 sr_java_frame_parse(const char **input,
258  struct sr_location *location);
259 
266 char *
267 sr_java_frame_to_json(struct sr_java_frame *frame);
268 
278 struct sr_java_frame *
279 sr_java_frame_from_json(struct sr_json_value *root, char **error_message);
280 
281 #ifdef __cplusplus
282 }
283 #endif
284 
285 #endif
char * sr_java_frame_to_json(struct sr_java_frame *frame)
char * name
Definition: java/frame.h:54
char * class_path
Definition: java/frame.h:72
int sr_java_frame_cmp(struct sr_java_frame *frame1, struct sr_java_frame *frame2)
int sr_java_frame_cmp_distance(struct sr_java_frame *frame1, struct sr_java_frame *frame2)
struct sr_java_frame * sr_java_frame_get_last(struct sr_java_frame *frame)
A resizable string buffer.
Definition: strbuf.h:38
uint32_t file_line
Definition: java/frame.h:66
struct sr_java_frame * sr_java_frame_parse_exception(const char **input, struct sr_location *location)
char * file_name
Definition: java/frame.h:60
void sr_java_frame_free(struct sr_java_frame *frame)
struct sr_java_frame * sr_java_frame_dup(struct sr_java_frame *frame, bool siblings)
struct sr_java_frame * sr_java_frame_append(struct sr_java_frame *dest, struct sr_java_frame *item)
struct sr_java_frame * sr_java_frame_parse(const char **input, struct sr_location *location)
struct sr_java_frame * sr_java_frame_from_json(struct sr_json_value *root, char **error_message)
char * message
Definition: java/frame.h:89
void sr_java_frame_init(struct sr_java_frame *frame)
bool is_exception
Definition: java/frame.h:83
struct sr_java_frame * sr_java_frame_new_exception(void)
struct sr_java_frame * sr_java_frame_new(void)
bool is_native
Definition: java/frame.h:78
A location of a parser in the input stream.
Definition: location.h:42
void sr_java_frame_append_to_str(struct sr_java_frame *frame, struct sr_strbuf *dest)
void sr_java_frame_free_full(struct sr_java_frame *frame)