gwenhywfar  4.3.3
sar.h
Go to the documentation of this file.
00001 /***************************************************************************
00002  begin       : Wed Jun 22 2011
00003  copyright   : (C) 2011 by Martin Preuss
00004  email       : martin@libchipcard.de
00005 
00006  ***************************************************************************
00007  *                                                                         *
00008  *   This library is free software; you can redistribute it and/or         *
00009  *   modify it under the terms of the GNU Lesser General Public            *
00010  *   License as published by the Free Software Foundation; either          *
00011  *   version 2.1 of the License, or (at your option) any later version.    *
00012  *                                                                         *
00013  *   This library is distributed in the hope that it will be useful,       *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00016  *   Lesser General Public License for more details.                       *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU Lesser General Public      *
00019  *   License along with this library; if not, write to the Free Software   *
00020  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00021  *   MA  02111-1307  USA                                                   *
00022  *                                                                         *
00023  ***************************************************************************/
00024 
00025 
00026 #ifndef GWEN_SAR_H
00027 #define GWEN_SAR_H
00028 
00029 
00030 #include <gwenhywfar/gwen_sar_fileheader.h>
00031 #include <gwenhywfar/syncio_file.h>
00032 #include <gwenhywfar/cryptmgr.h>
00033 #include <gwenhywfar/cryptkey.h>
00034 
00035 
00036 
00037 typedef struct GWEN_SAR GWEN_SAR;
00038 
00039 GWENHYWFAR_API 
00040 GWEN_SAR *GWEN_Sar_new(void);
00041 
00042 GWENHYWFAR_API 
00043 void GWEN_Sar_Attach(GWEN_SAR *sr);
00044 
00045 GWENHYWFAR_API 
00046 void GWEN_Sar_free(GWEN_SAR *sr);
00047 
00048 
00049 
00050 GWENHYWFAR_API 
00051 int GWEN_Sar_CreateArchive(GWEN_SAR *sr, const char *aname);
00052 
00053 GWENHYWFAR_API 
00054 int GWEN_Sar_OpenArchive(GWEN_SAR *sr, const char *aname,
00055                          GWEN_SYNCIO_FILE_CREATIONMODE cm,
00056                          uint32_t acc);
00057 
00058 GWENHYWFAR_API 
00059 int GWEN_Sar_CloseArchive(GWEN_SAR *sr, int abandon);
00060 
00061 
00062 GWENHYWFAR_API 
00063 int GWEN_Sar_AddFile(GWEN_SAR *sr, const char *fname);
00064 
00065 
00066 GWENHYWFAR_API 
00067 const GWEN_SAR_FILEHEADER_LIST *GWEN_Sar_GetHeaders(GWEN_SAR *sr);
00068 
00069 
00070 GWENHYWFAR_API 
00071 int GWEN_Sar_ExtractFile(GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh);
00072 
00073 GWENHYWFAR_API 
00074 int GWEN_Sar_CheckFile(GWEN_SAR *sr, const GWEN_SAR_FILEHEADER *fh);
00075 
00076 
00077 GWENHYWFAR_API
00078 int GWEN_Sar_Sign(GWEN_SAR *sr, GWEN_CRYPTMGR *cm);
00079 
00080 GWENHYWFAR_API
00081 int GWEN_Sar_Verify(GWEN_SAR *sr, GWEN_CRYPTMGR *cm);
00082 
00083 
00084 
00085 
00086 GWENHYWFAR_API
00087 int GWEN_Sar_UnpackArchive(const char *inFile, const char *where);
00088 
00089 GWENHYWFAR_API
00090 int GWEN_Sar_CheckArchive(const char *inFile);
00091 
00092 
00093 GWENHYWFAR_API
00094 int GWEN_Sar_VerifyArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key);
00095 
00096 GWENHYWFAR_API
00097 int GWEN_Sar_SignArchive(const char *inFile, const char *signer, GWEN_CRYPT_KEY *key);
00098 
00099 
00100 
00101 #endif
00102 
00103 
00104 
00105 
00106