dcmsign/include/dcmtk/dcmsign/simaccon.h

00001 /*
00002  *
00003  *  Copyright (C) 1998-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module: dcmsign
00015  *
00016  *  Author: Marco Eichelberg
00017  *
00018  *  Purpose:
00019  *    classes: SiMACConstructor
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:17:25 $
00023  *  CVS/RCS Revision: $Revision: 1.10 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 #ifndef SIMACCON_H
00031 #define SIMACCON_H
00032 
00033 #include "dcmtk/config/osconfig.h"
00034 #include "dcmtk/dcmsign/sitypes.h"
00035 
00036 #ifdef WITH_OPENSSL
00037 
00038 #include "dcmtk/dcmdata/dcostrmb.h"  /* for DcmOutputBufferStream */
00039 #include "dcmtk/dcmdata/dcxfer.h"    /* for E_TransferSyntax */
00040 #include "dcmtk/dcmdata/dcdeftag.h"
00041 
00042 #define INCLUDE_CSTDIO
00043 #include "dcmtk/ofstd/ofstdinc.h"
00044 
00045 class SiMAC;
00046 class DcmItem;
00047 class DcmElement;
00048 class DcmAttributeTag;
00049 
00052 class SiMACConstructor
00053 {
00054 public:
00055 
00057   SiMACConstructor();
00058   
00060   virtual ~SiMACConstructor();
00061 
00086   OFCondition encodeDataset(
00087     DcmItem& item, 
00088     SiMAC& mac, 
00089     E_TransferSyntax oxfer,
00090     DcmAttributeTag &tagListOut,
00091     DcmAttributeTag *tagListIn = NULL);
00092 
00107   OFCondition encodeDigitalSignatureItem(
00108     DcmItem& signatureItem, 
00109     SiMAC& mac, 
00110     E_TransferSyntax oxfer);
00111 
00116   OFCondition flush(SiMAC& mac);
00117 
00122   void setDumpFile(FILE *f);
00123 
00124 private:
00125 
00127   SiMACConstructor(SiMACConstructor& arg);
00128 
00130   SiMACConstructor& operator=(SiMACConstructor& arg);
00131 
00136   OFCondition flushBuffer(SiMAC& mac);
00137 
00145   OFCondition encodeElement(DcmElement *element, SiMAC& mac, E_TransferSyntax oxfer);
00146 
00155   static OFBool inTagList(const DcmElement *element, DcmAttributeTag *tagList);
00156 
00158   unsigned char *buf;
00159 
00161   DcmOutputBufferStream stream;
00162   
00166   FILE *dumpFile;
00167 };
00168 
00169 
00170 #endif
00171 #endif
00172 
00173 /*
00174  *  $Log: simaccon.h,v $
00175  *  Revision 1.10  2010-10-14 13:17:25  joergr
00176  *  Updated copyright header. Added reference to COPYRIGHT file.
00177  *
00178  *  Revision 1.9  2005-12-08 16:04:38  meichel
00179  *  Changed include path schema for all DCMTK header files
00180  *
00181  *  Revision 1.8  2003/06/04 14:21:03  meichel
00182  *  Simplified include structure to avoid preprocessor limitation
00183  *    (max 32 #if levels) on MSVC5 with STL.
00184  *
00185  *  Revision 1.7  2002/11/27 14:53:40  meichel
00186  *  Adapted module dcmsign to use of new header file ofstdinc.h
00187  *
00188  *  Revision 1.6  2002/08/27 17:21:00  meichel
00189  *  Initial release of new DICOM I/O stream classes that add support for stream
00190  *    compression (deflated little endian explicit VR transfer syntax)
00191  *
00192  *  Revision 1.5  2001/12/10 16:40:46  meichel
00193  *  Fixed warnings from Sun CC 4.2
00194  *
00195  *  Revision 1.4  2001/11/16 15:50:50  meichel
00196  *  Adapted digital signature code to final text of supplement 41.
00197  *
00198  *  Revision 1.3  2001/09/26 14:30:20  meichel
00199  *  Adapted dcmsign to class OFCondition
00200  *
00201  *  Revision 1.2  2001/06/01 15:50:49  meichel
00202  *  Updated copyright header
00203  *
00204  *  Revision 1.1  2000/11/07 16:48:55  meichel
00205  *  Initial release of dcmsign module for DICOM Digital Signatures
00206  *
00207  *
00208  */
00209 


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1