libreport
2.1.3
A tool to inform users about various problems on the running system
|
00001 /* 00002 Copyright (C) 2011 ABRT team. 00003 Copyright (C) 2011 RedHat inc. 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License along 00016 with this program; if not, write to the Free Software Foundation, Inc., 00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 00020 #ifndef LIBREPORT_CLIENT_H_ 00021 #define LIBREPORT_CLIENT_H_ 00022 00023 #define REPORT_PREFIX_ASK_YES_NO "ASK_YES_NO " 00024 /* The REPORT_PREFIX_ASK_YES_NO_YESFOREVER prefix must be followed by a single 00025 * word used as key. If the prefix is followed only by the key the 00026 * REPORT_PREFIX_ASK_YES_NO implementation is used instead. 00027 * 00028 * Example: 00029 * ASK_YES_NO_YESFOREVER ask_before_delete Do you want to delete selected files? 00030 * 00031 * Example of message handled as REPORT_PREFIX_ASK_YES_NO: 00032 * ASK_YES_NO_YESFOREVER Continue? 00033 */ 00034 #define REPORT_PREFIX_ASK_YES_NO_YESFOREVER "ASK_YES_NO_YESFOREVER " 00035 #define REPORT_PREFIX_ASK "ASK " 00036 #define REPORT_PREFIX_ASK_PASSWORD "ASK_PASSWORD " 00037 #define REPORT_PREFIX_ALERT "ALERT " 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif 00042 00043 #define set_echo libreport_set_echo 00044 int set_echo(int enable); 00045 00046 #define ask_yes_no libreport_ask_yes_no 00047 int ask_yes_no(const char *question); 00048 00049 #define ask_yes_no_yesforever libreport_ask_yes_no_yesforever 00050 int ask_yes_no_yesforever(const char *key, const char *question); 00051 00052 #define ask libreport_ask 00053 char *ask(const char *question); 00054 00055 #define ask_password libreport_ask_password 00056 char *ask_password(const char *question); 00057 00058 #define alert libreport_alert 00059 void alert(const char *message); 00060 00061 #define client_log libreport_client_log 00062 void client_log(const char *message); 00063 00064 #ifdef __cplusplus 00065 } 00066 #endif 00067 00068 #endif