OFFIS DCMTK  Version 3.6.0
dvpsprt.h
1 /*
2  *
3  * Copyright (C) 2000-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmpstat
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose:
19  * classes: DVPSPrintSCP
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:36 $
23  * CVS/RCS Revision: $Revision: 1.12 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 
31 #ifndef DVPSPRT_H
32 #define DVPSPRT_H
33 
34 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
35 
36 #include "dcmtk/ofstd/ofstream.h"
37 #include "dcmtk/ofstd/ofstring.h"
38 #include "dcmtk/dcmpstat/dvpstyp.h" /* for enum types */
39 #include "dcmtk/dcmpstat/dvpspll.h" /* for class DVPSPresentationLUT_PList */
40 #include "dcmtk/dcmpstat/dvpsspl.h" /* for class DVPSStoredPrint_PList */
41 #include "dcmtk/dcmnet/assoc.h"
42 #include "dcmtk/dcmnet/dimse.h"
43 
44 class DVInterface;
45 class DVPSFilmSession;
46 
52 {
53  public:
54 
59  DVPSPrintSCP(DVInterface &iface, const char *cfname);
60 
62  virtual ~DVPSPrintSCP();
63 
71  void setDimseLogPath(const char *fname);
72 
83  DVPSAssociationNegotiationResult negotiateAssociation(T_ASC_Network &net);
84 
89  void handleClient();
90 
91 private:
92 
95 
97  DVPSPrintSCP(const DVPSPrintSCP& copy);
98 
105  int errorCond(OFCondition cond, const char *message);
106 
115  OFCondition refuseAssociation(OFBool isBadContext);
116 
119  void dropAssociation();
120 
126  OFCondition handleNGet(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
127 
133  OFCondition handleNSet(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
134 
140  OFCondition handleNAction(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
141 
147  OFCondition handleNCreate(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
148 
154  OFCondition handleNDelete(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
155 
161  OFCondition handleCEcho(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
162 
168  void printerNGet(T_DIMSE_Message& rq, T_DIMSE_Message& rsp, DcmDataset *& rspDataset);
169 
176  void filmSessionNSet(T_DIMSE_Message& rq, DcmDataset *rqDataset, T_DIMSE_Message& rsp, DcmDataset *& rspDataset);
177 
184  void filmBoxNSet(T_DIMSE_Message& rq, DcmDataset *rqDataset, T_DIMSE_Message& rsp, DcmDataset *& rspDataset);
185 
192  void imageBoxNSet(T_DIMSE_Message& rq, DcmDataset *rqDataset, T_DIMSE_Message& rsp, DcmDataset *& rspDataset);
193 
199 
205 
211  void filmSessionNCreate(DcmDataset *rqDataset, T_DIMSE_Message& rsp, DcmDataset *& rspDataset);
212 
218  void filmBoxNCreate(DcmDataset *rqDataset, T_DIMSE_Message& rsp, DcmDataset *& rspDataset);
219 
225  void presentationLUTNCreate(DcmDataset *rqDataset, T_DIMSE_Message& rsp, DcmDataset *& rspDataset);
226 
232 
238 
244 
248  void saveDimseLog();
249 
255  static void addLogEntry(DcmSequenceOfItems *seq, const char *text);
256 
263  void dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing);
264 
265 
266  /* class data */
267 
268  /* Interface to database and config file
269  */
270  DVInterface& dviface;
271 
272  /* symbolic name of print SCP in config file, not NULL.
273  */
274  const char *cfgname;
275 
278  T_DIMSE_BlockingMode blockMode;
279 
282  int timeout;
283 
287 
288  /* Presentation LUT List
289  */
290  DVPSPresentationLUT_PList presentationLUTList;
291 
292  /* Stored Print List (contains Basic Film Boxes plus hierarchy)
293  */
294  DVPSStoredPrint_PList storedPrintList;
295 
296  /* the network association over which the print SCP is operating
297  */
298  T_ASC_Association *assoc;
299 
302 
305 
308 
311 
314 
317 
318 };
319 
320 #endif
321 
322 /*
323  * $Log: dvpsprt.h,v $
324  * Revision 1.12 2010-10-14 13:16:36 joergr
325  * Updated copyright header. Added reference to COPYRIGHT file.
326  *
327  * Revision 1.11 2009-11-24 14:12:57 uli
328  * Switched to logging mechanism provided by the "new" oflog module.
329  *
330  * Revision 1.10 2009-09-30 10:42:38 uli
331  * Make dcmpstat's include headers self-sufficient by including all
332  * needed headers directly and stop using dctk.h
333  *
334  * Revision 1.9 2005-12-08 16:03:58 meichel
335  * Changed include path schema for all DCMTK header files
336  *
337  * Revision 1.8 2004/02/04 15:49:09 joergr
338  * Removed acknowledgements with e-mail addresses from CVS log. Removed leading
339  * underscore characters from preprocessor symbols (reserved symbols).
340  *
341  * Revision 1.7 2003/09/05 10:38:32 meichel
342  * Print SCP now supports TLS connections and the Verification Service Class.
343  *
344  * Revision 1.6 2002/04/16 14:02:03 joergr
345  * Added configurable support for C++ ANSI standard includes (e.g. streams).
346  *
347  * Revision 1.5 2001/10/12 13:46:52 meichel
348  * Adapted dcmpstat to OFCondition based dcmnet module (supports strict mode).
349  *
350  * Revision 1.4 2001/06/01 15:50:20 meichel
351  * Updated copyright header
352  *
353  * Revision 1.3 2000/06/07 13:17:45 meichel
354  * added binary and textual log facilities to Print SCP.
355  *
356  * Revision 1.2 2000/06/02 16:00:50 meichel
357  * Adapted all dcmpstat classes to use OFConsole for log and error output
358  *
359  * Revision 1.1 2000/05/31 12:56:36 meichel
360  * Added initial Print SCP support
361  *
362  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2