7c2f24d87cca124a2355b26a28364531f8b28801
[platform/core/system/crash-worker.git] / src / crash-manager / dbus_notify.h
1 /*
2  *
3  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * Author: Mateusz Moscicki <m.moscicki2@partner.samsung.com>
18  */
19
20 #define CRASH_BUS_NAME          "org.tizen.system.crash"
21 #define CRASH_OBJECT_PATH       "/Org/Tizen/System/Crash"
22 #define CRASH_INTERFACE_NAME        CRASH_BUS_NAME
23 #define CRASH_PATH_CRASH            CRASH_OBJECT_PATH"/Crash"
24 #define CRASH_INTERFACE_CRASH       CRASH_INTERFACE_NAME".Crash"
25 #define PROCESS_CRASHED             "ProcessCrashed"
26
27 struct RegInfo {
28         char *name;
29                 long long int value;
30 };
31
32 struct NotifyParams {
33         int prstatus_fd;
34         pid_t pid;
35         pid_t tid;
36         char *cmd_name;
37         char *cmd_path;
38         char *report_path;
39         char *appid;
40         char *pkgid;
41 };
42
43 int send_notify(const struct NotifyParams *notify_params);