• Main Page
  • Files
  • File List
  • File Members

/home/bifh6/cs2009q3-i386/work/applauncherd-0.30.5+rq730927+0m6/src/invoker/report.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
00004 ** All rights reserved.
00005 ** Contact: Nokia Corporation (directui@nokia.com)
00006 **
00007 ** This file is part of applauncherd
00008 **
00009 ** If you have questions regarding the use of this file, please contact
00010 ** Nokia at directui@nokia.com.
00011 **
00012 ** This library is free software; you can redistribute it and/or
00013 ** modify it under the terms of the GNU Lesser General Public
00014 ** License version 2.1 as published by the Free Software Foundation
00015 ** and appearing in the file LICENSE.LGPL included in the packaging
00016 ** of this file.
00017 **
00018 ****************************************************************************/
00019 
00020 #ifndef REPORT_H
00021 #define REPORT_H
00022 
00023 #ifdef __GNUC__
00024 #define ATTR_NORET __attribute__((noreturn))
00025 #else
00026 #define ATTR_NORET
00027 #endif
00028 
00029 enum report_output {
00030   report_console,
00031   report_syslog,
00032   report_none
00033 };
00034 
00035 enum report_type {
00036   report_debug,
00037   report_info,
00038   report_warning,
00039   report_error,
00040   report_fatal
00041 };
00042 
00043 extern void report_set_output(enum report_output new_output);
00044 extern void report(enum report_type type, char *msg, ...);
00045 
00046 #ifndef DEBUG_LOGGING_DISABLED
00047 #define debug(msg, ...) report(report_debug, msg, ##__VA_ARGS__)
00048 #else
00049 #define debug(...)
00050 #endif
00051 
00052 #define info(msg, ...) report(report_info, msg, ##__VA_ARGS__)
00053 #define warning(msg, ...) report(report_warning, msg, ##__VA_ARGS__)
00054 #define error(msg, ...) report(report_error, msg, ##__VA_ARGS__)
00055 
00056 extern void ATTR_NORET die(int status, char *msg, ...);
00057 
00058 #endif
00059 

Generated on Mon Jul 4 2011 14:23:01 for applauncherd by  doxygen 1.7.1