libreport  2.1.2
A tool to inform users about various problems on the running system
client.h
1 /*
2  Copyright (C) 2011 ABRT team.
3  Copyright (C) 2011 RedHat inc.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 #ifndef LIBREPORT_CLIENT_H_
21 #define LIBREPORT_CLIENT_H_
22 
23 #define REPORT_PREFIX_ASK_YES_NO "ASK_YES_NO "
24 /* The REPORT_PREFIX_ASK_YES_NO_YESFOREVER prefix must be followed by a single
25  * word used as key. If the prefix is followed only by the key the
26  * REPORT_PREFIX_ASK_YES_NO implementation is used instead.
27  *
28  * Example:
29  * ASK_YES_NO_YESFOREVER ask_before_delete Do you want to delete selected files?
30  *
31  * Example of message handled as REPORT_PREFIX_ASK_YES_NO:
32  * ASK_YES_NO_YESFOREVER Continue?
33  */
34 #define REPORT_PREFIX_ASK_YES_NO_YESFOREVER "ASK_YES_NO_YESFOREVER "
35 #define REPORT_PREFIX_ASK "ASK "
36 #define REPORT_PREFIX_ASK_PASSWORD "ASK_PASSWORD "
37 #define REPORT_PREFIX_ALERT "ALERT "
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 #define set_echo libreport_set_echo
44 int set_echo(int enable);
45 
46 #define ask_yes_no libreport_ask_yes_no
47 int ask_yes_no(const char *question);
48 
49 #define ask_yes_no_yesforever libreport_ask_yes_no_yesforever
50 int ask_yes_no_yesforever(const char *key, const char *question);
51 
52 #define ask libreport_ask
53 char *ask(const char *question);
54 
55 #define ask_password libreport_ask_password
56 char *ask_password(const char *question);
57 
58 #define alert libreport_alert
59 void alert(const char *message);
60 
61 #define client_log libreport_client_log
62 void client_log(const char *message);
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif