2000-06-10 02:57:23 +08:00
|
|
|
#ifndef H_RPMIO_INTERNAL
|
|
|
|
#define H_RPMIO_INTERNAL
|
|
|
|
|
2000-08-28 02:34:02 +08:00
|
|
|
/** \ingroup rpmio
|
|
|
|
* \file rpmio/rpmio_internal.h
|
|
|
|
*/
|
|
|
|
|
2007-12-08 20:02:32 +08:00
|
|
|
#include <rpm/rpmio.h>
|
|
|
|
#include <rpm/rpmpgp.h>
|
2000-06-10 02:57:23 +08:00
|
|
|
|
2000-06-10 05:24:37 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-10-14 22:14:38 +08:00
|
|
|
void fdSetBundle(FD_t fd, rpmDigestBundle bundle);
|
|
|
|
rpmDigestBundle fdGetBundle(FD_t fd);
|
2009-03-25 19:23:19 +08:00
|
|
|
|
2001-10-19 09:35:57 +08:00
|
|
|
/** \ingroup rpmio
|
2001-10-20 06:47:40 +08:00
|
|
|
* Attach digest to fd.
|
2001-10-19 09:35:57 +08:00
|
|
|
*/
|
2010-09-21 19:03:43 +08:00
|
|
|
void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, rpmDigestFlags flags);
|
2001-10-19 09:35:57 +08:00
|
|
|
|
2000-11-01 00:18:34 +08:00
|
|
|
/** \ingroup rpmio
|
|
|
|
*/
|
2001-10-20 06:47:40 +08:00
|
|
|
void fdFiniDigest(FD_t fd, pgpHashAlgo hashalgo,
|
2007-09-11 22:48:54 +08:00
|
|
|
void ** datap,
|
|
|
|
size_t * lenp,
|
2008-02-27 03:46:38 +08:00
|
|
|
int asAscii);
|
2000-10-24 21:46:51 +08:00
|
|
|
|
2001-10-21 06:31:09 +08:00
|
|
|
/**
|
2002-07-08 22:21:26 +08:00
|
|
|
* Read an entire file into a buffer.
|
|
|
|
* @param fn file name to read
|
|
|
|
* @retval *bp (malloc'd) buffer address
|
|
|
|
* @retval *blenp (malloc'd) buffer length
|
|
|
|
* @return 0 on success
|
2001-10-21 06:31:09 +08:00
|
|
|
*/
|
|
|
|
int rpmioSlurp(const char * fn,
|
2007-11-26 17:42:39 +08:00
|
|
|
uint8_t ** bp, ssize_t * blenp);
|
2001-10-21 06:31:09 +08:00
|
|
|
|
2000-06-10 05:24:37 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-06-10 02:57:23 +08:00
|
|
|
#endif /* H_RPMIO_INTERNAL */
|