diff options
author | Andrew Stitcher <astitcher@apache.org> | 2012-03-20 17:27:09 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2012-03-20 17:27:09 +0000 |
commit | 45e42c276cf9ea932a72a778219c063e477c7da6 (patch) | |
tree | 393dea973690afade34749177ef1466ef64e616d | |
parent | 8485408d31a8a1a52c79ad46bcef5f6b74d6478a (diff) | |
download | qpid-python-45e42c276cf9ea932a72a778219c063e477c7da6.tar.gz |
QPID-2082: Put all of the C++ code in the source tree into a namespace
- Final file that slipped through
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1303024 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/tests/qpid-ping.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/qpid-ping.cpp b/qpid/cpp/src/tests/qpid-ping.cpp index 0cb4afa0ee..52331499e7 100644 --- a/qpid/cpp/src/tests/qpid-ping.cpp +++ b/qpid/cpp/src/tests/qpid-ping.cpp @@ -32,11 +32,20 @@ #include <string> #include <iostream> -using namespace std; -using namespace qpid::sys; -using namespace qpid::framing; -using namespace qpid::client; -using namespace qpid; +using std::cerr; +using std::cout; +using std::endl; +using std::exception; +using std::string; +using namespace qpid::client::arg; // For keyword args +using qpid::client::AsyncSession; +using qpid::client::Connection; +using qpid::client::Message; +using qpid::client::SubscriptionManager; +using qpid::framing::Uuid; + +namespace qpid { +namespace tests { struct PingOptions : public qpid::TestOptions { int timeout; // Timeout in seconds. @@ -48,9 +57,11 @@ struct PingOptions : public qpid::TestOptions { } }; +}} // namespace qpid::tests + int main(int argc, char** argv) { try { - PingOptions opts; + qpid::tests::PingOptions opts; opts.parse(argc, argv); opts.con.heartbeat = (opts.timeout+1)/2; Connection connection; @@ -58,8 +69,8 @@ int main(int argc, char** argv) { if (!opts.quiet) cout << "Opened connection." << endl; AsyncSession s = connection.newSession(); string qname(Uuid(true).str()); - s.queueDeclare(arg::queue=qname,arg::autoDelete=true,arg::exclusive=true); - s.messageTransfer(arg::content=Message("hello", qname)); + s.queueDeclare(queue=qname, autoDelete=true, exclusive=true); + s.messageTransfer(content=Message("hello", qname)); if (!opts.quiet) cout << "Sent message." << endl; SubscriptionManager subs(s); subs.get(qname); |