OFFIS DCMTK  Version 3.6.0
dimse.h
1 /*
2  *
3  * Copyright (C) 1994-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were partly developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  * For further copyrights, see the following paragraphs.
14  *
15  */
16 
17 /*
18 ** Copyright (C) 1993/1994, OFFIS, Oldenburg University and CERIUM
19 **
20 ** This software and supporting documentation were
21 ** developed by
22 **
23 ** Institut OFFIS
24 ** Bereich Kommunikationssysteme
25 ** Westerstr. 10-12
26 ** 26121 Oldenburg, Germany
27 **
28 ** Fachbereich Informatik
29 ** Abteilung Prozessinformatik
30 ** Carl von Ossietzky Universitaet Oldenburg
31 ** Ammerlaender Heerstr. 114-118
32 ** 26111 Oldenburg, Germany
33 **
34 ** CERIUM
35 ** Laboratoire SIM
36 ** Faculte de Medecine
37 ** 2 Avenue du Pr. Leon Bernard
38 ** 35043 Rennes Cedex, France
39 **
40 ** for CEN/TC251/WG4 as a contribution to the Radiological
41 ** Society of North America (RSNA) 1993 Digital Imaging and
42 ** Communications in Medicine (DICOM) Demonstration.
43 **
44 ** THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER OFFIS,
45 ** OLDENBURG UNIVERSITY NOR CERIUM MAKE ANY WARRANTY REGARDING
46 ** THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR
47 ** FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER
48 ** DISEASES OR ITS CONFORMITY TO ANY SPECIFICATION. THE
49 ** ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF THE SOFTWARE
50 ** IS WITH THE USER.
51 **
52 ** Copyright of the software and supporting documentation
53 ** is, unless otherwise stated, jointly owned by OFFIS,
54 ** Oldenburg University and CERIUM and free access is hereby
55 ** granted as a license to use this software, copy this
56 ** software and prepare derivative works based upon this
57 ** software. However, any distribution of this software
58 ** source code or supporting documentation or derivative
59 ** works (source code and supporting documentation) must
60 ** include the three paragraphs of this copyright notice.
61 **
62 */
63 
64 /*
65 **
66 ** Author: Andrew Hewett Created: 03-06-93
67 **
68 ** Module: dimse
69 **
70 ** Purpose:
71 ** This file contains the routines which provide dimse layer services
72 ** for DICOM applications.
73 **
74 ** Module Prefix: DIMSE_
75 **
76 ** Last Update: $Author: joergr $
77 ** Update Date: $Date: 2010-12-01 08:26:10 $
78 ** CVS/RCS Revision: $Revision: 1.23 $
79 ** Status: $State: Exp $
80 **
81 ** CVS/RCS Log at end of file
82 **
83 */
84 
85 
86 #ifndef DIMSE_H
87 #define DIMSE_H
88 
89 /*
90  * Required Include Files
91  */
92 
93 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
94 
95 #include "dcmtk/dcmnet/dicom.h"
96 #include "dcmtk/dcmnet/lst.h"
97 #include "dcmtk/dcmnet/cond.h"
98 #include "dcmtk/dcmnet/dul.h"
99 #include "dcmtk/dcmnet/assoc.h"
100 #include "dcmtk/dcmdata/dcdatset.h"
101 #include "dcmtk/ofstd/ofglobal.h"
102 
103 class DcmOutputFileStream;
104 
113 extern OFGlobal<OFBool> dcmPeerRequiresExactUIDCopy; /* default OFFalse */
114 
121 extern OFGlobal<Uint32> dcmMaxOutgoingPDUSize; /* default 2^32-1 */
122 
123 
124 /*
125  * General Status Codes
126  */
127 #define STATUS_Success 0x0000
128 #define STATUS_Pending 0xff00
129 
130 #define DICOM_PENDING_STATUS(status) (((status)&0xff00) == 0xff00)
131 #define DICOM_WARNING_STATUS(status) (((status)&0xf000) == 0xb000)
132 
133 /*
134  * Service Class Specific Status Codes
135  * NOTE: some codes are only significant in the high byte
136  * or high nibble (4 bits).
137  */
138 /* Storage Specific Codes*/
139 #define STATUS_STORE_Refused_OutOfResources /* high byte */ 0xa700
140 #define STATUS_STORE_Refused_SOPClassNotSupported /* high byte */ 0xa800
141 #define STATUS_STORE_Error_DataSetDoesNotMatchSOPClass /* high byte */ 0xa900
142 #define STATUS_STORE_Error_CannotUnderstand /* high nibble */ 0xc000
143 #define STATUS_STORE_Warning_CoersionOfDataElements 0xb000
144 #define STATUS_STORE_Warning_DataSetDoesNotMatchSOPClass 0xb007
145 #define STATUS_STORE_Warning_ElementsDiscarded 0xb006
146 
147 /* Find Specific Codes */
148 #define STATUS_FIND_Refused_OutOfResources 0xa700
149 #define STATUS_FIND_Refused_SOPClassNotSupported 0xa800
150 #define STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass 0xa900
151 #define STATUS_FIND_Failed_UnableToProcess /* high nibble */ 0xc000
152 #define STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest 0xfe00
153 #define STATUS_FIND_Pending_WarningUnsupportedOptionalKeys 0xff01
154 
155 /* Move Specific Codes */
156 #define STATUS_MOVE_Refused_OutOfResourcesNumberOfMatches 0xa701
157 #define STATUS_MOVE_Refused_OutOfResourcesSubOperations 0xa702
158 #define STATUS_MOVE_Failed_SOPClassNotSupported 0xa800
159 #define STATUS_MOVE_Failed_MoveDestinationUnknown 0xa801
160 #define STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass 0xa900
161 #define STATUS_MOVE_Failed_UnableToProcess /* high nibble */ 0xc000
162 #define STATUS_MOVE_Cancel_SubOperationsTerminatedDueToCancelIndication 0xfe00
163 #define STATUS_MOVE_Warning_SubOperationsCompleteOneOrMoreFailures 0xb000
164 
165 /* Get Specific Codes */
166 #define STATUS_GET_Refused_OutOfResourcesNumberOfMatches 0xa701
167 #define STATUS_GET_Refused_OutOfResourcesSubOperations 0xa702
168 #define STATUS_GET_Failed_SOPClassNotSupported 0xa800
169 #define STATUS_GET_Failed_IdentifierDoesNotMatchSOPClass 0xa900
170 #define STATUS_GET_Failed_UnableToProcess /* high nibble */ 0xc000
171 #define STATUS_GET_Cancel_SubOperationsTerminatedDueToCancelIndication 0xfe00
172 #define STATUS_GET_Warning_SubOperationsCompleteOneOrMoreFailures 0xb000
173 
174 /* DIMSE-N Specific Codes */
175 #define STATUS_N_Cancel 0xFE00
176 #define STATUS_N_AttributeListError 0x0107
177 #define STATUS_N_SOPClassNotSupported 0x0122
178 #define STATUS_N_ClassInstanceConflict 0x0119
179 #define STATUS_N_DuplicateSOPInstance 0x0111
180 #define STATUS_N_DuplicateInvocation 0x0210
181 #define STATUS_N_InvalidArgumentValue 0x0115
182 #define STATUS_N_InvalidAttributeValue 0x0106
183 #define STATUS_N_InvalidObjectInstance 0x0117
184 #define STATUS_N_MissingAttribute 0x0120
185 #define STATUS_N_MissingAttributeValue 0x0121
186 #define STATUS_N_MistypedArgument 0x0212
187 #define STATUS_N_NoSuchArgument 0x0114
188 #define STATUS_N_NoSuchAttribute 0x0105
189 #define STATUS_N_NoSuchEventType 0x0113
190 #define STATUS_N_NoSuchObjectInstance 0x0112
191 #define STATUS_N_NoSuchSOPClass 0x0118
192 #define STATUS_N_ProcessingFailure 0x0110
193 #define STATUS_N_ResourceLimitation 0x0213
194 #define STATUS_N_UnrecognizedOperation 0x0211
195 #define STATUS_N_NoSuchAction 0x0123
196 
197 /* Print Management Service Class Specific Codes */
198 #define STATUS_N_PRINT_BFS_Warn_MemoryAllocation 0xB600
199 #define STATUS_N_PRINT_BFS_Warn_NoSessionPrinting 0xB601
200 #define STATUS_N_PRINT_BFS_Warn_EmptyPage 0xB602
201 #define STATUS_N_PRINT_BFB_Warn_EmptyPage 0xB603
202 #define STATUS_N_PRINT_BFS_Fail_NoFilmBox 0xC600
203 #define STATUS_N_PRINT_BFS_Fail_PrintQueueFull 0xC601
204 #define STATUS_N_PRINT_BSB_Fail_PrintQueueFull 0xC602
205 #define STATUS_N_PRINT_BFS_BFB_Fail_ImageSize 0xC603
206 #define STATUS_N_PRINT_BFS_BFB_Fail_PositionCollision 0xC604
207 #define STATUS_N_PRINT_IB_Fail_InsufficientMemory 0xC605
208 #define STATUS_N_PRINT_IB_Fail_MoreThanOneVOILUT 0xC606
209 
210 
211 /*
212  * Type Definitions
213  */
214 
215 
216 /*
217  * DIMSE Command Codes (Request and Response)
218  */
219 typedef enum { /* DIC_US */
220  DIMSE_NOTHING = 0x0000, /* none of the rest !! */
221  DIMSE_C_STORE_RQ = 0x0001, /* also known as C_SEND_RQ */
222  DIMSE_C_STORE_RSP = 0x8001, /* also known as C_SEND_RSP */
223  DIMSE_C_GET_RQ = 0x0010,
224  DIMSE_C_GET_RSP = 0x8010,
225  DIMSE_C_FIND_RQ = 0x0020,
226  DIMSE_C_FIND_RSP = 0x8020,
227  DIMSE_C_MOVE_RQ = 0x0021,
228  DIMSE_C_MOVE_RSP = 0x8021,
229  DIMSE_C_ECHO_RQ = 0x0030,
230  DIMSE_C_ECHO_RSP = 0x8030,
231  DIMSE_C_CANCEL_RQ = 0x0fff,
232  /* there is no DIMSE_C_CANCEL_RSP */
233 
234  DIMSE_N_EVENT_REPORT_RQ = 0x0100,
235  DIMSE_N_EVENT_REPORT_RSP = 0x8100,
236  DIMSE_N_GET_RQ = 0x0110,
237  DIMSE_N_GET_RSP = 0x8110,
238  DIMSE_N_SET_RQ = 0x0120,
239  DIMSE_N_SET_RSP = 0x8120,
240  DIMSE_N_ACTION_RQ = 0x0130,
241  DIMSE_N_ACTION_RSP = 0x8130,
242  DIMSE_N_CREATE_RQ = 0x0140,
243  DIMSE_N_CREATE_RSP = 0x8140,
244  DIMSE_N_DELETE_RQ = 0x0150,
245  DIMSE_N_DELETE_RSP = 0x8150
246 } T_DIMSE_Command;
247 
248 /*
249  * DIMSE Data Set Type Codes
250  */
251 
252 typedef enum { /* DIC_US */
253  DIMSE_DATASET_PRESENT = 0x0001, /* anything other than 0x0101) */
254  DIMSE_DATASET_NULL = 0x0101
255 } T_DIMSE_DataSetType;
256 
257 /*
258  * DIMSE Priority Codes
259  */
260 
261 typedef enum { /* DIC_US */
262  DIMSE_PRIORITY_LOW = 0x0002,
263  DIMSE_PRIORITY_MEDIUM = 0x0000,
264  DIMSE_PRIORITY_HIGH = 0x0001
265 } T_DIMSE_Priority;
266 
267 /*
268  * DIMSE Blocking Modes (reading)
269  */
270 
271 typedef enum {
272  DIMSE_BLOCKING,
273  DIMSE_NONBLOCKING
274 } T_DIMSE_BlockingMode;
275 
276 
277 /*
278  * DIMSE Messages
279  *
280  */
281 
282 /* C-STORE */
283 
285  DIC_US MessageID; /* M */
286  DIC_UI AffectedSOPClassUID; /* M */
287  T_DIMSE_Priority Priority; /* M */
288  T_DIMSE_DataSetType DataSetType; /* M */
289  DIC_UI AffectedSOPInstanceUID; /* M */
290  DIC_AE MoveOriginatorApplicationEntityTitle; /* U */
291  DIC_US MoveOriginatorID; /* U */
292  /* DataSet provided as argument to DIMSE functions */ /* M */
293  unsigned int opts; /* which optional items are set */
294 #define O_STORE_MOVEORIGINATORAETITLE 0x0001
295 #define O_STORE_MOVEORIGINATORID 0x0002
296  /* the following flag is set on incoming C-STORE requests if
297  * the SOP instance UID is (incorrectly) padded with a space
298  * character. Will only be detected if the dcmdata flag
299  * dcmEnableAutomaticInputDataCorrection is false.
300  */
301 #define O_STORE_RQ_BLANK_PADDING 0x0008
302 };
303 
305  DIC_US MessageIDBeingRespondedTo; /* M */
306  DIC_UI AffectedSOPClassUID; /* U(=) */
307  T_DIMSE_DataSetType DataSetType; /* M */
308  DIC_US DimseStatus; /* M */
309  DIC_UI AffectedSOPInstanceUID; /* U(=) */
310  unsigned int opts; /* which optional items are set */
311 #define O_STORE_AFFECTEDSOPCLASSUID 0x0001
312 #define O_STORE_AFFECTEDSOPINSTANCEUID 0x0002
313  /* peer requires an exact copy of the SOP instance UID
314  * as it was sent in the C-STORE-RQ,
315  * including any illegal trailing space padding.
316  */
317 #define O_STORE_PEER_REQUIRES_EXACT_UID_COPY 0x0004
318  /* SOP instance UID in C-STORE-RQ was space padded. */
319 #define O_STORE_RSP_BLANK_PADDING 0x0008
320 } ;
321 
322 /* C-ECHO */
323 
325  DIC_US MessageID; /* M */
326  DIC_UI AffectedSOPClassUID; /* M */
327  T_DIMSE_DataSetType DataSetType; /* M */
328 } ;
329 
331  DIC_US MessageIDBeingRespondedTo; /* M */
332  DIC_UI AffectedSOPClassUID; /* U(=) */
333  T_DIMSE_DataSetType DataSetType; /* M */
334  DIC_US DimseStatus; /* M */
335  unsigned int opts; /* which optional items are set */
336 #define O_ECHO_AFFECTEDSOPCLASSUID 0x0001
337 } ;
338 
339 /* C-FIND */
340 
342  DIC_US MessageID; /* M */
343  DIC_UI AffectedSOPClassUID; /* M */
344  T_DIMSE_Priority Priority; /* M */
345  T_DIMSE_DataSetType DataSetType; /* M */
346  /* Identifier provided as argument to DIMSE functions *//* M */
347 } ;
348 
350  DIC_US MessageIDBeingRespondedTo; /* M */
351  DIC_UI AffectedSOPClassUID; /* U(=) */
352  T_DIMSE_DataSetType DataSetType; /* M */
353  DIC_US DimseStatus; /* M */
354  /* Identifier provided as argument to DIMSE functions *//* C */
355  unsigned int opts; /* which optional items are set */
356 #define O_FIND_AFFECTEDSOPCLASSUID 0x0001
357 } ;
358 
359 /* C-GET */
360 
362  DIC_US MessageID; /* M */
363  DIC_UI AffectedSOPClassUID; /* M */
364  T_DIMSE_Priority Priority; /* M */
365  T_DIMSE_DataSetType DataSetType; /* M */
366  /* Identifier provided as argument to DIMSE functions *//* M */
367 } ;
368 
370  DIC_US MessageIDBeingRespondedTo; /* M */
371  DIC_UI AffectedSOPClassUID; /* U(=) */
372  T_DIMSE_DataSetType DataSetType; /* M */
373  DIC_US DimseStatus; /* M */
374  DIC_US NumberOfRemainingSubOperations; /* C */
375  DIC_US NumberOfCompletedSubOperations; /* C */
376  DIC_US NumberOfFailedSubOperations; /* C */
377  DIC_US NumberOfWarningSubOperations; /* C */
378  unsigned int opts; /* which optional items are set */
379 #define O_GET_AFFECTEDSOPCLASSUID 0x0001
380 #define O_GET_NUMBEROFREMAININGSUBOPERATIONS 0x0002
381 #define O_GET_NUMBEROFCOMPLETEDSUBOPERATIONS 0x0004
382 #define O_GET_NUMBEROFFAILEDSUBOPERATIONS 0x0008
383 #define O_GET_NUMBEROFWARNINGSUBOPERATIONS 0x0010
384 } ;
385 
386 /* C-MOVE */
387 
389  DIC_US MessageID; /* M */
390  DIC_UI AffectedSOPClassUID; /* M */
391  T_DIMSE_Priority Priority; /* M */
392  T_DIMSE_DataSetType DataSetType; /* M */
393  DIC_AE MoveDestination; /* M */
394  /* Identifier provided as argument to DIMSE functions *//* M */
395 } ;
396 
398  DIC_US MessageIDBeingRespondedTo; /* M */
399  DIC_UI AffectedSOPClassUID; /* U(=) */
400  T_DIMSE_DataSetType DataSetType; /* M */
401  DIC_US DimseStatus; /* M */
402  DIC_US NumberOfRemainingSubOperations; /* C */
403  DIC_US NumberOfCompletedSubOperations; /* C */
404  DIC_US NumberOfFailedSubOperations; /* C */
405  DIC_US NumberOfWarningSubOperations; /* C */
406  unsigned int opts; /* which optional items are set */
407 #define O_MOVE_AFFECTEDSOPCLASSUID 0x0001
408 #define O_MOVE_NUMBEROFREMAININGSUBOPERATIONS 0x0002
409 #define O_MOVE_NUMBEROFCOMPLETEDSUBOPERATIONS 0x0004
410 #define O_MOVE_NUMBEROFFAILEDSUBOPERATIONS 0x0008
411 #define O_MOVE_NUMBEROFWARNINGSUBOPERATIONS 0x0010
412 } ;
413 
414 
415 /* C-CANCEL */
416 
418  DIC_US MessageIDBeingRespondedTo; /* M */
419  T_DIMSE_DataSetType DataSetType; /* M */
420 } ;
421 
422 
423 /* N-EVENT-REPORT */
424 
426  DIC_US MessageID; /* M */
427  DIC_UI AffectedSOPClassUID; /* M */
428  DIC_UI AffectedSOPInstanceUID; /* M */
429  T_DIMSE_DataSetType DataSetType; /* M */
430  DIC_US EventTypeID; /* M */
431  /* EventInformation provided as argument to DIMSE functions *//* U */
432 } ;
433 
435  DIC_US MessageIDBeingRespondedTo; /* M */
436  DIC_UI AffectedSOPClassUID; /* U(=) */
437  DIC_US DimseStatus; /* M */
438  DIC_UI AffectedSOPInstanceUID; /* U(=) */
439  T_DIMSE_DataSetType DataSetType; /* M */
440  DIC_US EventTypeID; /* C(=) */
441  /* EventReply provided as argument to DIMSE functions *//* C */
442  unsigned int opts; /* which optional items are set */
443 #define O_NEVENTREPORT_AFFECTEDSOPCLASSUID 0x0001
444 #define O_NEVENTREPORT_AFFECTEDSOPINSTANCEUID 0x0002
445 #define O_NEVENTREPORT_EVENTTYPEID 0x0004
446 } ;
447 
448 /* N-GET */
449 
451  DIC_US MessageID; /* M */
452  DIC_UI RequestedSOPClassUID; /* M */
453  DIC_UI RequestedSOPInstanceUID; /* M */
454  T_DIMSE_DataSetType DataSetType; /* M */
455  /*
456  * In the following array, the attributes to get should be coded
457  * in pairs along the array (e.g. {g,e,g,e,g,e,...}). The ListCount
458  * variable should contain the number of 'DIC_US' values in the
459  * array (not the number of pairs).
460  */
461  int ListCount;
462  DIC_US *AttributeIdentifierList; /* U */
463 } ;
464 
466  DIC_US MessageIDBeingRespondedTo; /* M */
467  DIC_UI AffectedSOPClassUID; /* U */
468  DIC_US DimseStatus; /* M */
469  DIC_UI AffectedSOPInstanceUID; /* U */
470  T_DIMSE_DataSetType DataSetType; /* M */
471  /* AttributeList provided as argument to DIMSE functions *//* C */
472  unsigned int opts; /* which optional items are set */
473 #define O_NGET_AFFECTEDSOPCLASSUID 0x0001
474 #define O_NGET_AFFECTEDSOPINSTANCEUID 0x0002
475 } ;
476 
477 /* N-SET */
478 
480  DIC_US MessageID; /* M */
481  DIC_UI RequestedSOPClassUID; /* M */
482  DIC_UI RequestedSOPInstanceUID; /* M */
483  T_DIMSE_DataSetType DataSetType; /* M */
484  /* ModificationList provided as argument to DIMSE functions *//* M */
485 } ;
486 
488  DIC_US MessageIDBeingRespondedTo; /* M */
489  DIC_UI AffectedSOPClassUID; /* U */
490  DIC_US DimseStatus; /* M */
491  DIC_UI AffectedSOPInstanceUID; /* U */
492  T_DIMSE_DataSetType DataSetType; /* M */
493  /* AttributeList provided as argument to DIMSE functions *//* U */
494  unsigned int opts; /* which optional items are set */
495 #define O_NSET_AFFECTEDSOPCLASSUID 0x0001
496 #define O_NSET_AFFECTEDSOPINSTANCEUID 0x0002
497 } ;
498 
499 /* N-ACTION */
500 
502  DIC_US MessageID; /* M */
503  DIC_UI RequestedSOPClassUID; /* M */
504  DIC_UI RequestedSOPInstanceUID; /* M */
505  DIC_US ActionTypeID; /* M */
506  T_DIMSE_DataSetType DataSetType; /* M */
507  /* ActionInformation provided as argument to DIMSE functions *//* U */
508 } ;
509 
511  DIC_US MessageIDBeingRespondedTo; /* M */
512  DIC_UI AffectedSOPClassUID; /* U */
513  DIC_US DimseStatus; /* M */
514  DIC_UI AffectedSOPInstanceUID; /* U */
515  DIC_US ActionTypeID; /* C(=) */
516  T_DIMSE_DataSetType DataSetType; /* M */
517  /* ActionReply provided as argument to DIMSE functions *//* C */
518  unsigned int opts; /* which optional items are set */
519 #define O_NACTION_AFFECTEDSOPCLASSUID 0x0001
520 #define O_NACTION_AFFECTEDSOPINSTANCEUID 0x0002
521 #define O_NACTION_ACTIONTYPEID 0x0004
522 } ;
523 
524 /* N-CREATE */
525 
527  DIC_US MessageID; /* M */
528  DIC_UI AffectedSOPClassUID; /* M */
529  DIC_UI AffectedSOPInstanceUID; /* U */
530  T_DIMSE_DataSetType DataSetType; /* M */
531  /* AttributeList provided as argument to DIMSE functions *//* M */
532  unsigned int opts; /* which optional items are set */
533 #define O_NCREATE_AFFECTEDSOPINSTANCEUID 0x0002
534 } ;
535 
537  DIC_US MessageIDBeingRespondedTo; /* M */
538  DIC_UI AffectedSOPClassUID; /* U(=) */
539  DIC_US DimseStatus; /* M */
540  DIC_UI AffectedSOPInstanceUID; /* C */
541  T_DIMSE_DataSetType DataSetType; /* M */
542  /* AttributeList provided as argument to DIMSE functions *//* U */
543  unsigned int opts; /* which optional items are set */
544 #define O_NCREATE_AFFECTEDSOPCLASSUID 0x0001
545 #define O_NCREATE_AFFECTEDSOPINSTANCEUID 0x0002
546 } ;
547 
548 /* N-DELETE */
549 
551  DIC_US MessageID; /* M */
552  DIC_UI RequestedSOPClassUID; /* M */
553  DIC_UI RequestedSOPInstanceUID; /* M */
554  T_DIMSE_DataSetType DataSetType; /* M */
555 } ;
556 
558  DIC_US MessageIDBeingRespondedTo; /* M */
559  DIC_UI AffectedSOPClassUID; /* U */
560  DIC_US DimseStatus; /* M */
561  DIC_UI AffectedSOPInstanceUID; /* U */
562  T_DIMSE_DataSetType DataSetType; /* M */
563  unsigned int opts; /* which optional items are set */
564 #define O_NDELETE_AFFECTEDSOPCLASSUID 0x0001
565 #define O_NDELETE_AFFECTEDSOPINSTANCEUID 0x0002
566 } ;
567 
568 
569 
570 /*
571  * Composite DIMSE Message
572  */
573 
575  T_DIMSE_Command CommandField; /* M */
576 
577  union {
578  /* requests */
579  T_DIMSE_C_StoreRQ CStoreRQ;
580  T_DIMSE_C_EchoRQ CEchoRQ;
581  T_DIMSE_C_FindRQ CFindRQ;
582  T_DIMSE_C_GetRQ CGetRQ;
583  T_DIMSE_C_MoveRQ CMoveRQ;
584  T_DIMSE_C_CancelRQ CCancelRQ;
585  T_DIMSE_N_EventReportRQ NEventReportRQ;
586  T_DIMSE_N_GetRQ NGetRQ;
587  T_DIMSE_N_SetRQ NSetRQ;
588  T_DIMSE_N_ActionRQ NActionRQ;
589  T_DIMSE_N_CreateRQ NCreateRQ;
590  T_DIMSE_N_DeleteRQ NDeleteRQ;
591 
592  /* responses */
593  T_DIMSE_C_StoreRSP CStoreRSP;
594  T_DIMSE_C_EchoRSP CEchoRSP;
595  T_DIMSE_C_FindRSP CFindRSP;
596  T_DIMSE_C_GetRSP CGetRSP;
597  T_DIMSE_C_MoveRSP CMoveRSP;
598  T_DIMSE_N_EventReportRSP NEventReportRSP;
599  T_DIMSE_N_GetRSP NGetRSP;
600  T_DIMSE_N_SetRSP NSetRSP;
601  T_DIMSE_N_ActionRSP NActionRSP;
602  T_DIMSE_N_CreateRSP NCreateRSP;
603  T_DIMSE_N_DeleteRSP NDeleteRSP;
604  } msg;
605 
606 };
607 
608 
609 /*
610  * Globale Variables
611  */
612 
613 /*
614  * Define global defaults for data encoding when sending out data-sets.
615  * These can be adjusted to allow variants to be tested.
616  */
617 
618 extern E_GrpLenEncoding g_dimse_send_groupLength_encoding; /* default: EGL_recalcGL */
619 extern E_EncodingType g_dimse_send_sequenceType_encoding; /* default: EET_ExplicitLength */
620 
621 /*
622  * If this global flag is set to OFTrue, all DIMSE messages sent or received
623  * are stored in files with the name
624  * "dimse-TTT-DDD-XXXX.dcm" or "dimse-TTT-DDD-XXXX-YY.dcm", where
625  * TTT is "cmd" for a command set, or "dat" for a data set
626  * DDD is "snd" for data sent, or "rcv" for data received
627  * XXXX is a counter, starting at 1 (global for all associations)
628  * YY is an additional counter used if multiple datasets follow a single command set
629  * The files are in implicit VR little endian encoding, without meta-header.
630  */
631 
632 extern OFBool g_dimse_save_dimse_data; /* default: OFFalse */
633 
634 /*
635  * Public Function Prototypes
636  */
637 
638 
639 /*
640  * High Level DIMSE Messaging.
641  */
642 
643 /*
644  * General Information.
645  *
646  * Many of the DIMSE routines take parameters for a blocking mode
647  * and a timeout. In all cases, these parameters are only used
648  * when receiving commands or data sets (reading). There are no blocking
649  * and timeout options for send operations.
650  * When receiving commands or data sets:
651  * If the parameter blockMode is DIMSE_BLOCKING, the DIMSE routine
652  * will wait until a response arrives before returning.
653  * If the parameter blockMode is DIMSE_NONBLOCKING then the DIMSE routine
654  * will wait at most timeout seconds for a response and if no response arrives
655  * will return DIMSE_NODATAAVAILABLE. In both cases waiting will be
656  * interupted by association release, and abort messages, or network
657  * disruption.
658  */
659 
660 
661 /*
662  * Verification Service Class
663  */
664 
666 DIMSE_echoUser(
667  /* in */
668  T_ASC_Association *assoc, DIC_US msgId,
669  /* blocking info for response */
670  T_DIMSE_BlockingMode blockMode, int timeout,
671  /* out */
672  DIC_US *status, DcmDataset **statusDetail);
673 
675 DIMSE_sendEchoResponse(T_ASC_Association * assoc,
676  T_ASC_PresentationContextID presID,
677  T_DIMSE_C_EchoRQ *request, DIC_US status, DcmDataset *statusDetail);
678 
679 
680 /*
681  * Storage Service Class
682  */
683 
684 typedef enum {
685  DIMSE_StoreBegin, /* before data set */
686  DIMSE_StoreProgressing, /* during data set */
687  DIMSE_StoreEnd /* after data set */
688 } T_DIMSE_StoreProgressState;
689 
690 struct T_DIMSE_StoreProgress { /* progress structure for store callback routines */
691  T_DIMSE_StoreProgressState state; /* current state */
692  long callbackCount; /* callback execution count */
693  long progressBytes; /* sent/received so far */
694  long totalBytes; /* total/estimated total to send/receive */
695 } ;
696 
697 
698 typedef void (*DIMSE_StoreUserCallback)(
699  void *callbackData,
700  T_DIMSE_StoreProgress *progress,
701  T_DIMSE_C_StoreRQ *request /* original store request */
702  );
703 
705  OFBool cancelEncountered;
706  T_ASC_PresentationContextID presId;
707  T_DIMSE_C_CancelRQ req;
708 } ;
709 
711 DIMSE_storeUser(
712  /* in */
713  T_ASC_Association *assoc, T_ASC_PresentationContextID presId,
714  T_DIMSE_C_StoreRQ *request,
715  const char *imageFileName, DcmDataset *imageDataSet,
716  DIMSE_StoreUserCallback callback, void *callbackData,
717  /* blocking info for response */
718  T_DIMSE_BlockingMode blockMode, int timeout,
719  /* out */
720  T_DIMSE_C_StoreRSP *response,
721  DcmDataset **statusDetail,
722  T_DIMSE_DetectedCancelParameters *checkForCancelParams = NULL,
723  /* in */
724  long imageFileTotalBytes=0);
725 
726 typedef void (*DIMSE_StoreProviderCallback)(
727  /* in */
728  void *callbackData,
729  T_DIMSE_StoreProgress *progress, /* progress state */
730  T_DIMSE_C_StoreRQ *request, /* original store request */
731  char *imageFileName, DcmDataset **imageDataSet, /* being received into */
732  /* in/out */
733  T_DIMSE_C_StoreRSP *response, /* final store response */
734  /* out */
735  DcmDataset **statusDetail);
736 
738 DIMSE_storeProvider(/* in */
739  T_ASC_Association *assoc,
740  T_ASC_PresentationContextID presIdCmd,
741  T_DIMSE_C_StoreRQ *request,
742  const char* imageFileName, int writeMetaheader,
743  DcmDataset **imageDataSet,
744  DIMSE_StoreProviderCallback callback, void *callbackData,
745  /* blocking info for data set */
746  T_DIMSE_BlockingMode blockMode, int timeout);
747 
749 DIMSE_sendStoreResponse(T_ASC_Association * assoc,
750  T_ASC_PresentationContextID presID,
751  T_DIMSE_C_StoreRQ *request, /* send response to this request */
752  T_DIMSE_C_StoreRSP *response, /* response structure */
753  DcmDataset *statusDetail);
754 
755 /*
756  * Query/Retrieve Service Class (FIND)
757  */
758 
759 
760 typedef void (*DIMSE_FindUserCallback)(
761  /* in */
762  void *callbackData,
763  T_DIMSE_C_FindRQ *request, /* original find request */
764  int responseCount,
765  T_DIMSE_C_FindRSP *response, /* pending response received */
766  DcmDataset *responseIdentifiers /* pending response identifiers */
767  );
768 
770 DIMSE_findUser(
771  /* in */
772  T_ASC_Association *assoc,
773  T_ASC_PresentationContextID presID,
774  T_DIMSE_C_FindRQ *request, DcmDataset *requestIdentifiers,
775  DIMSE_FindUserCallback callback, void *callbackData,
776  /* blocking info for response */
777  T_DIMSE_BlockingMode blockMode, int timeout,
778  /* out */
779  T_DIMSE_C_FindRSP *response, DcmDataset **statusDetail);
780 
781 typedef void (*DIMSE_FindProviderCallback)(
782  /* in */
783  void *callbackData,
784  OFBool cancelled, T_DIMSE_C_FindRQ *request,
785  DcmDataset *requestIdentifiers, int responseCount,
786  /* out */
787  T_DIMSE_C_FindRSP *response,
788  DcmDataset **responseIdentifiers,
789  DcmDataset **statusDetail);
790 
792 DIMSE_findProvider(
793  /* in */
794  T_ASC_Association *assoc,
795  T_ASC_PresentationContextID presIdCmd,
796  T_DIMSE_C_FindRQ *request,
797  DIMSE_FindProviderCallback callback, void *callbackData,
798  /* blocking info for data set */
799  T_DIMSE_BlockingMode blockMode, int timeout);
800 
802 DIMSE_sendFindResponse(T_ASC_Association * assoc,
803  T_ASC_PresentationContextID presID,
804  T_DIMSE_C_FindRQ *request,
805  T_DIMSE_C_FindRSP *response, DcmDataset *responseIdentifiers,
806  DcmDataset *statusDetail);
807 
808 /*
809  * Query/Retrieve Service Class (MOVE)
810  */
811 
812 typedef void (*DIMSE_MoveUserCallback)(
813  /* in */
814  void *callbackData,
815  T_DIMSE_C_MoveRQ *request,
816  int responseCount, T_DIMSE_C_MoveRSP *response);
817 
818 typedef void (*DIMSE_SubOpProviderCallback)(void *subOpCallbackData,
819  T_ASC_Network *net, T_ASC_Association **subOpAssoc);
820 
822 DIMSE_moveUser(
823  /* in */
824  T_ASC_Association *assoc,
825  T_ASC_PresentationContextID presID,
826  T_DIMSE_C_MoveRQ *request,
827  DcmDataset *requestIdentifiers,
828  DIMSE_MoveUserCallback callback, void *callbackData,
829  /* blocking info for response */
830  T_DIMSE_BlockingMode blockMode, int timeout,
831  /* sub-operation provider callback */
832  T_ASC_Network *net,
833  DIMSE_SubOpProviderCallback subOpCallback, void *subOpCallbackData,
834  /* out */
835  T_DIMSE_C_MoveRSP *response, DcmDataset **statusDetail,
836  DcmDataset **responseIdentifers,
837  OFBool ignorePendingDatasets = OFFalse);
838 
839 typedef void (*DIMSE_MoveProviderCallback)(
840  /* in */
841  void *callbackData,
842  OFBool cancelled, T_DIMSE_C_MoveRQ *request,
843  DcmDataset *requestIdentifiers, int responseCount,
844  /* out */
845  T_DIMSE_C_MoveRSP *response, DcmDataset **statusDetail,
846  DcmDataset **responseIdentifiers);
847 
849 DIMSE_moveProvider(
850  /* in */
851  T_ASC_Association *assoc,
852  T_ASC_PresentationContextID presIdCmd,
853  T_DIMSE_C_MoveRQ *request,
854  DIMSE_MoveProviderCallback callback, void *callbackData,
855  /* blocking info for data set */
856  T_DIMSE_BlockingMode blockMode, int timeout);
857 
859 DIMSE_sendMoveResponse(T_ASC_Association * assoc,
860  T_ASC_PresentationContextID presID, T_DIMSE_C_MoveRQ *request,
861  T_DIMSE_C_MoveRSP *response, DcmDataset *rspIds,
862  DcmDataset *statusDetail);
863 
864 /*
865  * Query/Retrieve Service Class (GET)
866  */
867 
868 typedef void (*DIMSE_GetUserCallback)(
869  /* in */
870  void *callbackData,
871  T_DIMSE_C_GetRQ *request,
872  int responseCount, T_DIMSE_C_GetRSP *response);
873 
874 typedef void (*DIMSE_SubOpProviderCallback)(void *subOpCallbackData,
875  T_ASC_Network *net, T_ASC_Association **subOpAssoc);
876 
878 DIMSE_getUser(
879  /* in */
880  T_ASC_Association *assoc,
881  T_ASC_PresentationContextID presID,
882  T_DIMSE_C_GetRQ *request,
883  DcmDataset *requestIdentifiers,
884  DIMSE_GetUserCallback callback, void *callbackData,
885  /* blocking info for response */
886  T_DIMSE_BlockingMode blockMode, int timeout,
887  /* sub-operation provider callback */
888  T_ASC_Network *net,
889  DIMSE_SubOpProviderCallback subOpCallback, void *subOpCallbackData,
890  /* out */
891  T_DIMSE_C_GetRSP *response, DcmDataset **statusDetail,
892  DcmDataset **responseIdentifers);
893 
894 typedef void (*DIMSE_GetProviderCallback)(
895  /* in */
896  void *callbackData,
897  OFBool cancelled, T_DIMSE_C_GetRQ *request,
898  DcmDataset *requestIdentifiers, int responseCount,
899  /* out */
900  T_DIMSE_C_GetRSP *response, DcmDataset **statusDetail,
901  DcmDataset **responseIdentifiers);
902 
904 DIMSE_getProvider(
905  /* in */
906  T_ASC_Association *assoc,
907  T_ASC_PresentationContextID presIdCmd,
908  T_DIMSE_C_GetRQ *request,
909  DIMSE_GetProviderCallback callback, void *callbackData,
910  /* blocking info for data set */
911  T_DIMSE_BlockingMode blockMode, int timeout);
912 
914 DIMSE_sendGetResponse(T_ASC_Association * assoc,
915  T_ASC_PresentationContextID presID, T_DIMSE_C_GetRQ *request,
916  T_DIMSE_C_GetRSP *response, DcmDataset *rspIds,
917  DcmDataset *statusDetail);
918 
919 /*
920  * Query/Retrieve Service Class (CANCEL)
921  */
922 
924 DIMSE_sendCancelRequest(T_ASC_Association * assoc,
925  T_ASC_PresentationContextID presId, DIC_US msgId);
926 
928 DIMSE_checkForCancelRQ(T_ASC_Association * assoc,
929  T_ASC_PresentationContextID presId, DIC_US msgId);
930 
931 
932 /****
933  *
934  * Low Level DIMSE Messaging
935  * With the exception of DIMSE_receiveCommand,
936  * the following function are only intended for use if you
937  * wish to implement an alternative interface to the
938  * higher level routines provided above.
939  * Service call providers will have to use DIMSE_receiveCommand
940  * before calling the appropriate provider routine declared above.
941  *
942  */
943 
944 
945 typedef void (*DIMSE_ProgressCallback)(void *callbackContext,
946  unsigned long byteCount);
947 
948 
950 DIMSE_sendMessageUsingFileData(T_ASC_Association *association,
951  T_ASC_PresentationContextID presID,
952  T_DIMSE_Message *msg, DcmDataset *statusDetail,
953  const char* dataFileName,
954  DIMSE_ProgressCallback callback,
955  void *callbackContext,
956  DcmDataset **commandSet=NULL);
957 
959 DIMSE_sendMessageUsingMemoryData(T_ASC_Association *association,
960  T_ASC_PresentationContextID presID,
961  T_DIMSE_Message *msg, DcmDataset *statusDetail,
962  DcmDataset *dataObject,
963  DIMSE_ProgressCallback callback,
964  void *callbackContext,
965  DcmDataset **commandSet=NULL);
966 
968 DIMSE_receiveCommand(T_ASC_Association *association,
969  T_DIMSE_BlockingMode blocking,
970  int timeout,
971  T_ASC_PresentationContextID *presID,
972  T_DIMSE_Message *msg,
973  DcmDataset **statusDetail,
974  DcmDataset **commandSet=NULL);
975 
977 DIMSE_receiveDataSetInMemory(T_ASC_Association *association,
978  T_DIMSE_BlockingMode blocking,
979  int timeout,
980  T_ASC_PresentationContextID *presID,
981  DcmDataset **dataObject,
982  DIMSE_ProgressCallback callback,
983  void *callbackContext);
984 
986 DIMSE_createFilestream(
987  /* in */
988  const char *filename,
989  const T_DIMSE_C_StoreRQ *request,
990  const T_ASC_Association *assoc,
991  T_ASC_PresentationContextID presIdCmd,
992  int writeMetaheader,
993  /* out */
994  DcmOutputFileStream **filestream);
995 
997 DIMSE_receiveDataSetInFile(T_ASC_Association *assoc,
998  T_DIMSE_BlockingMode blocking, int timeout,
999  T_ASC_PresentationContextID *presID,
1000  DcmOutputStream *filestream,
1001  DIMSE_ProgressCallback callback, void *callbackData);
1002 
1004 DIMSE_ignoreDataSet( T_ASC_Association * assoc,
1005  T_DIMSE_BlockingMode blocking,
1006  int timeout,
1007  DIC_UL * bytesRead,
1008  DIC_UL * pdvCount);
1009 
1010 /*
1011  * Misc functions
1012  */
1013 
1014 OFString DIMSE_warn_str(T_ASC_Association *assoc);
1015 
1016 enum DIMSE_direction {
1017  DIMSE_INCOMING,
1018  DIMSE_OUTGOING
1019 };
1020 
1021 /* Debugging functions for printing contents of a command structure */
1022 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_Message &msg,
1023  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1024 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_EchoRQ &msg,
1025  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1026 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_EchoRSP &msg,
1027  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1028 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_GetRQ &msg,
1029  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1030 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_GetRSP &msg,
1031  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1032 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_MoveRQ &msg,
1033  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1034 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_MoveRSP &msg,
1035  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1036 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_FindRQ &msg,
1037  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1038 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_FindRSP &msg,
1039  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1040 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_StoreRQ &msg,
1041  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1042 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_StoreRSP &msg,
1043  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1044 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_C_CancelRQ &msg,
1045  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1046 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_EventReportRQ &msg,
1047  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1048 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_EventReportRSP &msg,
1049  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1050 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_GetRQ &msg,
1051  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1052 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_GetRSP &msg,
1053  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1054 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_SetRQ &msg,
1055  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1056 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_SetRSP &msg,
1057  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1058 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_ActionRQ &msg,
1059  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1060 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_ActionRSP &msg,
1061  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1062 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_CreateRQ &msg,
1063  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1064 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_CreateRSP &msg,
1065  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1066 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_DeleteRQ &msg,
1067  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1068 OFString& DIMSE_dumpMessage(OFString &str, T_DIMSE_N_DeleteRSP &msg,
1069  enum DIMSE_direction dir, DcmItem *dataset = NULL, T_ASC_PresentationContextID presID = 0);
1070 
1071 
1072 // Compatibility wrapper
1073 #define DIMSE_COMPAT_WRAP(func, type) \
1074  static inline void func (FILE * f, type * msg) \
1075  { \
1076  OFString str; \
1077  DIMSE_dumpMessage(str, *msg, DIMSE_INCOMING); \
1078  fprintf(f, "%s\n", str.c_str()); \
1079  }
1080 #define DIMSE_COMPAT_WRAP_R(func, type) \
1081  DIMSE_COMPAT_WRAP(func ## RQ, type ## RQ) \
1082  DIMSE_COMPAT_WRAP(func ## RSP, type ## RSP)
1083 
1084 static inline void DIMSE_printMessage(STD_NAMESPACE ostream& ostream, T_DIMSE_Message &msg, DcmItem *dataset = NULL)
1085 {
1086  OFString str;
1087  ostream << DIMSE_dumpMessage(str, msg, DIMSE_INCOMING, dataset) << OFendl;
1088 }
1089 
1090 DIMSE_COMPAT_WRAP(DIMSE_printCommand, T_DIMSE_Message)
1091 DIMSE_COMPAT_WRAP_R(DIMSE_printCEcho, T_DIMSE_C_Echo)
1092 DIMSE_COMPAT_WRAP_R(DIMSE_printCStore, T_DIMSE_C_Store)
1093 DIMSE_COMPAT_WRAP_R(DIMSE_printCGet, T_DIMSE_C_Get)
1094 DIMSE_COMPAT_WRAP_R(DIMSE_printCMove, T_DIMSE_C_Move)
1095 DIMSE_COMPAT_WRAP_R(DIMSE_printCFind, T_DIMSE_C_Find)
1096 DIMSE_COMPAT_WRAP(DIMSE_printCCancelRQ, T_DIMSE_C_EchoRQ)
1097 DIMSE_COMPAT_WRAP_R(DIMSE_printNEventReport, T_DIMSE_N_EventReport)
1098 DIMSE_COMPAT_WRAP_R(DIMSE_printNGet, T_DIMSE_N_Get)
1099 DIMSE_COMPAT_WRAP_R(DIMSE_printNSet, T_DIMSE_N_Set)
1100 DIMSE_COMPAT_WRAP_R(DIMSE_printNAction, T_DIMSE_N_Action)
1101 DIMSE_COMPAT_WRAP_R(DIMSE_printNCreate, T_DIMSE_N_Create)
1102 DIMSE_COMPAT_WRAP_R(DIMSE_printNDelete, T_DIMSE_N_Delete)
1103 
1104 #undef DIMSE_COMPAT_WRAP
1105 #undef DIMSE_COMPAT_WRAP_R
1106 
1107 #endif
1108 
1109 /*
1110 ** CVS Log
1111 ** $Log: dimse.h,v $
1112 ** Revision 1.23 2010-12-01 08:26:10 joergr
1113 ** Added OFFIS copyright header (beginning with the year 1994).
1114 **
1115 ** Revision 1.22 2010-10-14 13:17:22 joergr
1116 ** Updated copyright header. Added reference to COPYRIGHT file.
1117 **
1118 ** Revision 1.21 2009-11-18 11:53:58 uli
1119 ** Switched to logging mechanism provided by the "new" oflog module.
1120 **
1121 ** Revision 1.20 2009-08-04 10:07:48 joergr
1122 ** Added optional parameter to printCStore() functions that allows for printing
1123 ** the Presentation Context ID.
1124 **
1125 ** Revision 1.19 2007/07/12 12:18:00 onken
1126 ** Added status codes and corresponding printing routines for DIMSE-N.
1127 **
1128 ** Revision 1.18 2006/08/15 16:04:29 meichel
1129 ** Updated the code in module dcmnet to correctly compile when
1130 ** all standard C++ classes remain in namespace std.
1131 **
1132 ** Revision 1.17 2005/12/08 16:02:21 meichel
1133 ** Changed include path schema for all DCMTK header files
1134 **
1135 ** Revision 1.16 2005/11/22 16:44:44 meichel
1136 ** Added option to movescu that allows graceful handling of Move SCPs
1137 ** that send illegal datasets following pending C-MOVE-RSP messages.
1138 **
1139 ** Revision 1.15 2005/02/22 09:40:55 meichel
1140 ** Fixed two bugs in "bit-preserving" Store SCP code. Errors while creating or
1141 ** writing the DICOM file (e.g. file system full) now result in a DIMSE error
1142 ** response (out of resources) being sent back to the SCU.
1143 **
1144 ** Revision 1.14 2003/08/27 15:03:33 meichel
1145 ** Changed anonymous struct typedefs into struct declarations
1146 **
1147 ** Revision 1.13 2002/09/10 16:00:47 meichel
1148 ** Added global flag dcmMaxOutgoingPDUSize that allows to restrict the maximum
1149 ** size of outgoiung P-DATA PDUs to a value less than the maximum supported by
1150 ** the remote application entity or this library. May be useful if there is an
1151 ** interaction between PDU size and other network layers, e. g. TLS, IP or
1152 ** below.
1153 **
1154 ** Revision 1.12 2002/08/27 17:00:59 meichel
1155 ** Initial release of new DICOM I/O stream classes that add support for stream
1156 ** compression (deflated little endian explicit VR transfer syntax)
1157 **
1158 ** Revision 1.11 2001/10/12 10:18:26 meichel
1159 ** Replaced the CONDITION types, constants and functions in the dcmnet module
1160 ** by an OFCondition based implementation which eliminates the global condition
1161 ** stack. This is a major change, caveat emptor!
1162 **
1163 ** Revision 1.10 2000/12/15 13:28:16 meichel
1164 ** Global flag to enable/disable workaround code for some buggy Store SCUs
1165 ** in DIMSE_storeProvider(). If enabled, an illegal space-padding in the
1166 ** Affected SOP Instance UID field of the C-STORE-RQ message is retained
1167 ** in the corresponding C-STORE-RSP message.
1168 **
1169 ** Revision 1.9 2000/06/07 08:57:52 meichel
1170 ** dcmnet DIMSE routines now allow to retrieve raw command sets as DcmDataset
1171 ** objects, e.g. for logging purposes. Added enhanced message dump functions.
1172 **
1173 ** Revision 1.8 2000/01/31 17:14:17 meichel
1174 ** ntroduced new flag g_dimse_save_dimse_data. If enabled, all DIMSE messages
1175 ** and data sets sent or received are stored in files.
1176 ** This facilitates debugging of DIMSE problems.
1177 **
1178 ** Revision 1.7 1999/04/19 08:36:48 meichel
1179 ** Added support for C-FIND-CANCEL/C-MOVE-CANCEL in DIMSE_storeUser().
1180 **
1181 ** Revision 1.6 1998/08/10 08:53:40 meichel
1182 ** renamed member variable in DIMSE structures from "Status" to
1183 ** "DimseStatus". This is required if dcmnet is used together with
1184 ** <X11/Xlib.h> where Status is #define'd as int.
1185 **
1186 ** Revision 1.5 1998/06/29 12:14:26 meichel
1187 ** Removed some name clashes (e.g. local variable with same
1188 ** name as class member) to improve maintainability.
1189 ** Applied some code purifications proposed by the gcc 2.8.1 -Weffc++ option.
1190 **
1191 ** Revision 1.4 1997/07/21 08:40:10 andreas
1192 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
1193 ** with one unique boolean type OFBool.
1194 **
1195 ** Revision 1.3 1997/05/23 10:47:06 meichel
1196 ** Major rewrite of storescp application. See CHANGES for details.
1197 ** Changes required to interfaces of some DIMSE functions.
1198 **
1199 ** Revision 1.2 1996/04/25 16:06:28 hewett
1200 ** Replaced declarations of DIC_UL with unsigned long.
1201 **
1202 ** Revision 1.1.1.1 1996/03/26 18:38:45 hewett
1203 ** Initial Release.
1204 **
1205 **
1206 */


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