00001 /* 00002 * 00003 * Copyright (C) 1998-2005, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmsign 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: 00023 * classes: SiMACConstructor 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:04:38 $ 00027 * CVS/RCS Revision: $Revision: 1.9 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef SIMACCON_H 00035 #define SIMACCON_H 00036 00037 #include "dcmtk/config/osconfig.h" 00038 #include "dcmtk/dcmsign/sitypes.h" 00039 00040 #ifdef WITH_OPENSSL 00041 00042 #include "dcmtk/dcmdata/dcostrmb.h" /* for DcmOutputBufferStream */ 00043 #include "dcmtk/dcmdata/dcxfer.h" /* for E_TransferSyntax */ 00044 #include "dcmtk/dcmdata/dcdeftag.h" 00045 00046 #define INCLUDE_CSTDIO 00047 #include "dcmtk/ofstd/ofstdinc.h" 00048 00049 class SiMAC; 00050 class DcmItem; 00051 class DcmElement; 00052 class DcmAttributeTag; 00053 00056 class SiMACConstructor 00057 { 00058 public: 00059 00061 SiMACConstructor(); 00062 00064 virtual ~SiMACConstructor(); 00065 00090 OFCondition encodeDataset( 00091 DcmItem& item, 00092 SiMAC& mac, 00093 E_TransferSyntax oxfer, 00094 DcmAttributeTag &tagListOut, 00095 DcmAttributeTag *tagListIn = NULL); 00096 00111 OFCondition encodeDigitalSignatureItem( 00112 DcmItem& signatureItem, 00113 SiMAC& mac, 00114 E_TransferSyntax oxfer); 00115 00120 OFCondition flush(SiMAC& mac); 00121 00126 void setDumpFile(FILE *f); 00127 00128 private: 00129 00131 SiMACConstructor(SiMACConstructor& arg); 00132 00134 SiMACConstructor& operator=(SiMACConstructor& arg); 00135 00140 OFCondition flushBuffer(SiMAC& mac); 00141 00149 OFCondition encodeElement(DcmElement *element, SiMAC& mac, E_TransferSyntax oxfer); 00150 00159 static OFBool inTagList(const DcmElement *element, DcmAttributeTag *tagList); 00160 00162 unsigned char *buf; 00163 00165 DcmOutputBufferStream stream; 00166 00170 FILE *dumpFile; 00171 }; 00172 00173 00174 #endif 00175 #endif 00176 00177 /* 00178 * $Log: simaccon.h,v $ 00179 * Revision 1.9 2005/12/08 16:04:38 meichel 00180 * Changed include path schema for all DCMTK header files 00181 * 00182 * Revision 1.8 2003/06/04 14:21:03 meichel 00183 * Simplified include structure to avoid preprocessor limitation 00184 * (max 32 #if levels) on MSVC5 with STL. 00185 * 00186 * Revision 1.7 2002/11/27 14:53:40 meichel 00187 * Adapted module dcmsign to use of new header file ofstdinc.h 00188 * 00189 * Revision 1.6 2002/08/27 17:21:00 meichel 00190 * Initial release of new DICOM I/O stream classes that add support for stream 00191 * compression (deflated little endian explicit VR transfer syntax) 00192 * 00193 * Revision 1.5 2001/12/10 16:40:46 meichel 00194 * Fixed warnings from Sun CC 4.2 00195 * 00196 * Revision 1.4 2001/11/16 15:50:50 meichel 00197 * Adapted digital signature code to final text of supplement 41. 00198 * 00199 * Revision 1.3 2001/09/26 14:30:20 meichel 00200 * Adapted dcmsign to class OFCondition 00201 * 00202 * Revision 1.2 2001/06/01 15:50:49 meichel 00203 * Updated copyright header 00204 * 00205 * Revision 1.1 2000/11/07 16:48:55 meichel 00206 * Initial release of dcmsign module for DICOM Digital Signatures 00207 * 00208 * 00209 */ 00210