-
Notifications
You must be signed in to change notification settings - Fork 204
/
bugsnag_ndk.h
57 lines (50 loc) · 1.3 KB
/
bugsnag_ndk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* JNI interface between bugsnag-android-ndk Java and C++
*/
#ifndef BUGSNAG_NDK_H
#define BUGSNAG_NDK_H
#include <android/log.h>
#include <stdbool.h>
#include "report.h"
#include "utils/stack_unwinder.h"
#ifndef BUGSNAG_LOG
#define BUGSNAG_LOG(fmt, ...) \
__android_log_print(ANDROID_LOG_WARN, "BugsnagNDK", fmt, ##__VA_ARGS__)
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
bsg_unwinder unwind_style;
bsg_report_header report_header;
/**
* File path on disk where the next crash report will be written if needed.
*/
char next_report_path[384];
/**
* Cache of static metadata and report info. Exception/time information is populated at crash time.
*/
bugsnag_report next_report;
/**
* Time when installed
*/
time_t start_time;
/**
* Time when last re-entering foreground
*/
time_t foreground_start_time;
/**
* true if a crash is currently being handled. Disallows multiple crashes
* from being processed simultaneously
*/
bool handling_crash;
/**
* true if a handler has completed crash handling
*/
bool crash_handled;
} bsg_environment;
bsg_unwinder bsg_configured_unwind_style();
#ifdef __cplusplus
}
#endif
#endif // BUGSNAG_NDK_H