dcmpstat/include/dcmtk/dcmpstat/dvpspr.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: dcmpstat
00015  *
00016  *  Author: Marco Eichelberg
00017  *
00018  *  Purpose:
00019  *    classes: DVPSPrintMessageHandler
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:16:36 $
00023  *  CVS/RCS Revision: $Revision: 1.17 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 #ifndef DVPSPR_H
00031 #define DVPSPR_H
00032 
00033 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00034 #include "dcmtk/dcmnet/dimse.h"
00035 
00039 class DVPSPrintEventHandler
00040 {
00041 public:
00042 
00044   virtual ~DVPSPrintEventHandler() {}
00045 
00057   virtual DIC_US handleEvent(
00058     T_DIMSE_N_EventReportRQ& eventMessage,
00059     DcmDataset *eventInformation,
00060     DcmDataset *statusDetail)=0;
00061 };
00062 
00066 class DVPSPrintMessageHandler
00067 {
00068 public:
00070   DVPSPrintMessageHandler();
00071 
00073   virtual ~DVPSPrintMessageHandler();
00074 
00089   OFCondition createRQ(
00090     const char *sopclassUID,
00091     OFString& sopinstanceUID,
00092     DcmDataset *attributeListIn,
00093     Uint16& status,
00094     DcmDataset* &attributeListOut);
00095 
00109   OFCondition setRQ(
00110     const char *sopclassUID,
00111     const char *sopinstanceUID,
00112     DcmDataset *modificationList,
00113     Uint16& status,
00114     DcmDataset* &attributeListOut);
00115 
00131   OFCondition getRQ(
00132     const char *sopclassUID,
00133     const char *sopinstanceUID,
00134     const Uint16 *attributeIdentifierList,
00135     size_t numShorts,
00136     Uint16& status,
00137     DcmDataset* &attributeListOut);
00138 
00153   OFCondition actionRQ(
00154     const char *sopclassUID,
00155     const char *sopinstanceUID,
00156     Uint16 actionTypeID,
00157     DcmDataset *actionInformation,
00158     Uint16& status,
00159     DcmDataset* &actionReply);
00160 
00169   OFCondition deleteRQ(
00170     const char *sopclassUID,
00171     const char *sopinstanceUID,
00172     Uint16& status);
00173 
00192   OFCondition negotiateAssociation(
00193     DcmTransportLayer *tlayer,
00194     const char *myAEtitle,
00195     const char *peerAEtitle,
00196     const char *peerHost,
00197     int peerPort,
00198     long peerMaxPDU,
00199     OFBool negotiatePresentationLUT,
00200     OFBool negotiateAnnotationBox,
00201     OFBool implicitOnly);
00202 
00206   OFCondition releaseAssociation();
00207 
00211   OFCondition abortAssociation();
00212 
00216   void setEventHandler(DVPSPrintEventHandler *handler) { eventHandler = handler; }
00217 
00222   void setTimeout(T_DIMSE_BlockingMode blocking, int timeOut) { blockMode=blocking; timeout=timeOut; }
00223 
00228   OFBool printerSupportsPresentationLUT();
00229 
00234   OFBool printerSupportsAnnotationBox();
00235 
00236 private:
00237 
00239   DVPSPrintMessageHandler(const DVPSPrintMessageHandler& copy);
00241   DVPSPrintMessageHandler& operator=(const DVPSPrintMessageHandler& copy);
00242 
00258   OFCondition sendNRequest(
00259     T_ASC_PresentationContextID presId,
00260     T_DIMSE_Message &request,
00261     DcmDataset *rqDataSet,
00262     T_DIMSE_Message &response,
00263     DcmDataset* &statusDetail,
00264     DcmDataset* &rspDataset);
00265 
00272   T_ASC_PresentationContextID findAcceptedPC(const char *sopclassuid);
00273 
00279   void dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing);
00280 
00282   T_ASC_Association *assoc;
00283 
00285   T_ASC_Network *net;
00286 
00288   DVPSPrintEventHandler *eventHandler;
00289 
00291   T_DIMSE_BlockingMode blockMode;
00292 
00294   int timeout;
00295 };
00296 
00297 #endif
00298 
00299 /*
00300  *  $Log: dvpspr.h,v $
00301  *  Revision 1.17  2010-10-14 13:16:36  joergr
00302  *  Updated copyright header. Added reference to COPYRIGHT file.
00303  *
00304  *  Revision 1.16  2010-10-07 14:31:36  joergr
00305  *  Removed leading underscore characters from preprocessor symbols (reserved).
00306  *
00307  *  Revision 1.15  2009-11-24 14:12:57  uli
00308  *  Switched to logging mechanism provided by the "new" oflog module.
00309  *
00310  *  Revision 1.14  2009-09-30 10:42:38  uli
00311  *  Make dcmpstat's include headers self-sufficient by including all
00312  *  needed headers directly and stop using dctk.h
00313  *
00314  *  Revision 1.13  2006-08-15 16:57:01  meichel
00315  *  Updated the code in module dcmpstat to correctly compile when
00316  *    all standard C++ classes remain in namespace std.
00317  *
00318  *  Revision 1.12  2005/12/09 14:48:35  meichel
00319  *  Added missing virtual destructors
00320  *
00321  *  Revision 1.11  2005/12/08 16:03:57  meichel
00322  *  Changed include path schema for all DCMTK header files
00323  *
00324  *  Revision 1.10  2003/09/05 14:31:33  meichel
00325  *  Print SCU now supports TLS connections.
00326  *
00327  *  Revision 1.9  2001/10/12 13:46:52  meichel
00328  *  Adapted dcmpstat to OFCondition based dcmnet module (supports strict mode).
00329  *
00330  *  Revision 1.8  2001/06/01 15:50:19  meichel
00331  *  Updated copyright header
00332  *
00333  *  Revision 1.7  2000/06/02 16:00:50  meichel
00334  *  Adapted all dcmpstat classes to use OFConsole for log and error output
00335  *
00336  *  Revision 1.6  2000/03/08 16:28:55  meichel
00337  *  Updated copyright header.
00338  *
00339  *  Revision 1.5  1999/10/28 08:18:56  meichel
00340  *  Print client does not attempt any more to negotiate Presentation LUT or
00341  *    Annotation Box if config file says that the printer does not support them.
00342  *
00343  *  Revision 1.4  1999/10/13 14:10:47  meichel
00344  *  Now negotiation Basic Annotation Box SOP Class
00345  *
00346  *  Revision 1.3  1999/09/24 15:23:47  meichel
00347  *  Print spooler (dcmprtsv) now logs diagnostic messages in log files
00348  *    when operating in spool mode.
00349  *
00350  *  Revision 1.2  1999/09/17 14:33:58  meichel
00351  *  Completed print spool functionality including Supplement 22 support
00352  *
00353  *  Revision 1.1  1999/07/30 13:34:49  meichel
00354  *  Added new classes managing Stored Print objects
00355  *
00356  *
00357  */


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