summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-08-14 14:04:26 +0000
committerGordon Sim <gsim@apache.org>2007-08-14 14:04:26 +0000
commit0f0e942cab53ac81c5adf6fbd5b7cc3a403161e8 (patch)
treeb35d956a563f70ca18b315dcc5b28449c8fc7701 /cpp/src
parent0cbe1f44ce9cb36acdd739fbf51c237d87317a35 (diff)
downloadqpid-python-0f0e942cab53ac81c5adf6fbd5b7cc3a403161e8.tar.gz
Removed some unused files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@565764 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Makefile.am6
-rw-r--r--cpp/src/qpid/client/ClientConnection.cpp1
-rw-r--r--cpp/src/qpid/client/MessageChannel.h97
-rw-r--r--cpp/src/qpid/client/MethodBodyInstances.h100
-rw-r--r--cpp/src/qpid/client/ResponseHandler.cpp79
-rw-r--r--cpp/src/qpid/client/ResponseHandler.h75
-rw-r--r--cpp/src/qpid/client/ReturnedMessageHandler.cpp24
-rw-r--r--cpp/src/qpid/client/ReturnedMessageHandler.h49
8 files changed, 0 insertions, 431 deletions
diff --git a/cpp/src/Makefile.am b/cpp/src/Makefile.am
index a47f5dfcbb..118a60ec70 100644
--- a/cpp/src/Makefile.am
+++ b/cpp/src/Makefile.am
@@ -251,8 +251,6 @@ libqpidclient_la_SOURCES = \
qpid/client/ConnectionImpl.cpp \
qpid/client/Connector.cpp \
qpid/client/MessageListener.cpp \
- qpid/client/ResponseHandler.cpp \
- qpid/client/ReturnedMessageHandler.cpp \
qpid/client/Correlator.cpp \
qpid/client/CompletionTracker.cpp \
qpid/client/ChannelHandler.cpp \
@@ -345,11 +343,7 @@ nobase_include_HEADERS = \
qpid/client/Connection.h \
qpid/client/ConnectionImpl.h \
qpid/client/Connector.h \
- qpid/client/MessageChannel.h \
qpid/client/MessageListener.h \
- qpid/client/MethodBodyInstances.h \
- qpid/client/ResponseHandler.h \
- qpid/client/ReturnedMessageHandler.h \
qpid/client/BlockingQueue.h \
qpid/client/Correlator.h \
qpid/client/CompletionTracker.h \
diff --git a/cpp/src/qpid/client/ClientConnection.cpp b/cpp/src/qpid/client/ClientConnection.cpp
index 3ae1478152..e1581503f9 100644
--- a/cpp/src/qpid/client/ClientConnection.cpp
+++ b/cpp/src/qpid/client/ClientConnection.cpp
@@ -31,7 +31,6 @@
#include "qpid/QpidError.h"
#include <iostream>
#include <sstream>
-#include "MethodBodyInstances.h"
#include <functional>
using namespace qpid::framing;
diff --git a/cpp/src/qpid/client/MessageChannel.h b/cpp/src/qpid/client/MessageChannel.h
deleted file mode 100644
index abf0f8270a..0000000000
--- a/cpp/src/qpid/client/MessageChannel.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#ifndef _client_MessageChannel_h
-#define _client_MessageChannel_h
-
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "qpid/shared_ptr.h"
-#include "qpid/sys/Runnable.h"
-#include "AckMode.h"
-
-namespace qpid {
-
-namespace framing {
-class AMQMethodBody;
-class AMQHeaderBody;
-class AMQContentBody;
-class FieldTable;
-}
-
-namespace client {
-
-class Channel;
-class Message;
-class Queue;
-class Exchange;
-class MessageListener;
-class ReturnedMessageHandler;
-
-/**
- * Abstract interface for messaging implementation for a channel.
- *
- *@see Channel for documentation.
- */
-class MessageChannel : public sys::Runnable
-{
- public:
- /**@see Channel::consume */
- virtual void consume(
- Queue& queue, std::string& tag, MessageListener* listener,
- AckMode ackMode = NO_ACK, bool noLocal = false, bool synch = true,
- const framing::FieldTable* fields = 0) = 0;
-
- /**@see Channel::cancel */
- virtual void cancel(const std::string& tag, bool synch = true) = 0;
-
- /**@see Channel::get */
- virtual bool get(
- Message& msg, const Queue& queue, AckMode ackMode = NO_ACK) = 0;
-
- /**@see Channel::get */
- virtual void publish(const Message& msg, const Exchange& exchange,
- const std::string& routingKey,
- bool mandatory = false, bool immediate = false) = 0;
-
- /**@see Channel::setReturnedMessageHandler */
- virtual void setReturnedMessageHandler(
- ReturnedMessageHandler* handler) = 0;
-
- /** Handle an incoming method. */
- virtual void handle(shared_ptr<framing::AMQMethodBody>) = 0;
-
- /** Handle an incoming header */
- virtual void handle(shared_ptr<framing::AMQHeaderBody>) = 0;
-
- /** Handle an incoming content */
- virtual void handle(shared_ptr<framing::AMQContentBody>) = 0;
-
- /** Send channel's QOS settings */
- virtual void setQos() = 0;
-
- /** Channel has closed */
- virtual void close() = 0;
-
- /** Cancel all consumers */
- virtual void cancelAll() = 0;
-};
-
-}} // namespace qpid::client
-
-
-
-#endif /*!_client_MessageChannel_h*/
diff --git a/cpp/src/qpid/client/MethodBodyInstances.h b/cpp/src/qpid/client/MethodBodyInstances.h
deleted file mode 100644
index eb4188663d..0000000000
--- a/cpp/src/qpid/client/MethodBodyInstances.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-#include "qpid/framing/amqp_framing.h"
-
-#ifndef _MethodBodyInstances_h_
-#define _MethodBodyInstances_h_
-
-namespace qpid {
-namespace client {
-
-/**
- * A list of method body instances that can be used to compare against
- * incoming bodies.
- */
-class MethodBodyInstances
-{
-private:
- qpid::framing::ProtocolVersion version;
-public:
- const qpid::framing::BasicCancelOkBody basic_cancel_ok;
- const qpid::framing::BasicConsumeOkBody basic_consume_ok;
- const qpid::framing::BasicDeliverBody basic_deliver;
- const qpid::framing::BasicGetEmptyBody basic_get_empty;
- const qpid::framing::BasicGetOkBody basic_get_ok;
- //const qpid::framing::BasicQosOkBody basic_qos_ok;
- //const qpid::framing::BasicReturnBody basic_return;
- const qpid::framing::ChannelCloseBody channel_close;
- const qpid::framing::ChannelCloseOkBody channel_close_ok;
- const qpid::framing::ChannelFlowBody channel_flow;
- const qpid::framing::ChannelOpenOkBody channel_open_ok;
- const qpid::framing::ConnectionCloseBody connection_close;
- const qpid::framing::ConnectionCloseOkBody connection_close_ok;
- const qpid::framing::ConnectionOpenOkBody connection_open_ok;
- const qpid::framing::ConnectionRedirectBody connection_redirect;
- const qpid::framing::ConnectionStartBody connection_start;
- const qpid::framing::ConnectionTuneBody connection_tune;
- //const qpid::framing::ExchangeDeclareOkBody exchange_declare_ok;
- //const qpid::framing::ExchangeDeleteOkBody exchange_delete_ok;
- const qpid::framing::QueueDeclareOkBody queue_declare_ok;
- const qpid::framing::QueueDeleteOkBody queue_delete_ok;
- //const qpid::framing::QueueBindOkBody queue_bind_ok;
- //const qpid::framing::TxCommitOkBody tx_commit_ok;
- //const qpid::framing::TxRollbackOkBody tx_rollback_ok;
- //const qpid::framing::TxSelectOkBody tx_select_ok;
-
- MethodBodyInstances(uint8_t major, uint8_t minor) :
- version(major, minor),
- basic_cancel_ok(version),
- basic_consume_ok(version),
- basic_deliver(version),
- basic_get_empty(version),
- basic_get_ok(version),
- //basic_qos_ok(version),
- //basic_return(version),
- channel_close(version),
- channel_close_ok(version),
- channel_flow(version),
- channel_open_ok(version),
- connection_close(version),
- connection_close_ok(version),
- connection_open_ok(version),
- connection_redirect(version),
- connection_start(version),
- connection_tune(version),
- //exchange_declare_ok(version),
- //exchange_delete_ok(version),
- queue_declare_ok(version),
- queue_delete_ok(version)//,
- //queue_bind_ok(version),
- //tx_commit_ok(version),
- //tx_rollback_ok(version),
- //tx_select_ok(version)
- {}
-
-};
-
-static MethodBodyInstances method_bodies(8, 0);
-
-} // namespace client
-} // namespace qpid
-
-#endif
diff --git a/cpp/src/qpid/client/ResponseHandler.cpp b/cpp/src/qpid/client/ResponseHandler.cpp
deleted file mode 100644
index 10ad5c6fa2..0000000000
--- a/cpp/src/qpid/client/ResponseHandler.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-#include "qpid/QpidError.h"
-#include <boost/format.hpp>
-#include "ResponseHandler.h"
-#include "qpid/framing/AMQMethodBody.h"
-
-using namespace qpid::sys;
-using namespace qpid::framing;
-
-namespace qpid {
-namespace client {
-
-ResponseHandler::ResponseHandler() : waiting(false), shutdownFlag(false) {}
-
-ResponseHandler::~ResponseHandler(){}
-
-bool ResponseHandler::isWaiting() {
- Monitor::ScopedLock l(monitor);
- return waiting;
-}
-
-void ResponseHandler::expect(){
- Monitor::ScopedLock l(monitor);
- waiting = true;
-}
-
-void ResponseHandler::signalResponse(MethodPtr _response)
-{
- Monitor::ScopedLock l(monitor);
- response = _response;
- if (!response)
- shutdownFlag=true;
- waiting = false;
- monitor.notify();
-}
-
-ResponseHandler::MethodPtr ResponseHandler::receive() {
- Monitor::ScopedLock l(monitor);
- while (!response && !shutdownFlag)
- monitor.wait();
- if (shutdownFlag)
- THROW_QPID_ERROR(
- PROTOCOL_ERROR, "Channel closed unexpectedly.");
- MethodPtr result = response;
- response.reset();
- return result;
-}
-
-ResponseHandler::MethodPtr ResponseHandler::receive(ClassId c, MethodId m) {
- MethodPtr response = receive();
- if(c != response->amqpClassId() || m != response->amqpMethodId()) {
- THROW_QPID_ERROR(
- PROTOCOL_ERROR,
- boost::format("Expected class:method %d:%d, got %d:%d")
- % c % m % response->amqpClassId() % response->amqpMethodId());
- }
- return response;
-}
-
-}} // namespace qpid::client
diff --git a/cpp/src/qpid/client/ResponseHandler.h b/cpp/src/qpid/client/ResponseHandler.h
deleted file mode 100644
index e599e4c8d1..0000000000
--- a/cpp/src/qpid/client/ResponseHandler.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-#include "qpid/shared_ptr.h"
-#include "qpid/sys/Monitor.h"
-
-#ifndef _ResponseHandler_
-#define _ResponseHandler_
-
-namespace qpid {
-
-namespace framing {
-class AMQMethodBody;
-}
-
-namespace client {
-
-/**
- * Holds a response from the broker peer for the client.
- */
-class ResponseHandler{
- typedef shared_ptr<framing::AMQMethodBody> MethodPtr;
- bool waiting;
- bool shutdownFlag;
- MethodPtr response;
- sys::Monitor monitor;
-
- public:
- ResponseHandler();
- ~ResponseHandler();
-
- /** Is a response expected? */
- bool isWaiting();
-
- /** Provide a response to the waiting thread */
- void signalResponse(MethodPtr response);
-
- /** Indicate a message is expected. */
- void expect();
-
- /** Wait for a response. */
- MethodPtr receive();
-
- /** Wait for a specific response. */
- MethodPtr receive(framing::ClassId, framing::MethodId);
-
- /** Template version of receive returns typed pointer. */
- template <class BodyType>
- shared_ptr<BodyType> receive() {
- return shared_polymorphic_downcast<BodyType>(
- receive(BodyType::CLASS_ID, BodyType::METHOD_ID));
- }
-};
-
-}}
-
-
-#endif
diff --git a/cpp/src/qpid/client/ReturnedMessageHandler.cpp b/cpp/src/qpid/client/ReturnedMessageHandler.cpp
deleted file mode 100644
index 35d0b5c0a8..0000000000
--- a/cpp/src/qpid/client/ReturnedMessageHandler.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-#include "ReturnedMessageHandler.h"
-
-qpid::client::ReturnedMessageHandler::~ReturnedMessageHandler() {}
diff --git a/cpp/src/qpid/client/ReturnedMessageHandler.h b/cpp/src/qpid/client/ReturnedMessageHandler.h
deleted file mode 100644
index 8b42fc0764..0000000000
--- a/cpp/src/qpid/client/ReturnedMessageHandler.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-#include <string>
-
-#ifndef _ReturnedMessageHandler_
-#define _ReturnedMessageHandler_
-
-#include "ClientMessage.h"
-
-namespace qpid {
-namespace client {
-
- /**
- * An interface through which returned messages can be received by
- * an application.
- *
- * @see Channel::setReturnedMessageHandler()
- *
- * \ingroup clientapi
- */
- class ReturnedMessageHandler{
- public:
- virtual ~ReturnedMessageHandler();
- virtual void returned(Message& msg) = 0;
- };
-
-}
-}
-
-
-#endif