rpm 5.2.1

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

- File List
- Globals

Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
rpmio/rpmiotypes.h File Reference
RPMIO.

Go to the source code of this file.

## Data Structures

struct | rpmioItem_s

## Defines

#define | _RPMVSF_NODIGESTS
#define | _RPMVSF_NOSIGNATURES
#define | _RPMVSF_NOHEADER
#define | _RPMVSF_NOPAYLOAD
#define | rpmiobUnlink(_iob) ((rpmiob)rpmioUnlinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))
#define | rpmiobLink(_iob) ((rpmiob)rpmioLinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))
#define | rpmiobFree(_iob) ((rpmiob)rpmioFreePoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

## Typedefs

typedef enum rpmRC_e | rpmRC
| RPM return codes.
typedef unsigned char | rpmuint8_t
| Private int typedefs to avoid C99 portability issues.
typedef unsigned short | rpmuint16_t
typedef unsigned int | rpmuint32_t
typedef unsigned long long | rpmuint64_t
typedef int | rpmint32_t
typedef struct rpmioItem_s * | rpmioItem
typedef struct rpmioPool_s * | rpmioPool
typedef struct rpmiob_s * | rpmiob
typedef struct DIGEST_CTX_s * | DIGEST_CTX
typedef struct pgpPkt_s * | pgpPkt
typedef struct pgpDig_s * | pgpDig
typedef struct pgpDigParams_s * | pgpDigParams
typedef rpmuint8_t | pgpKeyID_t [8]
typedef rpmuint8_t | pgpTime_t [4]
typedef enum pgpVSFlags_e | pgpVSFlags
| Bit(s) to control digest and signature verification.
typedef const void * | fnpyKey
typedef enum rpmCallbackType_e | rpmCallbackType
| Bit(s) to identify progress callbacks.
typedef void * | rpmCallbackData
typedef enum pgpHashAlgo_e | pgpHashAlgo
| 9.4.
typedef enum rpmDigestFlags_e | rpmDigestFlags
| Bit(s) to control digest operation.
typedef void *(* | rpmCallbackFunction )(const void *h, const rpmCallbackType what, const rpmuint64_t amount, const rpmuint64_t total, fnpyKey key, rpmCallbackData data)

## Enumerations

enum | rpmRC_e { RPMRC_OK = 0, RPMRC_NOTFOUND = 1, RPMRC_FAIL = 2, RPMRC_NOTTRUSTED = 3, RPMRC_NOKEY = 4 }
| RPM return codes. More...
enum | pgpVSFlags_e { RPMVSF_DEFAULT = 0, RPMVSF_NOHDRCHK = (1 << 0), RPMVSF_NEEDPAYLOAD = (1 << 1), RPMVSF_NOSHA1HEADER = (1 << 8), RPMVSF_NOMD5HEADER = (1 << 9), RPMVSF_NODSAHEADER = (1 << 10), RPMVSF_NORSAHEADER = (1 << 11), RPMVSF_NOSHA1 = (1 << 16), RPMVSF_NOMD5 = (1 << 17), RPMVSF_NODSA = (1 << 18), RPMVSF_NORSA = (1 << 19) }
| Bit(s) to control digest and signature verification. More...

enum

rpmCallbackType_e {
RPMCALLBACK_UNKNOWN = 0, RPMCALLBACK_INST_PROGRESS = (1 << 0), RPMCALLBACK_INST_START = (1 << 1), RPMCALLBACK_INST_OPEN_FILE = (1 << 2),
RPMCALLBACK_INST_CLOSE_FILE = (1 << 3), RPMCALLBACK_TRANS_PROGRESS = (1 << 4), RPMCALLBACK_TRANS_START = (1 << 5), RPMCALLBACK_TRANS_STOP = (1 << 6),
RPMCALLBACK_UNINST_PROGRESS = (1 << 7), RPMCALLBACK_UNINST_START = (1 << 8), RPMCALLBACK_UNINST_STOP = (1 << 9), RPMCALLBACK_REPACKAGE_PROGRESS = (1 << 10),
RPMCALLBACK_REPACKAGE_START = (1 << 11), RPMCALLBACK_REPACKAGE_STOP = (1 << 12), RPMCALLBACK_UNPACK_ERROR = (1 << 13), RPMCALLBACK_CPIO_ERROR = (1 << 14),
RPMCALLBACK_SCRIPT_ERROR = (1 << 15)
}

