// Client.h: interface for the CNetClient class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_CLIENT_H__1FB59950_595A_11D3_A335_00105A07EA4A__INCLUDED_) #define AFX_CLIENT_H__1FB59950_595A_11D3_A335_00105A07EA4A__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #define DISPLAY_TREE_NONE 0x0000 #define DISPLAY_TREE_DIRECTORY 0x0001 #define DISPLAY_TREE_VALUES 0x0002 #define DISPLAY_TREE_EXPANDED 0x0004 class CNetServer; class CNetDlg; //#define CLIENT_CERT_PATH "c:\\lead13\\dist\\bin\\client.pem" #define CLIENT_CERT_NAME "client.pem" #define CLIENT_AUTH_DATA "LEAD client ISCL" #define CLIENT_AUTH_DATA_LEN 17 class CNetClient : public LDicomNet { public: CNetClient(L_CHAR* pszPath = NULL, L_UINT32 nMode = DICOM_SECURE_NONE); ~CNetClient(); L_INT Connect (CString strServerTitle, CString strServerAddress, L_UINT nServerPort, CString strClientTitle, L_UINT nClientPort, LDicomAssociate *pAssociate); L_INT Accept (); L_VOID Close (); L_VOID StartProcess (L_INT nProcess); L_VOID StopProcess (); L_VOID InfoProcess (L_INT &nProcess, L_UINT16 &nStatus, L_UINT32 &nTime); HTREEITEM DisplayMessage (CString strText, L_INT nError, HTREEITEM hParent); L_VOID DisplayTree (CTreeCtrl *pDlg, LDicomDS *pDS, HTREEITEM hParentTree, pDICOMELEMENT pParentElement, L_UINT16 nFlags); L_VOID OnConnect (L_INT nError); L_VOID OnClose (L_INT nError, LDicomNet *pNet); L_VOID OnReceive (L_INT nError, L_UCHAR nType, L_CHAR *pBuffer, L_UINT32 nBytes); L_VOID OnSend (L_INT nError, L_UCHAR nType, L_UINT32 nBytes); L_VOID OnSecureLinkReady (L_UINT32 nError); 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); L_VOID OnReceivedISCLPacket (L_INT nError, L_CHAR *pBuffer, L_UINT32 nBytes); L_VOID OnReceiveAssociateRequest (LDicomAssociate *pPDU); L_VOID OnReceiveAssociateAccept (LDicomAssociate *pPDU); L_VOID OnReceiveAssociateReject (L_UCHAR nResult, L_UCHAR nSource, L_UCHAR nReason); L_VOID OnReceiveData (L_UCHAR nPresentationID, LDicomDS *pCS, LDicomDS *pDS); L_VOID OnReceiveReleaseRequest (); L_VOID OnReceiveReleaseResponse (); L_VOID OnReceiveAbort (L_UCHAR nSource, L_UCHAR nReason); 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 OnReceiveCStoreResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus); L_VOID OnReceiveCFindRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nPriority, LDicomDS *pDS); L_VOID OnReceiveCFindResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nStatus, LDicomDS *pDS); L_VOID OnReceiveCGetRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nPriority, LDicomDS *pDS); L_VOID OnReceiveCGetResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nStatus, L_UINT16 nRemaining, L_UINT16 nCompleted, L_UINT16 nFailed, L_UINT16 nWarning, LDicomDS *pDS); L_VOID OnReceiveCMoveRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nPriority, L_CHAR *pszMoveAE, LDicomDS *pDS); L_VOID OnReceiveCMoveResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nStatus, L_UINT16 nRemaining, L_UINT16 nCompleted, L_UINT16 nFailed, L_UINT16 nWarning, LDicomDS *pDS); L_VOID OnReceiveCCancelRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID); L_VOID OnReceiveCEchoRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass); L_VOID OnReceiveCEchoResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nStatus); L_VOID OnReceiveNReportRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nEvent, LDicomDS *pDS); L_VOID OnReceiveNReportResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus, L_UINT16 nEvent, LDicomDS *pDS); L_VOID OnReceiveNGetRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT32 *pnAttribute, L_UINT16 nCount); L_VOID OnReceiveNGetResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus, LDicomDS *pDS); L_VOID OnReceiveNSetRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, LDicomDS *pDS); L_VOID OnReceiveNSetResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus, LDicomDS *pDS); L_VOID OnReceiveNActionRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nAction, LDicomDS *pDS); L_VOID OnReceiveNActionResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus, L_UINT16 nAction, LDicomDS *pDS); L_VOID OnReceiveNCreateRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, LDicomDS *pDS); L_VOID OnReceiveNCreateResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus, LDicomDS *pDS); L_VOID OnReceiveNDeleteRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance); L_VOID OnReceiveNDeleteResponse (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus); L_VOID OnReceiveUnknown (L_UCHAR nPresentationID, LDicomDS *pCS, LDicomDS *pDS); L_INT OnPrivateKeyPassword (L_CHAR *pszPassword, L_INT nSize, L_INT uFlag); CString m_strRetrieveAEsMsg; private: LDicomAssociate *m_pAssociate; CNetServer *m_pServer; CString m_strAddress; L_INT m_nProcess; L_UINT16 m_nStatus; L_UINT32 m_nTime; L_VOID DisplayAssociate(LDicomAssociate *pPDU, HTREEITEM hItem); L_VOID DeleteEmpty(LDicomDS *pDS, pDICOMELEMENT pParent); L_BOOL IsSupported(L_CHAR* pszUID) const; HTREEITEM FindDirectoryRecord(HTREEITEM hItem, L_UINT32 uTag, const L_CHAR* pszIdentifier) const; L_VOID FillDirectoryRecord(LDicomDS& SrcDS, pDICOMELEMENT pDR) const; HTREEITEM InsertDirTreeDR(HTREEITEM hParentItem, pDICOMELEMENT pDR) const; L_VOID SetIconImage(pDICOMELEMENT pImageDR, LDicomDS& SrcDS) const; }; #endif // !defined(AFX_CLIENT_H__1FB59950_595A_11D3_A335_00105A07EA4A__INCLUDED_)