dcmpstat/include/dvpspr.h

00001 /* 00002 * 00003 * Copyright (C) 1998-2003, 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: dcmpstat 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: 00023 * classes: DVPSPrintMessageHandler 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2003/09/05 14:31:33 $ 00027 * CVS/RCS Revision: $Revision: 1.10 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef __DVPSPR_H__ 00035 #define __DVPSPR_H__ 00036 00037 #include "osconfig.h" /* make sure OS specific configuration is included first */ 00038 #include "dctk.h" 00039 #include "dimse.h" 00040 00044 class DVPSPrintEventHandler 00045 { 00046 public: 00058 virtual DIC_US handleEvent( 00059 T_DIMSE_N_EventReportRQ& eventMessage, 00060 DcmDataset *eventInformation, 00061 DcmDataset *statusDetail)=0; 00062 }; 00063 00067 class DVPSPrintMessageHandler 00068 { 00069 public: 00071 DVPSPrintMessageHandler(); 00072 00074 virtual ~DVPSPrintMessageHandler(); 00075 00090 OFCondition createRQ( 00091 const char *sopclassUID, 00092 OFString& sopinstanceUID, 00093 DcmDataset *attributeListIn, 00094 Uint16& status, 00095 DcmDataset* &attributeListOut); 00096 00110 OFCondition setRQ( 00111 const char *sopclassUID, 00112 const char *sopinstanceUID, 00113 DcmDataset *modificationList, 00114 Uint16& status, 00115 DcmDataset* &attributeListOut); 00116 00132 OFCondition getRQ( 00133 const char *sopclassUID, 00134 const char *sopinstanceUID, 00135 const Uint16 *attributeIdentifierList, 00136 size_t numShorts, 00137 Uint16& status, 00138 DcmDataset* &attributeListOut); 00139 00154 OFCondition actionRQ( 00155 const char *sopclassUID, 00156 const char *sopinstanceUID, 00157 Uint16 actionTypeID, 00158 DcmDataset *actionInformation, 00159 Uint16& status, 00160 DcmDataset* &actionReply); 00161 00170 OFCondition deleteRQ( 00171 const char *sopclassUID, 00172 const char *sopinstanceUID, 00173 Uint16& status); 00174 00193 OFCondition negotiateAssociation( 00194 DcmTransportLayer *tlayer, 00195 const char *myAEtitle, 00196 const char *peerAEtitle, 00197 const char *peerHost, 00198 int peerPort, 00199 long peerMaxPDU, 00200 OFBool negotiatePresentationLUT, 00201 OFBool negotiateAnnotationBox, 00202 OFBool implicitOnly); 00203 00207 OFCondition releaseAssociation(); 00208 00212 OFCondition abortAssociation(); 00213 00217 void setEventHandler(DVPSPrintEventHandler *handler) { eventHandler = handler; } 00218 00223 void setTimeout(T_DIMSE_BlockingMode blocking, int timeOut) { blockMode=blocking; timeout=timeOut; } 00224 00229 OFBool printerSupportsPresentationLUT(); 00230 00235 OFBool printerSupportsAnnotationBox(); 00236 00240 void setDumpStream(ostream *stream=NULL) 00241 { 00242 dumpStream = stream; 00243 } 00244 00250 void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode); 00251 00252 private: 00253 00255 DVPSPrintMessageHandler(const DVPSPrintMessageHandler& copy); 00257 DVPSPrintMessageHandler& operator=(const DVPSPrintMessageHandler& copy); 00258 00274 OFCondition sendNRequest( 00275 T_ASC_PresentationContextID presId, 00276 T_DIMSE_Message &request, 00277 DcmDataset *rqDataSet, 00278 T_DIMSE_Message &response, 00279 DcmDataset* &statusDetail, 00280 DcmDataset* &rspDataset); 00281 00288 T_ASC_PresentationContextID findAcceptedPC(const char *sopclassuid); 00289 00295 void dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing); 00296 00298 T_ASC_Association *assoc; 00299 00301 T_ASC_Network *net; 00302 00304 DVPSPrintEventHandler *eventHandler; 00305 00307 T_DIMSE_BlockingMode blockMode; 00308 00310 int timeout; 00311 00313 ostream *dumpStream; 00314 00317 OFConsole *logstream; 00318 00321 OFBool verboseMode; 00322 00325 OFBool debugMode; 00326 00327 }; 00328 00329 #endif 00330 00331 /* 00332 * $Log: dvpspr.h,v $ 00333 * Revision 1.10 2003/09/05 14:31:33 meichel 00334 * Print SCU now supports TLS connections. 00335 * 00336 * Revision 1.9 2001/10/12 13:46:52 meichel 00337 * Adapted dcmpstat to OFCondition based dcmnet module (supports strict mode). 00338 * 00339 * Revision 1.8 2001/06/01 15:50:19 meichel 00340 * Updated copyright header 00341 * 00342 * Revision 1.7 2000/06/02 16:00:50 meichel 00343 * Adapted all dcmpstat classes to use OFConsole for log and error output 00344 * 00345 * Revision 1.6 2000/03/08 16:28:55 meichel 00346 * Updated copyright header. 00347 * 00348 * Revision 1.5 1999/10/28 08:18:56 meichel 00349 * Print client does not attempt any more to negotiate Presentation LUT or 00350 * Annotation Box if config file says that the printer does not support them. 00351 * 00352 * Revision 1.4 1999/10/13 14:10:47 meichel 00353 * Now negotiation Basic Annotation Box SOP Class 00354 * 00355 * Revision 1.3 1999/09/24 15:23:47 meichel 00356 * Print spooler (dcmprtsv) now logs diagnostic messages in log files 00357 * when operating in spool mode. 00358 * 00359 * Revision 1.2 1999/09/17 14:33:58 meichel 00360 * Completed print spool functionality including Supplement 22 support 00361 * 00362 * Revision 1.1 1999/07/30 13:34:49 meichel 00363 * Added new classes managing Stored Print objects 00364 * 00365 * 00366 */


Generated on 4 Nov 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.8