Add crash manager API
[platform/core/system/crash-worker.git] / src / crash-service / libcrash-service.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef LIBCRASH_SERVICE_H
17 #define LIBCRASH_SERVICE_H
18 #include <stdbool.h>
19 #include <sys/types.h>
20
21 /**
22  * @brief Sends a request to the crash-service to create livedump report of specific process.
23  * @param pid PID of process for which the report should be created.
24  * @param dump_reason the reason that should be included in the raport.
25  * @param report_path pointer to the buffer in which will be saved the report path.
26  * @param report_path_len lenght of buffer for the report path.
27  * @return true on success and false on error.
28  */
29 extern bool livedump_pid(pid_t pid, const char *dump_reason, char *report_path, size_t report_path_len);
30 #endif /* LIBCRASH_SERVICE_H */