| Bit(s) to identify progress callbacks. More...

enum

pgpHashAlgo_e {
PGPHASHALGO_ERROR = -1, PGPHASHALGO_NONE = 0, PGPHASHALGO_MD5 = 1, PGPHASHALGO_SHA1 = 2,
PGPHASHALGO_RIPEMD160 = 3, PGPHASHALGO_MD2 = 5, PGPHASHALGO_TIGER192 = 6, PGPHASHALGO_HAVAL_5_160 = 7,
PGPHASHALGO_SHA256 = 8, PGPHASHALGO_SHA384 = 9, PGPHASHALGO_SHA512 = 10, PGPHASHALGO_SHA224 = 11,
PGPHASHALGO_MD4 = 104, PGPHASHALGO_RIPEMD128 = 105, PGPHASHALGO_CRC32 = 106, PGPHASHALGO_ADLER32 = 107,
PGPHASHALGO_CRC64 = 108, PGPHASHALGO_JLU32 = 109, PGPHASHALGO_RIPEMD256 = 111, PGPHASHALGO_RIPEMD320 = 112,
PGPHASHALGO_SALSA10 = 113, PGPHASHALGO_SALSA20 = 114
}

| 9.4. More...
enum | rpmDigestFlags_e { RPMDIGEST_NONE = 0 }
| Bit(s) to control digest operation. More...

## Functions

pgpHashAlgo | rpmDigestAlgo (DIGEST_CTX ctx)
| Return digest algorithm identifier.
const char * | rpmDigestName (DIGEST_CTX ctx)
| Return digest name.
const char * | rpmDigestASN1 (DIGEST_CTX ctx)
| Return digest ASN1 oid string.
DIGEST_CTX | rpmDigestDup (DIGEST_CTX octx)
| Duplicate a digest context.
DIGEST_CTX | rpmDigestInit (pgpHashAlgo hashalgo, rpmDigestFlags flags)
| Initialize digest.
int | rpmDigestUpdate (DIGEST_CTX ctx, const void *data, size_t len)
| Update context with next plain text buffer.
int | rpmDigestFinal (DIGEST_CTX ctx, void *datap, size_t *lenp, int asAscii)
| Return digest and destroy context.
static void * | _free (const void *p)
| Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
static int | xislower (int c)
static int | xisupper (int c)
static int | xisalpha (int c)
static int | xisdigit (int c)
static int | xisalnum (int c)
static int | xisblank (int c)
static int | xisspace (int c)
static int | xiscntrl (int c)
static int | xisascii (int c)
static int | xisprint (int c)
static int | xisgraph (int c)
static int | xispunct (int c)
static int | xtolower (int c)
static int | xtoupper (int c)
int | xstrcasecmp (const char *s1, const char *s2)
| Locale insensitive strcasecmp(3).
int | xstrncasecmp (const char *s1, const char *s2, size_t n)
| Locale insensitive strncasecmp(3).
const char * | xstrtolocale (const char *str)
| Force encoding of string.
rpmiob | rpmiobUnlink (rpmiob iob)
| Unreference a I/O buffer instance.
rpmiob | rpmiobLink (rpmiob iob)
| Reference a I/O buffer instance.
rpmiob | rpmiobFree (rpmiob iob)
| Destroy a I/O buffer instance.
rpmiob | rpmiobNew (size_t len)
| Create an I/O buffer.
rpmiob | rpmiobEmpty (rpmiob iob)
| Empty an I/O buffer.
rpmiob | rpmiobRTrim (rpmiob iob)
| Trim trailing white space.
rpmiob | rpmiobAppend (rpmiob iob, const char *s, size_t nl)
| Append string to I/O buffer.
rpmuint8_t * | rpmiobBuf (rpmiob iob)
| Return I/O buffer.
char * | rpmiobStr (rpmiob iob)
| Return I/O buffer (as string).
size_t | rpmiobLen (rpmiob iob)
| Return I/O buffer len.

