rpm 5.2.1

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

- File List
- Globals

rpmsw.h
Go to the documentation of this file.
1 #ifndef H_RPMSW
2 #define H_RPMSW
3
10 typedef unsigned long int rpmtime_t;
11
14 typedef struct rpmsw_s * rpmsw;
15
18 typedef struct rpmop_s * rpmop;
19
22 struct rpmsw_s {
23 union {
24 struct timeval tv;
25 unsigned long long int ticks;
26 unsigned long int tocks[2];
27 } u;
28 };
29
33 struct rpmop_s {
34 struct rpmsw_s begin;
35 int count;
36 unsigned long long bytes;
37 rpmtime_t usecs;
38 };
39
40 /*@unchecked@*/
41 extern int _rpmsw_stats;
42
46 typedef enum rpmswOpX_e {
47 RPMSW_OP_TOTAL = 0,
48 RPMSW_OP_CHECK = 1,
49 RPMSW_OP_ORDER = 2,
50 RPMSW_OP_FINGERPRINT = 3,
51 RPMSW_OP_REPACKAGE = 4,
52 RPMSW_OP_INSTALL = 5,
53 RPMSW_OP_ERASE = 6,
54 RPMSW_OP_SCRIPTLETS = 7,
55 RPMSW_OP_COMPRESS = 8,
56 RPMSW_OP_UNCOMPRESS = 9,
57 RPMSW_OP_DIGEST = 10,
58 RPMSW_OP_SIGNATURE = 11,
59 RPMSW_OP_DBADD = 12,
60 RPMSW_OP_DBREMOVE = 13,
61 RPMSW_OP_DBGET = 14,
62 RPMSW_OP_DBPUT = 15,
63 RPMSW_OP_DBDEL = 16,
64 RPMSW_OP_READHDR = 17,
65 RPMSW_OP_HDRLOAD = 18,
66 RPMSW_OP_HDRGET = 19,
67 RPMSW_OP_DEBUG = 20,
68 RPMSW_OP_MAX = 20
69 } rpmswOpX;
70
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74
79 /*@-exportlocal@*/
80 /*@null@*/
81 rpmsw rpmswNow(/*@returned@*/ rpmsw sw)
82 /*@globals internalState @*/
83 /*@modifies sw, internalState @*/;
84 /*@=exportlocal@*/
85
91 /*@-exportlocal@*/
92 rpmtime_t rpmswDiff(/*@null@*/ rpmsw end, /*@null@*/ rpmsw begin)
93 /*@*/;
94 /*@=exportlocal@*/
95
99 /*@-exportlocal@*/
100 rpmtime_t rpmswInit(void)
101 /*@globals internalState @*/
102 /*@modifies internalState @*/;
103 /*@=exportlocal@*/
104
111 int rpmswEnter(/*@null@*/ rpmop op, ssize_t rc)
112 /*@globals internalState @*/
113 /*@modifies *op, internalState @*/;
114
121 rpmtime_t rpmswExit(/*@null@*/ rpmop op, ssize_t rc)
122 /*@globals internalState @*/
123 /*@modifies op, internalState @*/;
124
131 rpmtime_t rpmswAdd(/*@null@*/ rpmop to, /*@null@*/ rpmop from)
132 /*@modifies to @*/;
133
140 rpmtime_t rpmswSub(rpmop to, rpmop from)
141 /*@modifies to @*/;
142
148 void rpmswPrint(const char * name, /*@null@*/ rpmop op)
149 /*@globals fileSystem @*/
150 /*@modifies fileSystem @*/;
151
152 #ifdef __cplusplus
153 }
154 #endif
155
156 #endif /* H_RPMSW */