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 #ifndef __DVPSPR_H__
00035 #define __DVPSPR_H__
00036
00037 #include "osconfig.h"
00038 #include "dctk.h"
00039 #include "dimse.h"
00040
00044 class DVPSPrintEventHandler
00045 {
00046 public:
00058 virtual DIC_US handleEvent(
00059 T_DIMSE_N_EventReportRQ& eventMessage,
00060 DcmDataset *eventInformation,
00061 DcmDataset *statusDetail)=0;
00062 };
00063
00067 class DVPSPrintMessageHandler
00068 {
00069 public:
00071 DVPSPrintMessageHandler();
00072
00074 virtual ~DVPSPrintMessageHandler();
00075
00090 OFCondition createRQ(
00091 const char *sopclassUID,
00092 OFString& sopinstanceUID,
00093 DcmDataset *attributeListIn,
00094 Uint16& status,
00095 DcmDataset* &attributeListOut);
00096
00110 OFCondition setRQ(
00111 const char *sopclassUID,
00112 const char *sopinstanceUID,
00113 DcmDataset *modificationList,
00114 Uint16& status,
00115 DcmDataset* &attributeListOut);
00116
00132 OFCondition getRQ(
00133 const char *sopclassUID,
00134 const char *sopinstanceUID,
00135 const Uint16 *attributeIdentifierList,
00136 size_t numShorts,
00137 Uint16& status,
00138 DcmDataset* &attributeListOut);
00139
00154 OFCondition actionRQ(
00155 const char *sopclassUID,
00156 const char *sopinstanceUID,
00157 Uint16 actionTypeID,
00158 DcmDataset *actionInformation,
00159 Uint16& status,
00160 DcmDataset* &actionReply);
00161
00170 OFCondition deleteRQ(
00171 const char *sopclassUID,
00172 const char *sopinstanceUID,
00173 Uint16& status);
00174
00193 OFCondition negotiateAssociation(
00194 DcmTransportLayer *tlayer,
00195 const char *myAEtitle,
00196 const char *peerAEtitle,
00197 const char *peerHost,
00198 int peerPort,
00199 long peerMaxPDU,
00200 OFBool negotiatePresentationLUT,
00201 OFBool negotiateAnnotationBox,
00202 OFBool implicitOnly);
00203
00207 OFCondition releaseAssociation();
00208
00212 OFCondition abortAssociation();
00213
00217 void setEventHandler(DVPSPrintEventHandler *handler) { eventHandler = handler; }
00218
00223 void setTimeout(T_DIMSE_BlockingMode blocking, int timeOut) { blockMode=blocking; timeout=timeOut; }
00224
00229 OFBool printerSupportsPresentationLUT();
00230
00235 OFBool printerSupportsAnnotationBox();
00236
00240 void setDumpStream(ostream *stream=NULL)
00241 {
00242 dumpStream = stream;
00243 }
00244
00250 void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode);
00251
00252 private:
00253
00255 DVPSPrintMessageHandler(const DVPSPrintMessageHandler& copy);
00257 DVPSPrintMessageHandler& operator=(const DVPSPrintMessageHandler& copy);
00258
00274 OFCondition sendNRequest(
00275 T_ASC_PresentationContextID presId,
00276 T_DIMSE_Message &request,
00277 DcmDataset *rqDataSet,
00278 T_DIMSE_Message &response,
00279 DcmDataset* &statusDetail,
00280 DcmDataset* &rspDataset);
00281
00288 T_ASC_PresentationContextID findAcceptedPC(const char *sopclassuid);
00289
00295 void dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing);
00296
00298 T_ASC_Association *assoc;
00299
00301 T_ASC_Network *net;
00302
00304 DVPSPrintEventHandler *eventHandler;
00305
00307 T_DIMSE_BlockingMode blockMode;
00308
00310 int timeout;
00311
00313 ostream *dumpStream;
00314
00317 OFConsole *logstream;
00318
00321 OFBool verboseMode;
00322
00325 OFBool debugMode;
00326
00327 };
00328
00329 #endif
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366