## Variables

size_t | _rpmiob_chunk

## Detailed Description

Definition in file rpmiotypes.h.

## Define Documentation

#define _RPMVSF_NODIGESTS

Value:

    ( RPMVSF_NOSHA1HEADER | \
        RPMVSF_NOMD5HEADER |        \
        RPMVSF_NOSHA1 |             \
        RPMVSF_NOMD5 )

Definition at line 102 of file rpmiotypes.h.

Referenced by init_rpm(), main(), rpmcliAllArgCallback(), rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmRollback(), and rpmtsRollback().

#define _RPMVSF_NOHEADER

Value:

    ( RPMVSF_NOSHA1HEADER | \
        RPMVSF_NOMD5HEADER |        \
        RPMVSF_NODSAHEADER |        \
        RPMVSF_NORSAHEADER )

Definition at line 114 of file rpmiotypes.h.

Referenced by init_rpm().

#define _RPMVSF_NOPAYLOAD

Value:

    ( RPMVSF_NOSHA1 |               \
        RPMVSF_NOMD5 |              \
        RPMVSF_NODSA |              \
        RPMVSF_NORSA )

Definition at line 120 of file rpmiotypes.h.

Referenced by init_rpm().

#define _RPMVSF_NOSIGNATURES

Value:

    ( RPMVSF_NODSAHEADER |  \
        RPMVSF_NORSAHEADER |        \
        RPMVSF_NODSA |              \
        RPMVSF_NORSA )

Definition at line 108 of file rpmiotypes.h.

Referenced by init_rpm(), main(), rpmcliAllArgCallback(), rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmRollback(), and rpmtsRollback().

#define rpmiobFree | ( |  | _iob | ) | ((rpmiob)rpmioFreePoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

Definition at line 430 of file rpmiotypes.h.

#define rpmiobLink | ( |  | _iob | ) | ((rpmiob)rpmioLinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

Definition at line 418 of file rpmiotypes.h.

#define rpmiobUnlink | ( |  | _iob | ) | ((rpmiob)rpmioUnlinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

Definition at line 406 of file rpmiotypes.h.

## Typedef Documentation

typedef const void* fnpyKey

Definition at line 127 of file rpmiotypes.h.

typedef void* rpmCallbackData

Definition at line 155 of file rpmiotypes.h.

typedef enum rpmCallbackType_e rpmCallbackType

Bit(s) to identify progress callbacks.

typedef struct rpmioItem_s* rpmioItem

Definition at line 33 of file rpmiotypes.h.

typedef struct rpmioPool_s* rpmioPool

Definition at line 47 of file rpmiotypes.h.

typedef unsigned short rpmuint16_t

Definition at line 23 of file rpmiotypes.h.

typedef unsigned int rpmuint32_t

Definition at line 24 of file rpmiotypes.h.

typedef unsigned long long rpmuint64_t

Definition at line 25 of file rpmiotypes.h.

## Enumeration Type Documentation

enum rpmCallbackType_e

Bit(s) to identify progress callbacks.

Enumerator:

  RPMCALLBACK_UNKNOWN |
  RPMCALLBACK_INST_PROGRESS |
  RPMCALLBACK_INST_START |
  RPMCALLBACK_INST_OPEN_FILE |
  RPMCALLBACK_INST_CLOSE_FILE |
  RPMCALLBACK_TRANS_PROGRESS |
  RPMCALLBACK_TRANS_START |
  RPMCALLBACK_TRANS_STOP |
  RPMCALLBACK_UNINST_PROGRESS |
  RPMCALLBACK_UNINST_START |
  RPMCALLBACK_UNINST_STOP |
  RPMCALLBACK_REPACKAGE_PROGRESS |
  RPMCALLBACK_REPACKAGE_START |
  RPMCALLBACK_REPACKAGE_STOP |
  RPMCALLBACK_UNPACK_ERROR |
  RPMCALLBACK_CPIO_ERROR |
  RPMCALLBACK_SCRIPT_ERROR |

Definition at line 133 of file rpmiotypes.h.

## Function Documentation

rpmiob rpmiobAppend | ( | rpmiob | iob,
|  | const char * | s,
|  | size_t | nl
| ) |  |

