GDCM  2.2.0
gdcmServiceClassUser.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004 
00005   Copyright (c) 2006-2011 Mathieu Malaterre
00006   All rights reserved.
00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 #ifndef GDCMSERVICECLASSUSER_H
00015 #define GDCMSERVICECLASSUSER_H
00016 
00017 #include "gdcmSubject.h"
00018 
00019 #include "gdcmPresentationContext.h"
00020 #include "gdcmFile.h"
00021 
00022 #include "gdcmNetworkStateID.h" // EStateID
00023 
00024 namespace gdcm
00025 {
00026 class ServiceClassUserInternals;
00027 class BaseRootQuery;
00028 namespace network{
00029 class ULEvent;
00030 class ULConnection;
00031 class ULConnectionCallback;
00032 }
00036 class GDCM_EXPORT ServiceClassUser : public Subject
00037 {
00038 public:
00042   ServiceClassUser();
00043   ~ServiceClassUser();
00044 
00046   void SetHostname( const char *hostname );
00047 
00049   void SetPort( uint16_t port );
00050 
00052   void SetPortSCP( uint16_t portscp );
00053 
00055   void SetAETitle(const char *aetitle);
00056   const char *GetAETitle() const;
00057 
00059   void SetCalledAETitle(const char *aetitle);
00060   const char *GetCalledAETitle() const;
00061 
00063   void SetTimeout(time_t t);
00064   time_t GetTimeout() const;
00065 
00069   bool InitializeConnection();
00070 
00072   void SetPresentationContexts(std::vector<PresentationContext> const & pcs);
00073 
00075   bool StartAssociation();
00076 
00078   bool StopAssociation();
00079 
00081   bool SendEcho();
00082 
00084   bool SendStore(const char *filename);
00087   bool SendStore(File const &file);
00089   bool SendStore(DataSet const &ds);
00090 
00092   bool SendFind(const BaseRootQuery* query, std::vector<DataSet> &retDatasets);
00093 
00095   bool SendMove(const BaseRootQuery* query, const char *outputdir);
00097   bool SendMove(const BaseRootQuery* query, std::vector<DataSet> &retDatasets);
00099   bool SendMove(const BaseRootQuery* query, std::vector<File> &retFile);
00100 
00101 private:
00102   network::EStateID RunEventLoop(network::ULEvent& inEvent,
00103     network::ULConnection* inWhichConnection,
00104     network::ULConnectionCallback* inCallback, const bool& startWaiting);
00105   network::EStateID RunMoveEventLoop(network::ULEvent& inEvent,
00106     network::ULConnectionCallback* inCallback);
00107 
00108 private:
00109   ServiceClassUser(const ServiceClassUser&);
00110   void operator=(const ServiceClassUser &);
00111 
00112 private:
00113   ServiceClassUserInternals *Internals;
00114 };
00115 
00116 } // end namespace gdcm
00117 
00118 #endif // GDCMSERVICECLASSUSER_H

Generated on Tue Mar 27 2012 18:19:33 for GDCM by doxygen 1.8.0
SourceForge.net Logo