diff options
author | Ted Ross <tross@apache.org> | 2009-10-02 17:45:58 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-10-02 17:45:58 +0000 |
commit | 0f7c02dae11afed532bf60302cf2185f422fd23c (patch) | |
tree | 9b176b6ebbe29419aa4bfe5d24102d5091dc2a72 /qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp | |
parent | 4b60b602712e767a4438b2c6552cb50fa9aa97cb (diff) | |
download | qpid-python-0f7c02dae11afed532bf60302cf2185f422fd23c.tar.gz |
QMF Fixes:
- In ruby: waitForStable => wait_for_stable
- Setting an unknown attribute on connection settings now throws an exception
- Added connected? accessor to Connection
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@821109 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp')
-rw-r--r-- | qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp b/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp index 8c918eec20..2cd6af10f8 100644 --- a/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp +++ b/qpid/cpp/src/qmf/engine/ConnectionSettingsImpl.cpp @@ -56,7 +56,7 @@ ConnectionSettingsImpl::ConnectionSettingsImpl(const string& /*url*/) : // TODO: Parse the URL } -void ConnectionSettingsImpl::setAttr(const string& key, const Value& value) +bool ConnectionSettingsImpl::setAttr(const string& key, const Value& value) { if (key == attrProtocol) clientSettings.protocol = value.asString(); else if (key == attrHost) clientSettings.host = value.asString(); @@ -79,6 +79,9 @@ void ConnectionSettingsImpl::setAttr(const string& key, const Value& value) else if (key == attrRetryDelayMax) retryDelayMax = value.asUint(); else if (key == attrRetryDelayFactor) retryDelayFactor = value.asUint(); else if (key == attrSendUserId) sendUserId = value.asBool(); + else + return false; + return true; } Value ConnectionSettingsImpl::getAttr(const string& key) const @@ -257,7 +260,7 @@ ConnectionSettings::ConnectionSettings(const ConnectionSettings& from) { impl = ConnectionSettings::ConnectionSettings() { impl = new ConnectionSettingsImpl(); } ConnectionSettings::ConnectionSettings(const char* url) { impl = new ConnectionSettingsImpl(url); } ConnectionSettings::~ConnectionSettings() { delete impl; } -void ConnectionSettings::setAttr(const char* key, const Value& value) { impl->setAttr(key, value); } +bool ConnectionSettings::setAttr(const char* key, const Value& value) { return impl->setAttr(key, value); } Value ConnectionSettings::getAttr(const char* key) const { return impl->getAttr(key); } const char* ConnectionSettings::getAttrString() const { return impl->getAttrString().c_str(); } void ConnectionSettings::transportTcp(uint16_t port) { impl->transportTcp(port); } |