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 #ifndef DVPSPR_H
00031 #define DVPSPR_H
00032
00033 #include "dcmtk/config/osconfig.h"
00034 #include "dcmtk/dcmnet/dimse.h"
00035
00039 class DVPSPrintEventHandler
00040 {
00041 public:
00042
00044 virtual ~DVPSPrintEventHandler() {}
00045
00057 virtual DIC_US handleEvent(
00058 T_DIMSE_N_EventReportRQ& eventMessage,
00059 DcmDataset *eventInformation,
00060 DcmDataset *statusDetail)=0;
00061 };
00062
00066 class DVPSPrintMessageHandler
00067 {
00068 public:
00070 DVPSPrintMessageHandler();
00071
00073 virtual ~DVPSPrintMessageHandler();
00074
00089 OFCondition createRQ(
00090 const char *sopclassUID,
00091 OFString& sopinstanceUID,
00092 DcmDataset *attributeListIn,
00093 Uint16& status,
00094 DcmDataset* &attributeListOut);
00095
00109 OFCondition setRQ(
00110 const char *sopclassUID,
00111 const char *sopinstanceUID,
00112 DcmDataset *modificationList,
00113 Uint16& status,
00114 DcmDataset* &attributeListOut);
00115
00131 OFCondition getRQ(
00132 const char *sopclassUID,
00133 const char *sopinstanceUID,
00134 const Uint16 *attributeIdentifierList,
00135 size_t numShorts,
00136 Uint16& status,
00137 DcmDataset* &attributeListOut);
00138
00153 OFCondition actionRQ(
00154 const char *sopclassUID,
00155 const char *sopinstanceUID,
00156 Uint16 actionTypeID,
00157 DcmDataset *actionInformation,
00158 Uint16& status,
00159 DcmDataset* &actionReply);
00160
00169 OFCondition deleteRQ(
00170 const char *sopclassUID,
00171 const char *sopinstanceUID,
00172 Uint16& status);
00173
00192 OFCondition negotiateAssociation(
00193 DcmTransportLayer *tlayer,
00194 const char *myAEtitle,
00195 const char *peerAEtitle,
00196 const char *peerHost,
00197 int peerPort,
00198 long peerMaxPDU,
00199 OFBool negotiatePresentationLUT,
00200 OFBool negotiateAnnotationBox,
00201 OFBool implicitOnly);
00202
00206 OFCondition releaseAssociation();
00207
00211 OFCondition abortAssociation();
00212
00216 void setEventHandler(DVPSPrintEventHandler *handler) { eventHandler = handler; }
00217
00222 void setTimeout(T_DIMSE_BlockingMode blocking, int timeOut) { blockMode=blocking; timeout=timeOut; }
00223
00228 OFBool printerSupportsPresentationLUT();
00229
00234 OFBool printerSupportsAnnotationBox();
00235
00236 private:
00237
00239 DVPSPrintMessageHandler(const DVPSPrintMessageHandler& copy);
00241 DVPSPrintMessageHandler& operator=(const DVPSPrintMessageHandler& copy);
00242
00258 OFCondition sendNRequest(
00259 T_ASC_PresentationContextID presId,
00260 T_DIMSE_Message &request,
00261 DcmDataset *rqDataSet,
00262 T_DIMSE_Message &response,
00263 DcmDataset* &statusDetail,
00264 DcmDataset* &rspDataset);
00265
00272 T_ASC_PresentationContextID findAcceptedPC(const char *sopclassuid);
00273
00279 void dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing);
00280
00282 T_ASC_Association *assoc;
00283
00285 T_ASC_Network *net;
00286
00288 DVPSPrintEventHandler *eventHandler;
00289
00291 T_DIMSE_BlockingMode blockMode;
00292
00294 int timeout;
00295 };
00296
00297 #endif
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
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