Go to the documentation of this file.00001 #ifndef H_RPMCB
00002 #define H_RPMCB
00003
00008 #include <rpmlog.h>
00009
00013 #define rpmSetVerbosity(_lvl) \
00014 ((void)rpmlogSetMask( RPMLOG_UPTO( RPMLOG_PRI(_lvl))))
00015 #define rpmIncreaseVerbosity() \
00016 ((void)rpmlogSetMask(((((unsigned)(rpmlogSetMask(0) & 0xff)) << 1) | 1)))
00017 #define rpmDecreaseVerbosity() \
00018 ((void)rpmlogSetMask((((int)(rpmlogSetMask(0) & 0xff)) >> 1)))
00019 #define rpmIsNormal() \
00020 (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_NOTICE ))
00021 #define rpmIsVerbose() \
00022 (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_INFO ))
00023 #define rpmIsDebug() \
00024 (rpmlogSetMask(0) >= RPMLOG_MASK( RPMLOG_DEBUG ))
00025
00026
00027 typedef const void * fnpyKey;
00028
00029
00033 typedef enum rpmCallbackType_e {
00034 RPMCALLBACK_UNKNOWN = 0,
00035 RPMCALLBACK_INST_PROGRESS = (1 << 0),
00036 RPMCALLBACK_INST_START = (1 << 1),
00037 RPMCALLBACK_INST_OPEN_FILE = (1 << 2),
00038 RPMCALLBACK_INST_CLOSE_FILE = (1 << 3),
00039 RPMCALLBACK_TRANS_PROGRESS = (1 << 4),
00040 RPMCALLBACK_TRANS_START = (1 << 5),
00041 RPMCALLBACK_TRANS_STOP = (1 << 6),
00042 RPMCALLBACK_UNINST_PROGRESS = (1 << 7),
00043 RPMCALLBACK_UNINST_START = (1 << 8),
00044 RPMCALLBACK_UNINST_STOP = (1 << 9),
00045 RPMCALLBACK_REPACKAGE_PROGRESS = (1 << 10),
00046 RPMCALLBACK_REPACKAGE_START = (1 << 11),
00047 RPMCALLBACK_REPACKAGE_STOP = (1 << 12),
00048 RPMCALLBACK_UNPACK_ERROR = (1 << 13),
00049 RPMCALLBACK_CPIO_ERROR = (1 << 14),
00050 RPMCALLBACK_SCRIPT_ERROR = (1 << 15)
00051 } rpmCallbackType;
00052
00055 typedef void * rpmCallbackData;
00056
00057 #ifdef __cplusplus
00058 extern "C" {
00059 #endif
00060
00063 typedef void * (*rpmCallbackFunction)
00064 ( const void * h,
00065 const rpmCallbackType what,
00066 const uint64_t amount,
00067 const uint64_t total,
00068 fnpyKey key,
00069 rpmCallbackData data)
00070
00071 ;
00072
00075
00076 void urlSetCallback(rpmCallbackFunction notify, rpmCallbackData notifyData,
00077 int notifyCount);
00078
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082
00083 #endif