00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
#ifndef DVPSPRT_H
00036
#define DVPSPRT_H
00037
00038
#include "osconfig.h"
00039
00040
#include "ofstream.h"
00041
#include "ofstring.h"
00042
#include "dctk.h"
00043
#include "dvpstyp.h"
00044
#include "dvpspll.h"
00045
#include "dvpsspl.h"
00046
#include "assoc.h"
00047
#include "dimse.h"
00048
00049
class DVInterface;
00050
class DVPSFilmSession;
00051
00056 class DVPSPrintSCP
00057 {
00058
public:
00059
00064
DVPSPrintSCP(
DVInterface &iface,
const char *cfname);
00065
00067
virtual ~DVPSPrintSCP();
00068
00076
void setLog(
OFConsole *stream, OFBool verbMode, OFBool dbgMode, OFBool dmpMode);
00077
00085
void setDimseLogPath(
const char *fname);
00086
00097 DVPSAssociationNegotiationResult
negotiateAssociation(T_ASC_Network &net);
00098
00103
void handleClient();
00104
00105
private:
00106
00108
DVPSPrintSCP&
operator=(
const DVPSPrintSCP&);
00109
00111
DVPSPrintSCP(
const DVPSPrintSCP& copy);
00112
00119
int errorCond(
OFCondition cond,
const char *message);
00120
00129
OFCondition refuseAssociation(OFBool isBadContext);
00130
00133
void dropAssociation();
00134
00140
OFCondition handleNGet(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
00141
00147
OFCondition handleNSet(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
00148
00154
OFCondition handleNAction(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
00155
00161
OFCondition handleNCreate(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
00162
00168
OFCondition handleNDelete(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
00169
00175
OFCondition handleCEcho(T_DIMSE_Message& rq, T_ASC_PresentationContextID presID);
00176
00182
void printerNGet(T_DIMSE_Message& rq, T_DIMSE_Message& rsp,
DcmDataset *& rspDataset);
00183
00190
void filmSessionNSet(T_DIMSE_Message& rq,
DcmDataset *rqDataset, T_DIMSE_Message& rsp,
DcmDataset *& rspDataset);
00191
00198
void filmBoxNSet(T_DIMSE_Message& rq,
DcmDataset *rqDataset, T_DIMSE_Message& rsp,
DcmDataset *& rspDataset);
00199
00206
void imageBoxNSet(T_DIMSE_Message& rq,
DcmDataset *rqDataset, T_DIMSE_Message& rsp,
DcmDataset *& rspDataset);
00207
00212
void filmSessionNAction(T_DIMSE_Message& rq, T_DIMSE_Message& rsp);
00213
00218
void filmBoxNAction(T_DIMSE_Message& rq, T_DIMSE_Message& rsp);
00219
00225
void filmSessionNCreate(
DcmDataset *rqDataset, T_DIMSE_Message& rsp,
DcmDataset *& rspDataset);
00226
00232
void filmBoxNCreate(
DcmDataset *rqDataset, T_DIMSE_Message& rsp,
DcmDataset *& rspDataset);
00233
00239
void presentationLUTNCreate(
DcmDataset *rqDataset, T_DIMSE_Message& rsp,
DcmDataset *& rspDataset);
00240
00245
void filmSessionNDelete(T_DIMSE_Message& rq, T_DIMSE_Message& rsp);
00246
00251
void filmBoxNDelete(T_DIMSE_Message& rq, T_DIMSE_Message& rsp);
00252
00257
void presentationLUTNDelete(T_DIMSE_Message& rq, T_DIMSE_Message& rsp);
00258
00262
void saveDimseLog();
00263
00269
static void addLogEntry(DcmSequenceOfItems *seq,
const char *text);
00270
00277
void dumpNMessage(T_DIMSE_Message &msg,
DcmItem *dataset, OFBool outgoing);
00278
00279
00280
00281
00282
00283
00284
DVInterface& dviface;
00285
00286
00287
00288
const char *cfgname;
00289
00292 T_DIMSE_BlockingMode
blockMode;
00293
00296 int timeout;
00297
00300 DVPSFilmSession *
filmSession;
00301
00302
00303
00304
DVPSPresentationLUT_PList presentationLUTList;
00305
00306
00307
00308
DVPSStoredPrint_PList storedPrintList;
00309
00310
00311
00312 T_ASC_Association *assoc;
00313
00315 DcmUniqueIdentifier studyInstanceUID;
00316
00318 DcmUniqueIdentifier psSeriesInstanceUID;
00319
00321 DcmUniqueIdentifier imageSeriesInstanceUID;
00322
00324 DcmSequenceOfItems *
logSequence;
00325
00327 DcmSequenceOfItems *
acseSequence;
00328
00330 OFString logPath;
00331
00334 OFConsole *
logstream;
00335
00338 OFBool
verboseMode;
00339
00342 OFBool
debugMode;
00343
00346 OFBool
dumpMode;
00347
00348 };
00349
00350
#endif
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379