Create a report with only dump_systemstate output for PID <= 0
[platform/core/system/crash-worker.git] / src / bugreport-service / diagnostics / diagnostics.h
1 /*
2  * crash-manager
3  *
4  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License);
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #ifndef __DIAGNOSTICS_H__
19 #define __DIAGNOSTICS_H__
20
21 #define BR_ERROR        1
22 #define BR_OK           0
23 #define BR_ERR_PARAM    1
24 #define BR_ERR_INTERNAL 2
25
26 enum diagnostics_entry {
27         FULL_REPORT = 0,
28         INFO_JSON
29 };
30
31 enum diagnostics_metadata {
32         APPID,
33         CMDLINE,
34         SIGNAL,
35 };
36
37 struct diagnostics_report;
38
39 int diagnostics_report_get_file(const char *report_path,
40                               const enum diagnostics_entry entry);
41
42 #endif  // __DIAGNOSTICS_H__