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 
00034 /*@-redef@*/ /* LCL: ??? */
00035 typedef /*@abstract@*/ const void * fnpyKey;
00036 /*@=redef@*/
00037 
00041 typedef enum rpmCallbackType_e {
00042     RPMCALLBACK_UNKNOWN         = 0,
00043     RPMCALLBACK_INST_PROGRESS   = (1 <<  0),
00044     RPMCALLBACK_INST_START      = (1 <<  1),
00045     RPMCALLBACK_INST_OPEN_FILE  = (1 <<  2),
00046     RPMCALLBACK_INST_CLOSE_FILE = (1 <<  3),
00047     RPMCALLBACK_TRANS_PROGRESS  = (1 <<  4),
00048     RPMCALLBACK_TRANS_START     = (1 <<  5),
00049     RPMCALLBACK_TRANS_STOP      = (1 <<  6),
00050     RPMCALLBACK_UNINST_PROGRESS = (1 <<  7),
00051     RPMCALLBACK_UNINST_START    = (1 <<  8),
00052     RPMCALLBACK_UNINST_STOP     = (1 <<  9),
00053     RPMCALLBACK_REPACKAGE_PROGRESS = (1 << 10),
00054     RPMCALLBACK_REPACKAGE_START = (1 << 11),
00055     RPMCALLBACK_REPACKAGE_STOP  = (1 << 12),
00056     RPMCALLBACK_UNPACK_ERROR    = (1 << 13),
00057     RPMCALLBACK_CPIO_ERROR      = (1 << 14),
00058     RPMCALLBACK_SCRIPT_ERROR    = (1 << 15),
00059 } rpmCallbackType;
00060 
00063 typedef void * rpmCallbackData;
00064 
00065 #ifdef __cplusplus
00066 extern "C" {
00067 #endif
00068 
00071 typedef void * (*rpmCallbackFunction)
00072                 (/*@null@*/ const void * h, 
00073                 const rpmCallbackType what, 
00074                 const unsigned long amount, 
00075                 const unsigned long total,
00076                 /*@null@*/ fnpyKey key,
00077                 /*@null@*/ rpmCallbackData data)
00078         /*@globals internalState@*/
00079         /*@modifies internalState@*/;
00080 
00083 /*@unused@*/
00084 void urlSetCallback(rpmCallbackFunction notify, rpmCallbackData notifyData,
00085                 int notifyCount);
00086 
00087 #ifdef __cplusplus
00088 }
00089 #endif
00090 
00091 #endif  /* H_RPMMESSAGES */

Generated on 9 Dec 2014 for rpm by  doxygen 1.4.7