Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

rpmio/rpmmessages.h

Go to the documentation of this file.
00001 #ifndef H_RPMMESSAGES
00002 #define H_RPMMESSAGES
00003 
00009 #include "rpmlog.h"
00010 
00011 #define RPMMESS_DEBUG           RPMLOG_DEBUG
00012 #define RPMMESS_VERBOSE         RPMLOG_INFO
00013 #define RPMMESS_NORMAL          RPMLOG_NOTICE
00014 #define RPMMESS_WARNING         RPMLOG_WARNING
00015 #define RPMMESS_ERROR           RPMLOG_ERR
00016 #define RPMMESS_FATALERROR      RPMLOG_CRIT
00017 
00018 #define RPMMESS_QUIET           RPMMESS_WARNING
00019 
00020 #define rpmMessage              rpmlog
00021 #define rpmSetVerbosity(_lvl)   \
00022         ((void)rpmlogSetMask( RPMLOG_UPTO( RPMLOG_PRI(_lvl))))
00023 #define rpmIncreaseVerbosity()  \
00024     ((void)rpmlogSetMask(((((unsigned)(rpmlogSetMask(0) & 0xff)) << 1) | 1)))
00025 #define rpmDecreaseVerbosity()  \
00026         ((void)rpmlogSetMask((((int)(rpmlogSetMask(0) & 0xff)) >> 1)))
00027 #define rpmIsNormal()           \
00028         (rpmlogSetMask(0) >= RPMLOG_MASK( RPMMESS_NORMAL ))
00029 #define rpmIsVerbose()          \
00030         (rpmlogSetMask(0) >= RPMLOG_MASK( RPMMESS_VERBOSE ))
00031 #define rpmIsDebug()            \
00032         (rpmlogSetMask(0) >= RPMLOG_MASK( RPMMESS_DEBUG ))
00033 
00036 typedef enum rpmCallbackType_e {
00037     RPMCALLBACK_INST_PROGRESS,
00038     RPMCALLBACK_INST_START,
00039     RPMCALLBACK_INST_OPEN_FILE,
00040     RPMCALLBACK_INST_CLOSE_FILE,
00041     RPMCALLBACK_TRANS_PROGRESS,
00042     RPMCALLBACK_TRANS_START,
00043     RPMCALLBACK_TRANS_STOP,
00044     RPMCALLBACK_UNINST_PROGRESS,
00045     RPMCALLBACK_UNINST_START,
00046     RPMCALLBACK_UNINST_STOP
00047 } rpmCallbackType;
00048 
00051 typedef void * rpmCallbackData;
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00059 typedef /*@only@*/ /*@null@*/
00060     void * (*rpmCallbackFunction)
00061                 (/*@null@*/ const void * h, 
00062                 const rpmCallbackType what, 
00063                 const unsigned long amount, 
00064                 const unsigned long total,
00065                 /*@null@*/ const void * pkgKey,
00066                 /*@null@*/ rpmCallbackData data);
00067 
00070 /*@unused@*/
00071 void urlSetCallback(rpmCallbackFunction notify, rpmCallbackData notifyData,
00072                 int notifyCount);
00073 
00074 #ifdef __cplusplus
00075 }
00076 #endif
00077 
00078 #endif  /* H_RPMMESSAGES */

Generated at Mon Sep 24 10:37:33 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001