comparison OrthancServer/DicomProtocol/ReusableDicomUserConnection.h @ 1427:d710ea64f0fd

Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 Jun 2015 12:42:54 +0200
parents 6e7e5ed91c2d
children c0bdc47165ef
comparison
equal deleted inserted replaced
1426:2cf9a12c995a 1427:d710ea64f0fd
47 DicomUserConnection* connection_; 47 DicomUserConnection* connection_;
48 bool continue_; 48 bool continue_;
49 boost::posix_time::time_duration timeBeforeClose_; 49 boost::posix_time::time_duration timeBeforeClose_;
50 boost::posix_time::ptime lastUse_; 50 boost::posix_time::ptime lastUse_;
51 boost::thread closeThread_; 51 boost::thread closeThread_;
52 std::string localAet_;
53 52
54 void Open(const std::string& remoteAet, 53 void Open(const std::string& localAet,
55 const std::string& address, 54 const RemoteModalityParameters& remote);
56 int port,
57 ModalityManufacturer manufacturer);
58 55
59 void Close(); 56 void Close();
60 57
61 static void CloseThread(ReusableDicomUserConnection* that); 58 static void CloseThread(ReusableDicomUserConnection* that);
62 59
71 private: 68 private:
72 DicomUserConnection* connection_; 69 DicomUserConnection* connection_;
73 70
74 public: 71 public:
75 Locker(ReusableDicomUserConnection& that, 72 Locker(ReusableDicomUserConnection& that,
73 const std::string& localAet,
76 const RemoteModalityParameters& remote); 74 const RemoteModalityParameters& remote);
77
78 Locker(ReusableDicomUserConnection& that,
79 const std::string& aet,
80 const std::string& address,
81 int port,
82 ModalityManufacturer manufacturer);
83 75
84 DicomUserConnection& GetConnection(); 76 DicomUserConnection& GetConnection();
85 }; 77 };
86 78
87 ReusableDicomUserConnection(); 79 ReusableDicomUserConnection();
88 80
89 virtual ~ReusableDicomUserConnection(); 81 virtual ~ReusableDicomUserConnection();
90 82
91 uint64_t GetMillisecondsBeforeClose() const
92 {
93 return static_cast<uint64_t>(timeBeforeClose_.total_milliseconds());
94 }
95
96 void SetMillisecondsBeforeClose(uint64_t ms); 83 void SetMillisecondsBeforeClose(uint64_t ms);
97
98 const std::string& GetLocalApplicationEntityTitle() const;
99
100 void SetLocalApplicationEntityTitle(const std::string& aet);
101 }; 84 };
102 } 85 }
103 86