- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

# 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
    00040 typedef enum rpmCallbackType_e {
    00041     RPMCALLBACK_INST_PROGRESS,
    00042     RPMCALLBACK_INST_START,
    00043     RPMCALLBACK_INST_OPEN_FILE,
    00044     RPMCALLBACK_INST_CLOSE_FILE,
    00045     RPMCALLBACK_TRANS_PROGRESS,
    00046     RPMCALLBACK_TRANS_START,
    00047     RPMCALLBACK_TRANS_STOP,
    00048     RPMCALLBACK_UNINST_PROGRESS,
    00049     RPMCALLBACK_UNINST_START,
    00050     RPMCALLBACK_UNINST_STOP
    00051 } rpmCallbackType;
    00052
    00055 typedef void * rpmCallbackData;
    00056
    00057 #ifdef __cplusplus
    00058 extern "C" {
    00059 #endif
    00060
    00063 typedef void * (*rpmCallbackFunction)
    00064                 (/*@null@*/ const void * h,
    00065                 const rpmCallbackType what,
    00066                 const unsigned long amount,
    00067                 const unsigned long total,
    00068                 /*@null@*/ fnpyKey key,
    00069                 /*@null@*/ rpmCallbackData data)
    00070         /*@globals internalState@*/
    00071         /*@modifies internalState@*/;
    00072
    00075 /*@unused@*/
    00076 void urlSetCallback(rpmCallbackFunction notify, rpmCallbackData notifyData,
    00077                 int notifyCount);
    00078
    00079 #ifdef __cplusplus
    00080 }
    00081 #endif
    00082
    00083 #endif  /* H_RPMMESSAGES */