OFFIS DCMTK  Version 3.6.0
dcmqrsrv.h
1 /*
2  *
3  * Copyright (C) 1993-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: dcmqrdb
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose: class DcmQueryRetrieveSCP
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:16:41 $
22  * CVS/RCS Revision: $Revision: 1.4 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DCMQRSRV_H
30 #define DCMQRSRV_H
31 
32 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
33 #include "dcmtk/ofstd/oftypes.h"
34 #include "dcmtk/dcmnet/assoc.h"
35 #include "dcmtk/dcmnet/dimse.h"
36 #include "dcmtk/dcmqrdb/dcmqrptb.h"
37 
42 
44 enum CTN_RefuseReason
45 {
47  CTN_TooManyAssociations,
49  CTN_CannotFork,
51  CTN_BadAppContext,
53  CTN_BadAEPeer,
55  CTN_BadAEService,
57  CTN_NoReason
58 };
59 
63 {
64 public:
65 
72  const DcmQueryRetrieveConfig& config,
73  const DcmQueryRetrieveOptions& options,
75 
77  virtual ~DcmQueryRetrieveSCP() { }
78 
86 
91  void setDatabaseFlags(
92  OFBool dbCheckFindIdentifier,
93  OFBool dbCheckMoveIdentifier);
94 
97  void cleanChildren();
98 
99 private:
100 
108 
109  OFCondition refuseAssociation(T_ASC_Association ** assoc, CTN_RefuseReason reason);
110 
111  OFCondition handleAssociation(
112  T_ASC_Association * assoc,
113  OFBool correctUIDPadding);
114 
115  OFCondition echoSCP(
116  T_ASC_Association * assoc,
117  T_DIMSE_C_EchoRQ * req,
118  T_ASC_PresentationContextID presId);
119 
120  OFCondition findSCP(
121  T_ASC_Association * assoc,
122  T_DIMSE_C_FindRQ * request,
123  T_ASC_PresentationContextID presID,
125 
126  OFCondition getSCP(
127  T_ASC_Association * assoc,
128  T_DIMSE_C_GetRQ * request,
129  T_ASC_PresentationContextID presID,
131 
132  OFCondition moveSCP(
133  T_ASC_Association * assoc,
134  T_DIMSE_C_MoveRQ * request,
135  T_ASC_PresentationContextID presID,
137 
138  OFCondition storeSCP(
139  T_ASC_Association * assoc,
140  T_DIMSE_C_StoreRQ * req,
141  T_ASC_PresentationContextID presId,
143  OFBool correctUIDPadding);
144 
145  OFCondition dispatch(
146  T_ASC_Association *assoc,
147  OFBool correctUIDPadding);
148 
149  static void refuseAnyStorageContexts(T_ASC_Association *assoc);
150 
153 
156 
159 
162 
165 
168 };
169 
170 #endif
171 
172 /*
173  * CVS Log
174  * $Log: dcmqrsrv.h,v $
175  * Revision 1.4 2010-10-14 13:16:41 joergr
176  * Updated copyright header. Added reference to COPYRIGHT file.
177  *
178  * Revision 1.3 2009-11-24 10:10:42 uli
179  * Switched to logging mechanism provided by the "new" oflog module.
180  *
181  * Revision 1.2 2009-08-21 09:50:07 joergr
182  * Replaced tabs by spaces and updated copyright date.
183  *
184  * Revision 1.1 2005/12/16 12:42:50 joergr
185  * Renamed file to avoid naming conflicts when linking on SunOS 5.5.1 with
186  * Sun CC 2.0.1.
187  *
188  * Revision 1.2 2005/12/08 16:04:27 meichel
189  * Changed include path schema for all DCMTK header files
190  *
191  * Revision 1.1 2005/03/30 13:34:50 meichel
192  * Initial release of module dcmqrdb that will replace module imagectn.
193  * It provides a clear interface between the Q/R DICOM front-end and the
194  * database back-end. The imagectn code has been re-factored into a minimal
195  * class structure.
196  *
197  *
198  */


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