1 #ifndef _RPMTYPES_H 2 #define _RPMTYPES_H 3 4 /** \ingroup rpmtypes 5 * \file lib/rpmtypes.h 6 * 7 * Typedefs for RPM abstract data types. 8 * @todo The grouping needs love to look sane... 9 */ 10 11 #include <stdint.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 typedef const char * errmsg_t; 18 19 /** \ingroup rpmtypes 20 * 21 * RPM header and data retrieval types. 22 * @{ 23 */ 24 typedef struct headerToken_s * Header; 25 typedef struct headerIterator_s * HeaderIterator; 26 27 typedef int32_t rpm_tag_t; 28 typedef uint32_t rpm_tagtype_t; 29 typedef uint32_t rpm_count_t; 30 typedef rpm_tag_t rpmTagVal; 31 typedef rpm_tag_t rpmDbiTagVal; 32 33 typedef void * rpm_data_t; 34 typedef const void * rpm_constdata_t; 35 36 typedef struct rpmtd_s * rpmtd; 37 38 typedef uint32_t rpm_color_t; 39 typedef uint32_t rpm_flag_t; 40 typedef uint32_t rpm_tid_t; 41 42 typedef uint32_t rpmFlags; 43 /** @} */ 44 45 /** \ingroup rpmtypes 46 * 47 * In-header hardcoded sizes for various POSIXy types 48 * @{ 49 */ 50 typedef uint32_t rpm_off_t; 51 typedef uint64_t rpm_loff_t; 52 typedef uint32_t rpm_time_t; 53 typedef uint16_t rpm_mode_t; 54 typedef uint16_t rpm_rdev_t; 55 typedef uint32_t rpm_dev_t; 56 typedef uint32_t rpm_ino_t; 57 /** @} */ 58 59 /** \ingroup rpmtypes 60 * The main types involved in transaction manipulation 61 * @{ 62 */ 63 typedef struct rpmts_s * rpmts; 64 typedef struct rpmte_s * rpmte; 65 typedef struct rpmds_s * rpmds; 66 typedef struct rpmfi_s * rpmfi; 67 typedef struct rpmfiles_s * rpmfiles; 68 typedef struct rpmdb_s * rpmdb; 69 typedef struct rpmdbMatchIterator_s * rpmdbMatchIterator; 70 typedef struct rpmtsi_s * rpmtsi; 71 typedef struct rpmps_s * rpmps; 72 typedef struct rpmtxn_s * rpmtxn; 73 typedef struct rpmver_s * rpmver; 74 75 typedef struct rpmdbIndexIterator_s * rpmdbIndexIterator; 76 typedef const void * fnpyKey; 77 typedef void * rpmCallbackData; 78 /** @} */ 79 80 typedef struct rpmPubkey_s * rpmPubkey; 81 typedef struct rpmKeyring_s * rpmKeyring; 82 83 typedef uint32_t rpmsid; 84 typedef struct rpmstrPool_s * rpmstrPool; 85 86 typedef struct rpmPlugin_s * rpmPlugin; 87 typedef struct rpmPlugins_s * rpmPlugins; 88 89 typedef struct rpmgi_s * rpmgi; 90 91 typedef struct rpmSpec_s * rpmSpec; 92 93 typedef struct rpmRelocation_s rpmRelocation; 94 95 96 /** \ingroup rpmtypes 97 * RPM IO file descriptor type 98 */ 99 typedef struct _FD_s * FD_t; 100 101 /** \ingroup rpmtypes 102 * Package read return codes. 103 */ 104 typedef enum rpmRC_e { 105 RPMRC_OK = 0, /*!< Generic success code */ 106 RPMRC_NOTFOUND = 1, /*!< Generic not found code. */ 107 RPMRC_FAIL = 2, /*!< Generic failure code. */ 108 RPMRC_NOTTRUSTED = 3, /*!< Signature is OK, but key is not trusted. */ 109 RPMRC_NOKEY = 4 /*!< Public key is unavailable. */ 110 } rpmRC; 111 112 #ifdef __cplusplus 113 } 114 #endif 115 116 /* XXX included late as rpmtag.h depends on our definitions here... */ 117 #include <rpm/rpmtag.h> 118 119 #endif /* _RPMTYPES_H */ 120