rpm  4.5
rpmmessages.h
Go to the documentation of this file.
1 #ifndef H_RPMMESSAGES
2 #define H_RPMMESSAGES
3 
9 #include "rpmlog.h"
10 
11 #define RPMMESS_DEBUG RPMLOG_DEBUG
12 #define RPMMESS_VERBOSE RPMLOG_INFO
13 #define RPMMESS_NORMAL RPMLOG_NOTICE
14 #define RPMMESS_WARNING RPMLOG_WARNING
15 #define RPMMESS_ERROR RPMLOG_ERR
16 #define RPMMESS_FATALERROR RPMLOG_CRIT
17 
18 #define RPMMESS_QUIET RPMMESS_WARNING
19 
20 #define rpmMessage rpmlog
21 #define rpmSetVerbosity(_lvl) \
22  ((void)rpmlogSetMask( RPMLOG_UPTO( RPMLOG_PRI(_lvl))))
23 #define rpmIncreaseVerbosity() \
24  ((void)rpmlogSetMask(((((unsigned)(rpmlogSetMask(0) & 0xff)) << 1) | 1)))
25 #define rpmDecreaseVerbosity() \
26  ((void)rpmlogSetMask((((int)(rpmlogSetMask(0) & 0xff)) >> 1)))
27 #define rpmIsNormal() \
28  (rpmlogSetMask(0) >= RPMLOG_MASK( RPMMESS_NORMAL ))
29 #define rpmIsVerbose() \
30  (rpmlogSetMask(0) >= RPMLOG_MASK( RPMMESS_VERBOSE ))
31 #define rpmIsDebug() \
32  (rpmlogSetMask(0) >= RPMLOG_MASK( RPMMESS_DEBUG ))
33 
34 /*@-redef@*/ /* LCL: ??? */
35 typedef /*@abstract@*/ const void * fnpyKey;
36 /*@=redef@*/
37 
41 typedef enum rpmCallbackType_e {
59 
62 typedef void * rpmCallbackData;
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
70 typedef void * (*rpmCallbackFunction)
71  (/*@null@*/ const void * h,
72  const rpmCallbackType what,
73  const unsigned long long amount,
74  const unsigned long long total,
75  /*@null@*/ fnpyKey key,
76  /*@null@*/ rpmCallbackData data)
77  /*@globals internalState@*/
78  /*@modifies internalState@*/;
79 
82 /*@unused@*/
83 void urlSetCallback(rpmCallbackFunction notify, rpmCallbackData notifyData,
84  int notifyCount);
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* H_RPMMESSAGES */