#if !defined(AFX_CLIENT_H__167DBDC2_8626_11D3_8675_00105A07EA32__INCLUDED_) #define AFX_CLIENT_H__167DBDC2_8626_11D3_8675_00105A07EA32__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // Client.h : header file // #include #define SERVER_AUTH_DATA "LEAD server ISCL" #define SERVER_AUTH_DATA_LEN 17 #define PROTOCOL_VERSION 1 #define IMPLEMENTATION_CLASS_UID "1.2.840.114257.1123456" #define IMPLEMENTATION_VERSION_NAME "1" ///////////////////////////////////////////////////////////////////////////// // CNetClient class CNetClient : public LDicomNet { // Construction public: CNetClient(L_UINT32 nMode = DICOM_SECURE_NONE); ~CNetClient(); virtual L_VOID OnSecureLinkReady(L_INT nError); L_VOID LoadDefaultSettings(); L_UINT32 GetChallengeISCL (L_UINT64 *pChallenge, L_UINT64 nParameter); L_UINT32 InternalAuthenticateISCL (L_UINT64 nChallenge, L_UINT64 *pResponse, L_UINT64 nParameter); L_UINT32 ExternalAuthenticateISCL (L_UINT64 nChallenge, L_UINT64 nResponse, L_UINT64 nParameter); static CString GetQueryStringForUIDs(LDicomDS& ReqIdentifier, L_UINT32 uTag, const CString& sFiledName); static CString GetQueryStringForDateRange(LDicomDS& ReqIdentifier, L_UINT32 uTag, const CString& sFiledName,L_UINT uIndex); int m_nValid; static L_CHAR *GetTLSErrorString(L_INT nError); // Events private: L_VOID OnReceiveAssociateRequest(LDicomAssociate *pPDU); L_VOID OnReceiveReleaseRequest(L_VOID); L_VOID OnReceiveAbort(L_UCHAR nSource, L_UCHAR nReason); L_VOID OnReceiveReleaseResponse(L_VOID); L_VOID OnReceiveCEchoRequest(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR * pszClass); L_VOID OnReceiveCStoreRequest(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR * pszClass, L_CHAR * pszInstance, L_UINT16 nPriority, L_CHAR * pszMoveAE, L_UINT16 nMoveMessageID, LDicomDS *pDS); L_VOID OnReceiveCFindRequest(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR * pszClass, L_UINT16 nPriority, LDicomDS *pDS); L_VOID OnReceiveCMoveRequest(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR * pszClass, L_UINT16 nPriority, L_CHAR * pszMoveAE, LDicomDS *pDS); L_VOID OnConnect(L_INT nError); L_VOID OnClose(L_INT nError, LDicomNet* pClient); L_VOID OnReceiveAssociateAccept(LDicomAssociate *pPDU); L_VOID OnReceiveAssociateReject(L_UCHAR nResult, L_UCHAR nSource, L_UCHAR nReason); L_VOID OnReceiveCStoreResponse(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR * pszClass, L_CHAR * pszInstance, L_UINT16 nStatus); L_VOID OnReceiveData(L_UCHAR nID, LDicomDS* pCS, LDicomDS* pDS); L_VOID OnReceive(L_INT nError, L_UCHAR nType, L_CHAR *pBuffer, L_UINT32 nBytes); L_VOID OnReceiveUnknown(L_UCHAR nPresentationID, LDicomDS *pCS, LDicomDS *pDS); L_BOOL SendMatchedInstance(CString *pFailedSOPInstanceUID); L_BOOL ChangeTransferSyntax(LDicomDS& DataSet, const CString& sDataSetTS, const CString& sAssociatedTS); L_INT OnPrivateKeyPassword (L_CHAR *pszPassword, L_INT nSize, L_INT uFlag); L_INT LoadFromFileSettings(); L_VOID OnReceivedISCLPacket(L_INT nError, L_CHAR* pBuffer, L_UINT32 nBytes); L_VOID FindPatients(LDicomDS* pReqIdentifier, L_UCHAR nPresentationID, L_UINT16 uMessageID, L_CHAR* pszClass, CString& sUser); L_VOID FindStudies(LDicomDS* pReqIdentifier, L_UCHAR nPresentationID, L_UINT16 uMessageID, L_CHAR* pszClass, CString& sUser, BOOL bPatientRoot); L_VOID FindSeries(LDicomDS* pReqIdentifier, L_UCHAR nPresentationID, L_UINT16 uMessageID, L_CHAR* pszClass, CString& sUser, BOOL bPatientRoot); L_VOID FindImages(LDicomDS* pReqIdentifier, L_UCHAR nPresentationID, L_UINT16 uMessageID, L_CHAR* pszClass, CString& sUser, BOOL bPatientRoot); CString PrepareForWCM(const CString& sValue) const; L_VOID PrepareRspIdentifier(LDicomDS& RspIdentifier, LDicomDS& ReqIdentifier, int iQRLevel, BOOL bPatientRoot) const; L_VOID InsertKeyElement(LDicomDS& RspIdentifier, LDicomDS& ReqIdentifier, L_UINT32 uTag, L_UINT16 uVR) const; L_VOID SetKeyElement(LDicomDS& RspIdentifier, CString& sValue, L_UINT32 uTag) const; L_VOID SetTimeDateKeyElement(LDicomDS& RspIdentifier, TIMESTAMP_STRUCT& ts, L_UINT32 uTag, L_BOOL bTimeValue) const; L_BOOL SaveDataSet(LDicomDS* pDataSet, CString& sFilename); L_VOID SetElement(LDicomDS* pDataSet, L_UINT32 uTag, L_UINT16 uVR, L_CHAR* pszValue) const; CString sLastReceivedFileName; }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_CLIENT_H__167DBDC2_8626_11D3_8675_00105A07EA32__INCLUDED_)