File: poolmoveassociation.h

package info (click to toggle)
aeskulap 0.2.2-beta2%2Bgit20190406.ef77f01-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,736 kB
  • sloc: cpp: 9,213; ansic: 685; makefile: 330; sh: 256; xml: 101
file content (71 lines) | stat: -rw-r--r-- 2,759 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
    Aeskulap ImagePool - DICOM abstraction library
    Copyright (C) 2005  Alexander Pipelka

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    Alexander Pipelka
*/

#ifndef IMAGEPOOL_MOVEASSOCIATION_H
#define IMAGEPOOL_MOVEASSOCIATION_H

#include "poolfindassociation.h"

class MoveAssociation : public FindAssociation {
public:

	MoveAssociation();
	virtual ~MoveAssociation();

	void Create(const std::string& title, const std::string& peer, int port, const std::string& ouraet, /*int ourPort,*/ const char *abstractSyntax = UID_MOVEPatientRootQueryRetrieveInformationModel/*, const char *abstractSyntaxMove = UID_MOVEPatientRootQueryRetrieveInformationModel*/);

	OFCondition SendObject(DcmDataset *dataset);

protected:

	void OnAddPresentationContext(T_ASC_Parameters *params, const char* transferSyntaxList[], int transferSyntaxListCount);

	virtual void OnResponseReceived(DcmDataset* response);

	int m_maxReceivePDULength;

private:

	typedef struct _MoveCallbackInfo {
		T_ASC_Association *assoc;
		T_ASC_PresentationContextID presId;
		MoveAssociation* pCaller;
	} MoveCallbackInfo;

	typedef struct _StoreCallbackInfo {
		DcmDataset* dataset;
		MoveAssociation* pCaller;
	} StoreCallbackInfo;

	OFCondition moveSCU(DcmDataset *pdset);
	static void moveCallback(void *callbackData, T_DIMSE_C_MoveRQ *request, int responseCount, T_DIMSE_C_MoveRSP *response);

	OFCondition acceptSubAssoc(T_ASC_Network *aNet, T_ASC_Association **assoc);
	OFCondition subOpSCP(T_ASC_Association **subAssoc);
	static void subOpCallback(void * pCaller, T_ASC_Network *aNet, T_ASC_Association **subAssoc);

	OFCondition storeSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, T_ASC_PresentationContextID presID);
	static void storeSCPCallback(void *callbackData, T_DIMSE_StoreProgress *progress, T_DIMSE_C_StoreRQ *req, char *imageFileName, DcmDataset **imageDataSet, T_DIMSE_C_StoreRSP *rsp, DcmDataset **statusDetail);

	OFCondition echoSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, T_ASC_PresentationContextID presID);
};

#endif // IMAGEPOOL_MOVEASSOCIATION_H