gwenhywfar  4.3.3
sar.h
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Wed Jun 22 2011
3  copyright : (C) 2011 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU Lesser General Public *
10  * License as published by the Free Software Foundation; either *
11  * version 2.1 of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * Lesser General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU Lesser General Public *
19  * License along with this library; if not, write to the Free Software *
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21  * MA 02111-1307 USA *
22  * *
23  ***************************************************************************/
24 
25 
26 #ifndef GWEN_SAR_H
27 #define GWEN_SAR_H
28 
29 
30 #include <gwenhywfar/gwen_sar_fileheader.h>
31 #include <gwenhywfar/syncio_file.h>
32 #include <gwenhywfar/cryptmgr.h>
33 #include <gwenhywfar/cryptkey.h>
34 
35 
36 
37 typedef struct GWEN_SAR GWEN_SAR;
38 
40 GWEN_SAR *GWEN_Sar_new(void);
41 
43 void GWEN_Sar_Attach(GWEN_SAR *sr);
44 
46 void GWEN_Sar_free(GWEN_SAR *sr);
47 
48 
49 
51 int GWEN_Sar_CreateArchive(GWEN_SAR *sr, const char *aname);
52 
54 int GWEN_Sar_OpenArchive(GWEN_SAR *sr, const char *aname,
56  uint32_t acc);
57 
59 int GWEN_Sar_CloseArchive(GWEN_SAR *sr, int abandon);
60 
61 
63 int GWEN_Sar_AddFile(GWEN_SAR *sr, const char *fname);
64 
65 
67 const GWEN_SAR_FILEHEADER_LIST *GWEN_Sar_GetHeaders(GWEN_SAR *sr);
68 
69 
72 
75 
76 
79 
82 
83 
84 
85 
87 int GWEN_Sar_UnpackArchive(const char *inFile, const char *where);
88 
90 int GWEN_Sar_CheckArchive(const char *inFile);
91 
92 
94 int GWEN_Sar_VerifyArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key);
95 
97 int GWEN_Sar_SignArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key);
98 
99 
100 
101 #endif
102 
103 
104 
105 
106