// LMyDicomNet.h: interface for the LMyDicomNet class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_LMYDICOMNET_H__9D2D4313_7FBD_11D6_8274_00105A07EA1C__INCLUDED_) #define AFX_LMYDICOMNET_H__9D2D4313_7FBD_11D6_8274_00105A07EA1C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class LMyDicomNet : public LDicomNet { public: //LDicomAssociate *m_pAssociate; CMyEdit *m_pLog; //CPropertySheet *m_pSheet; L_UINT16 m_nUniqueID; int m_nCommandType; CString m_strClientAE; CString m_strServerAE; CMyTreeCtrl *m_pTreeResult; int m_nCountDS; LDicomDS *m_pStoreDS; CString m_strStorageClass; CString m_strStorageInstance; static CWnd *m_pWnd; LMyDicomNet(L_CHAR *pszPath, L_INT32 nMode); virtual ~LMyDicomNet(); enum { NONE, CECHO, MODALITY_WORKLIST_FIND, CSTORE, }; enum { DICOM_MSG_SUCCESS, DICOM_MSG_CONNECT_FAILED, DICOM_MSG_ASSOCIATE_REJECT, DICOM_MSG_CSTORE_RESULT, DICOM_MSG_TIMEOUT, }; static L_VOID SendResult(int nResult, int nReason); L_UCHAR VerifyClass(L_CHAR *pszID, LDicomAssociate *pPDU); static CString GetStatusString(L_UINT16 nStatus); L_VOID DeleteOptionalModules(LDicomDS *pDS); L_VOID CreateAndSetElement(LDicomDS *pDS, L_UINT32 uTag, L_UINT16 nVR, CString &strValue); L_VOID BuildCStoreAssociate(LDicomAssociate &Associate, L_UCHAR uID); // Timer static VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime); static L_UINT m_uTimerID; static int m_nTimerCount; static LMyDicomNet* m_pThis; //Send L_INT Connect (L_CHAR *pszHostAddress, L_UINT nHostPort, L_CHAR *pszPeerAddress, L_UINT nPeerPort); L_INT Accept (LDicomNet *pNet); L_VOID Close (); L_INT SendAssociateRequest(LDicomAssociate *pPDU); L_INT SendReleaseRequest (); L_INT SendReleaseResponse (); L_INT SendAbort (L_UCHAR nSource, L_UCHAR nReason); L_INT SendCEchoRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass); L_INT SendCFindRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nPriority, LDicomDS *pDS); L_INT SendCStoreRequest (L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nPriority, L_CHAR *pszMoveAE, L_UINT16 nMoveMessageID, LDicomDS *pDS); // Receive Events L_VOID OnConnect(L_INT nError); L_VOID OnAccept(L_INT nError); L_VOID OnClose(L_INT nError, LDicomNet *pNet); L_VOID OnReceiveCEchoResponse(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nStatus); L_VOID OnReceiveAssociateAccept(LDicomAssociate *pPDU); L_VOID OnReceiveAssociateReject(L_UCHAR nResult, L_UCHAR nSource, L_UCHAR nReason); L_VOID OnReceiveReleaseResponse(); L_VOID OnReceiveCFindResponse(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_UINT16 nStatus, LDicomDS *pDS); L_VOID OnReceiveCStoreResponse(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_CHAR *pszClass, L_CHAR *pszInstance, L_UINT16 nStatus); L_VOID OnSend(L_INT nError, L_UCHAR nType, L_UINT32 nBytes); }; #endif // !defined(AFX_LMYDICOMNET_H__9D2D4313_7FBD_11D6_8274_00105A07EA1C__INCLUDED_)