Eneboo - Documentación para desarrolladores
src/libdigidoc/DigiDocParser.h
Ir a la documentación de este archivo.
00001 #ifndef __DIGIDOC_PARSER_H__
00002 #define __DIGIDOC_PARSER_H__
00003 //==================================================
00004 // FILE:        DigiDocParser.h
00005 // PROJECT:     Digi Doc
00006 // DESCRIPTION: Digi Doc functions for xml parsing
00007 // AUTHOR:  Veiko Sinivee, S|E|B IT Partner Estonia
00008 //==================================================
00009 // Copyright (C) AS Sertifitseerimiskeskus
00010 // This library is free software; you can redistribute it and/or
00011 // modify it under the terms of the GNU Lesser General Public
00012 // License as published by the Free Software Foundation; either
00013 // version 2.1 of the License, or (at your option) any later version.
00014 // This library is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 // Lesser General Public License for more details.
00018 // GNU Lesser General Public Licence is available at
00019 // http://www.gnu.org/copyleft/lesser.html
00020 //==========< HISTORY >=============================
00021 //      10.07.2004      Veiko Sinivee
00022 //                      Creation
00023 //      22.08.2004      Veiko Sinivee
00024 //                      Renamed ddocExtractDataFile to ddocXRdrExtractDataFile
00025 //                      Renamed ddocGetDataFile to ddocXRdrGetDataFile
00026 //                      Renamed ddocCopyDataFile to ddocXRdrCopyDataFile
00027 //                      introduced ddocXRdrReadSignedDocFromFile()
00028 //==================================================
00029 
00030 #include <libdigidoc/DigiDocDefs.h>
00031 #include <libdigidoc/DigiDocLib.h>
00032 #include <libdigidoc/DigiDocMem.h>
00033 
00034 #ifdef  __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 
00039 
00040   //--------------------------------------------------
00041   // Reads in signed XML document and extracts the desired data file
00042   // pSigDoc - signed document object if cached
00043   // szFileName - name of digidoc file
00044   // szDataFileName - name of new data file 
00045   // szDocId - id if DataFile
00046   // szCharset - output charset
00047   // szFileNameCharset - digidoc filename charset
00048   //--------------------------------------------------
00049   EXP_OPTION int ddocXRdrExtractDataFile(SignedDoc* pSigDoc, const char* szFileName, 
00050                                          const char* szDataFileName, 
00051                                          const char* szDocId, const char* szCharset);
00052 
00053   //--------------------------------------------------
00054   // Reads in signed XML document and returns the
00055   // desired DataFile-s content in a memory buffer.
00056   // caller is responsible for freeing the memory.
00057   // pSigDoc - signed document object if cached
00058   // szFileName - name of digidoc file
00059   // szDocId - id if DataFile
00060   // pBuf - address of buffer pointer
00061   // returns error code or ERR_OK
00062   //--------------------------------------------------
00063   EXP_OPTION int ddocXRdrGetDataFile(SignedDoc* pSigDoc, const char* szFileName,
00064                                const char* szDocId, DigiDocMemBuf* pBuf);
00065 
00066   //--------------------------------------------------
00067   // Reads in signed XML document and extracts the desired data file
00068   // This function keeps also <DataFile> xml tags. It is used
00069   // internally to copy data content from an old digidoc file
00070   // to a temp file while saving a the file
00071   // pSigDoc - signed document object if cached
00072   // szFileName - name of digidoc file
00073   // szDataFileName - name of new data file 
00074   // szDocId - id if DataFile
00075   // szCharset - output charset
00076   //--------------------------------------------------
00077   int ddocXRdrCopyDataFile(SignedDoc* pSigDoc, const char* szFileName, const char* szDataFileName, 
00078                        const char* szDocId, const char* szCharset);
00079 
00080   //--------------------------------------------------
00081   // Reads in signed XML document
00082   // szFileName - name of digidoc file
00083   // ppSigDoc - address of new signed doc pointer
00084   // lMaxDFLen - maximum size of a cached DataFile
00085   //--------------------------------------------------
00086   EXP_OPTION int ddocXRdrReadSignedDocFromFile(const char* szFileName, 
00087                                                SignedDoc** pSigDoc, long lMaxDFLen);
00088 
00089   
00090   //--------------------------------------------------
00091   // Reads in signed XML document from memory buffer
00092   // szXml - memory buffer that contains digidoc data
00093   // xmlLen - length of the input data
00094   // szFileNameCharset - digidoc filename charset
00095   // ppSigDoc - address of new signed doc pointer
00096   // lMaxDFLen - maximum size of a cached DataFile
00097   //--------------------------------------------------
00098   EXP_OPTION int ddocXRdrReadSignedDocFromMemory(const char* szXml, int xmlLen,
00099                                                  SignedDoc** pSigDoc, long lMaxDFLen);
00100 
00101 #ifdef  __cplusplus
00102 }
00103 #endif
00104 
00105 
00106 #endif // __DIGIDOC_PARSER_H__
00107 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'