rpm  5.4.15
rpmrollback.h
Go to the documentation of this file.
1 #ifndef H_RPMROLLBACK
2 #define H_RPMROLLBACK
3 
9 #include <rpmcli.h> /* XXX QVA_t typedef */
10 
13 typedef /*@abstract@*/ struct IDT_s * IDT;
14 
17 typedef /*@abstract@*/ struct IDTindex_s * IDTX;
18 
19 #if defined(_RPMROLLBACK_INTERNAL)
20 
23 /*@-fielduse@*/
24 #if !defined(SWIG)
25 struct IDT_s {
26  int done;
27  unsigned int instance;
28 /*@owned@*/ /*@null@*/
29  const char * key;
30  Header h;
31  union {
32  rpmuint32_t u32;
33  } val;
34 };
35 #endif
36 /*@=fielduse@*/
37 
41 #if !defined(SWIG)
42 struct IDTindex_s {
43  int delta;
44  int size;
45  int alloced;
46  int nidt;
47 /*@only@*/ /*@null@*/
48  IDT idt;
49 };
50 #endif
51 #endif
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
62 /*@null@*/
63 IDTX IDTXfree(/*@only@*/ /*@null@*/ IDTX idtx)
64  /*@modifies idtx @*/;
65 
70 /*@only@*/
71 IDTX IDTXnew(void)
72  /*@*/;
73 
80 /*@only@*/ /*@null@*/
81 IDTX IDTXgrow(/*@only@*/ /*@null@*/ IDTX idtx, int need)
82  /*@modifies idtx @*/;
83 
89 /*@only@*/ /*@null@*/
90 IDTX IDTXsort(/*@only@*/ /*@null@*/ IDTX idtx)
91  /*@modifies idtx @*/;
92 
100 /*@only@*/ /*@null@*/
101 IDTX IDTXload(rpmts ts, rpmTag tag, rpmuint32_t rbtid)
102  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
103  /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
104 
113 /*@only@*/ /*@null@*/
114 IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag, rpmuint32_t rbtid)
115  /*@globals h_errno, fileSystem, internalState @*/
116  /*@modifies ts, fileSystem, internalState @*/;
117 
125 int rpmRollback(rpmts ts, QVA_t ia, /*@null@*/ const char ** argv)
126  /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno,
127  fileSystem, internalState @*/
128  /*@modifies ts, ia, rpmcliPackagesTotal, rpmGlobalMacroContext,
129  fileSystem, internalState @*/;
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* H_RPMROLLBACK */
struct IDTindex_s * IDTX
Definition: rpmrollback.h:17
const char bson_timestamp_t * ts
Definition: bson.h:1004
IDTX IDTXglob(rpmts ts, const char *globstr, rpmTag tag, rpmuint32_t rbtid)
Load tag (instance,value) pairs from packages, and return sorted id index.
Definition: rpmrollback.c:172
struct IDT_s * IDT
Definition: rpmrollback.h:13
The Header data structure.
Command line option information.
Definition: rpmcli.h:630
unsigned int rpmuint32_t
Definition: rpmiotypes.h:28
IDTX IDTXgrow(IDTX idtx, int need)
Insure that index has room for "need" elements.
Definition: rpmrollback.c:99
IDTX IDTXfree(IDTX idtx)
Destroy id index.
Definition: rpmrollback.c:74
IDTX IDTXload(rpmts ts, rpmTag tag, rpmuint32_t rbtid)
Load tag (instance,value) pairs from rpm databse, and return sorted id index.
Definition: rpmrollback.c:123
int rpmRollback(rpmts ts, QVA_t ia, const char **argv)
Rollback transactions, erasing new, reinstalling old, package(s).
Definition: rpmrollback.c:421
const char const bson * key
Definition: mongo.h:717
struct rpmts_s * rpmts
The RPM Transaction Set.
Definition: rpmtypes.h:14
const char const char size_t size
Definition: bson.h:895
enum rpmTag_e rpmTag
Definition: rpmtag.h:470
IDTX IDTXsort(IDTX idtx)
Sort tag (instance,value) pairs.
Definition: rpmrollback.c:116
IDTX IDTXnew(void)
Create id index.
Definition: rpmrollback.c:91