comparison OrthancServer/OrthancInitialization.h @ 806:557575fd93e9

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 07 May 2014 15:22:28 +0200
parents 3bd0589af992
children 566a2fb3c1fb
comparison
equal deleted inserted replaced
805:56a813a4714d 806:557575fd93e9
40 #include "DicomProtocol/RemoteModalityParameters.h" 40 #include "DicomProtocol/RemoteModalityParameters.h"
41 #include "ServerEnumerations.h" 41 #include "ServerEnumerations.h"
42 42
43 namespace Orthanc 43 namespace Orthanc
44 { 44 {
45 class OrthancPeerParameters
46 {
47 private:
48 std::string name_;
49 std::string url_;
50 std::string username_;
51 std::string password_;
52
53 public:
54 OrthancPeerParameters() : url_("http://localhost:8042/")
55 {
56 }
57
58 const std::string& GetName() const
59 {
60 return name_;
61 }
62
63 void SetName(const std::string& name)
64 {
65 name_ = name;
66 }
67
68 const std::string& GetUrl() const
69 {
70 return url_;
71 }
72
73 void SetUrl(const std::string& url)
74 {
75 url_ = url;
76 }
77
78 const std::string& GetUsername() const
79 {
80 return username_;
81 }
82
83 void SetUsername(const std::string& username)
84 {
85 username_ = username;
86 }
87
88 const std::string& GetPassword() const
89 {
90 return password_;
91 }
92
93 void SetPassword(const std::string& password)
94 {
95 password_ = password;
96 }
97 };
98
99
45 void OrthancInitialize(const char* configurationFile = NULL); 100 void OrthancInitialize(const char* configurationFile = NULL);
46 101
47 void OrthancFinalize(); 102 void OrthancFinalize();
48 103
49 std::string GetGlobalStringParameter(const std::string& parameter, 104 std::string GetGlobalStringParameter(const std::string& parameter,
53 int defaultValue); 108 int defaultValue);
54 109
55 bool GetGlobalBoolParameter(const std::string& parameter, 110 bool GetGlobalBoolParameter(const std::string& parameter,
56 bool defaultValue); 111 bool defaultValue);
57 112
58 void GetDicomModalityUsingSymbolicName(const std::string& name, 113 void GetDicomModalityUsingSymbolicName(RemoteModalityParameters& modality,
59 std::string& aet, 114 const std::string& name);
60 std::string& address,
61 int& port,
62 ModalityManufacturer& manufacturer);
63 115
64 bool LookupDicomModalityUsingAETitle(const std::string& aet, 116 bool LookupDicomModalityUsingAETitle(RemoteModalityParameters& modality,
65 std::string& symbolicName, 117 const std::string& aet);
66 std::string& address,
67 int& port,
68 ModalityManufacturer& manufacturer);
69 118
70 void GetOrthancPeer(const std::string& name, 119 void GetOrthancPeer(OrthancPeerParameters& peer,
71 std::string& url, 120 const std::string& name);
72 std::string& username,
73 std::string& password);
74 121
75 void GetListOfDicomModalities(std::set<std::string>& target); 122 void GetListOfDicomModalities(std::set<std::string>& target);
76 123
77 void GetListOfOrthancPeers(std::set<std::string>& target); 124 void GetListOfOrthancPeers(std::set<std::string>& target);
78 125