Remove some old craft
[platform/upstream/rpm.git] / rpmio / rpmio_internal.h
1 #ifndef H_RPMIO_INTERNAL
2 #define H_RPMIO_INTERNAL
3
4 /** \ingroup rpmio
5  * \file rpmio/rpmio_internal.h
6  */
7
8 #include <rpm/rpmio.h>
9 #include <rpm/rpmpgp.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 void fdSetBundle(FD_t fd, rpmDigestBundle bundle);
16 rpmDigestBundle fdGetBundle(FD_t fd);
17
18 /** \ingroup rpmio
19  * Attach digest to fd.
20  */
21 void fdInitDigest(FD_t fd, int hashalgo, rpmDigestFlags flags);
22
23 /** \ingroup rpmio
24  */
25 void fdFiniDigest(FD_t fd, int hashalgo,
26                 void ** datap,
27                 size_t * lenp,
28                 int asAscii);
29
30 /**
31  * Read an entire file into a buffer.
32  * @param fn            file name to read
33  * @retval *bp          (malloc'd) buffer address
34  * @retval *blenp       (malloc'd) buffer length
35  * @return              0 on success
36  */
37 int rpmioSlurp(const char * fn,
38                 uint8_t ** bp, ssize_t * blenp);
39
40 #ifdef __cplusplus
41 }
42 #endif
43
44 #endif  /* H_RPMIO_INTERNAL */