Doxygen annotations for config files.
[tools/librpm-tizen.git] / build / buildio.h
1 #ifndef _H_BUILDIO_
2 #define _H_BUILDIO_
3
4 /** \ingroup rpmbuild
5  * \file build/buildio.h
6  * Routines to read and write packages.
7  * @deprecated this information will move elsewhere eventually.
8  * @todo Eliminate, merge into rpmlib.
9  */
10
11 #include "psm.h"
12
13 /**
14  */
15 typedef struct cpioSourceArchive {
16     unsigned int cpioArchiveSize;
17     FD_t        cpioFdIn;
18 /*@dependent@*/ TFI_t cpioList;
19     struct rpmlead * lead;      /* XXX FIXME: exorcize lead/arch/os */
20 } CSA_t;
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * Read rpm package components from file.
28  * @param filename      file name of package (or NULL to use stdin)
29  * @retval specp        spec structure to carry package header (or NULL)
30  * @retval lead         package lead
31  * @retval sigs         package signature
32  * @param csa
33  * @return              0 on success
34  */
35 int readRPM(const char *fileName, /*@out@*/ Spec *specp, /*@out@*/ struct rpmlead *lead,
36                 /*@out@*/ Header *sigs, CSA_t *csa);
37
38 /**
39  * Write rpm package to file.
40  *
41  * @warning The first header argument is now passed by reference in order to
42  * return a reloaded contiguous header to the caller.
43  *
44  * @retval hdrp         header to write (final header is returned).
45  * @param filename      file name of package
46  * @param type          RPMLEAD_SOURCE/RPMLEAD_BINARY
47  * @param csa
48  * @param passPhrase
49  * @retval cookie       generated cookie (i.e build host/time)
50  * @return              0 on success
51  */
52 int writeRPM(Header *hdrp, const char *fileName, int type,
53                 CSA_t *csa, char *passPhrase, /*@out@*/ const char **cookie);
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif  /* _H_BUILDIO_ */