Append string to I/O buffer.

Parameters:

  iob | I/O buffer
  s | string
  nl | append NL?

Returns:
  I/O buffer

Definition at line 70 of file rpmiob.c.

References _rpmiob_chunk, stpcpy(), and xrealloc().

Referenced by addFileToTag(), addFileToTagAux(), checkUnpackagedFiles(), doPatchMacro(), doSetupMacro(), fiIntersect(), getOutputFrom(), initSourceHeader(), parseBuildInstallClean(), parseChangelog(), parseDescription(), parseFiles(), parseForSimple(), parsePrep(), parseScript(), pkgUnpackagedSubdirs(), processPackageFiles(), rpmcliEvalSlurp(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcHelper(), and rpmReadPackageManifest().

rpmuint8_t* rpmiobBuf | ( | rpmiob | iob | ) |

Return I/O buffer.

Parameters:

  iob | I/O buffer

Returns:
  I/O buffer (as string)

Definition at line 93 of file rpmiob.c.

rpmiob rpmiobEmpty | ( | rpmiob | iob | ) |

Empty an I/O buffer.

Parameters:

  iob | I/O buffer

Returns:
  I/O buffer

Definition at line 53 of file rpmiob.c.

Referenced by rpmfcGenerateScriptletDeps().

rpmiob rpmiobFree | ( | rpmiob | iob | ) |

Destroy a I/O buffer instance.

Parameters:

  iob | I/O buffer

Returns:
  NULL on last dereference

Referenced by addFileToArrayTag(), addFileToTag(), addFileToTagAux(), checkUnpackagedFiles(), doSetupMacro(), fiIntersect(), freePackage(), freeSpec(), getOutputFrom(), initSourceHeader(), parseChangelog(), parseDescription(), parsePrep(), parseScript(), pgpReadPkts(), pkgUnpackagedSubdirs(), processMetadataFile(), processSourceFiles(), rpmcliEvalSlurp(), rpmdcParseZeroInstall(), rpmdsCpuinfo(), rpmfcExec(), rpmfcFini(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcHelper(), rpmkuFindPubkey(), rpmkuStorePubkey(), rpmnsProbeSignature(), rpmPlatform(), rpmReadPackageManifest(), and tagStoreFree().

size_t rpmiobLen | ( | rpmiob | iob | ) |

Return I/O buffer len.

Parameters:

  iob | I/O buffer

Returns:
  I/O buffer length

Definition at line 109 of file rpmiob.c.

Referenced by rpmfcExec().

rpmiob rpmiobLink | ( | rpmiob | iob | ) |

Reference a I/O buffer instance.

Parameters:

  iob | I/O buffer

Returns:
  new I/O buffer reference

Referenced by rpmiobNew().

rpmiob rpmiobNew | ( | size_t | len | ) |

Create an I/O buffer.

Parameters:

  len | no. of octets to allocate

Returns:
  new I/O buffer

Definition at line 42 of file rpmiob.c.

References _rpmiob_chunk, rpmiobGetPool(), rpmiobLink(), and xcalloc().

Referenced by addFileToArrayTag(), addFileToTag(), checkUnpackagedFiles(), doSetupMacro(), fiIntersect(), getOutputFrom(), initSourceHeader(), parseBuildInstallClean(), parseChangelog(), parseDescription(), parseFiles(), parseForSimple(), parsePrep(), parseScript(), pkgUnpackagedSubdirs(), processSourceFiles(), rpmcliEvalSlurp(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcHelper(), rpmkuFindPubkey(), rpmReadPackageManifest(), and rpmtsFindPubkey().

rpmiob rpmiobRTrim | ( | rpmiob | iob | ) |

Trim trailing white space.

Parameters:

  iob | I/O buffer

Returns:
  I/O buffer

Definition at line 61 of file rpmiob.c.

References xisspace().

Referenced by parseDescription(), parseScript(), and rpmfcGenerateScriptletDeps().

char* rpmiobStr | ( | rpmiob | iob | ) |

Return I/O buffer (as string).

Parameters:

  iob | I/O buffer

Returns:
  I/O buffer (as string)

Definition at line 101 of file rpmiob.c.

Referenced by addChangelog(), addFileToArrayTag(), addFileToTag(), checkUnpackagedFiles(), doSetupMacro(), fiIntersect(), initSourceHeader(), initSourceHeaderScriptlet(), parseDescription(), parsePrep(), parseScript(), pkgUnpackagedSubdirs(), processPackageFiles(), processSourceFiles(), rpmfcExec(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcHelper(), rpmReadPackageManifest(), spec_get_build(), spec_get_check(), spec_get_clean(), spec_get_install(), and spec_get_prep().

rpmiob rpmiobUnlink | ( | rpmiob | iob | ) |

Unreference a I/O buffer instance.

Parameters:

  iob | hash table

Returns:
  NULL if free'd

static int xisalnum | ( | int | c | ) | `[inline, static]`

Definition at line 348 of file rpmiotypes.h.

References xisalpha(), and xisdigit().

Referenced by _tagCanonicalize(), expandMacro(), parseRCPOT(), rdToken(), rpmdsPipe(), rpmdsSysinfoFile(), and xispunct().

static int xisalpha | ( | int | c | ) | `[inline, static]`

Definition at line 342 of file rpmiotypes.h.

References xislower(), and xisupper().

Referenced by doDefine(), doUndefine(), dpkgEVRctype(), parseBits(), rdToken(), xisalnum(), and xisrpmalpha().

static int xisascii | ( | int | c | ) | `[inline, static]`

Definition at line 360 of file rpmiotypes.h.

Referenced by xisgraph(), and xisprint().

static int xisblank | ( | int | c | ) | `[inline, static]`

Definition at line 351 of file rpmiotypes.h.

Referenced by xisspace().

static int xiscntrl | ( | int | c | ) | `[inline, static]`

Definition at line 357 of file rpmiotypes.h.

static int xisdigit | ( | int | c | ) | `[inline, static]`

Definition at line 345 of file rpmiotypes.h.

Referenced by arHeaderRead(), doFoo(), dpkgEVRcmp(), dpkgEVRctype(), expandMacro(), getHostAddress(), parseForDev(), parseFormat(), rdToken(), rpmdcParseZeroInstall(), rpmds_ParseEVR(), rpmEVRcmp(), rpmnsClassify(), rpmtsInitIterator(), rpnFormat(), unsatisfiedDepend(), and xisalnum().

static int xisgraph | ( | int | c | ) | `[inline, static]`

Definition at line 366 of file rpmiotypes.h.

References xisascii().

Referenced by xispunct().

static int xislower | ( | int | c | ) | `[inline, static]`

Definition at line 336 of file rpmiotypes.h.

Referenced by xisalpha(), and xtoupper().

static int xisprint | ( | int | c | ) | `[inline, static]`

Definition at line 363 of file rpmiotypes.h.

References xisascii().

static int xispunct | ( | int | c | ) | `[inline, static]`

Definition at line 369 of file rpmiotypes.h.

References xisalnum(), and xisgraph().

Referenced by xisrpmalpha().

static int xisspace | ( | int | c | ) | `[inline, static]`

Definition at line 354 of file rpmiotypes.h.

References xisblank().

Referenced by addChangelog(), copyNextLineFinish(), dbiTagsInit(), doFoo(), findPreambleTag(), isPart(), parseBits(), rdToken(), readLine(), rpmcliAllArgCallback(), rpmdcParseCoreutils(), rpmioAllArgCallback(), rpmiobRTrim(), rpmnsArch(), and rpmPlatform().

static int xisupper | ( | int | c | ) | `[inline, static]`

Definition at line 339 of file rpmiotypes.h.

Referenced by xisalpha(), and xtolower().

static int xtolower | ( | int | c | ) | `[inline, static]`

Definition at line 373 of file rpmiotypes.h.

References xisupper().

Referenced by _tagCanonicalize(), myTagName(), rpmRebuildTargetVars(), xstrcasecmp(), and xstrncasecmp().

static int xtoupper | ( | int | c | ) | `[inline, static]`

Definition at line 376 of file rpmiotypes.h.

References xislower().

Referenced by _tagCanonicalize().