summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-11-09 19:59:54 +0000
committerAlan Conway <aconway@apache.org>2007-11-09 19:59:54 +0000
commitb78af32f2bb9c725bacec590dbdeecaec9b2906c (patch)
treeb779b2ff59cc9a2e8362b4e34e0574f6828d9c75
parent23bc7f447a2b2551dc8ae20280ede45b524e06cd (diff)
downloadqpid-python-b78af32f2bb9c725bacec590dbdeecaec9b2906c.tar.gz
Package examples in rpm %doc directory.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@593638 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/examples/Makefile.am40
-rw-r--r--cpp/examples/create_queue.cpp82
-rw-r--r--cpp/examples/examples/Makefile6
-rw-r--r--cpp/examples/examples/direct/Makefile (renamed from cpp/examples/direct/Makefile)0
-rw-r--r--cpp/examples/examples/direct/direct_config_queues.cpp (renamed from cpp/examples/direct/direct_config_queues.cpp)0
-rw-r--r--cpp/examples/examples/direct/direct_persistent_config_queues.cpp (renamed from cpp/examples/direct/direct_persistent_config_queues.cpp)0
-rw-r--r--cpp/examples/examples/direct/direct_persistent_publisher.cpp (renamed from cpp/examples/direct/direct_persistent_publisher.cpp)0
-rw-r--r--cpp/examples/examples/direct/direct_publisher.cpp (renamed from cpp/examples/direct/direct_publisher.cpp)0
-rw-r--r--cpp/examples/examples/direct/listener.cpp (renamed from cpp/examples/direct/listener.cpp)0
-rw-r--r--cpp/examples/examples/fanout/Makefile (renamed from cpp/examples/fanout/Makefile)0
-rw-r--r--cpp/examples/examples/fanout/fanout_config_queues.cpp (renamed from cpp/examples/fanout/fanout_config_queues.cpp)0
-rw-r--r--cpp/examples/examples/fanout/fanout_consumer.cpp (renamed from cpp/examples/fanout/fanout_consumer.cpp)0
-rw-r--r--cpp/examples/examples/fanout/fanout_publisher.cpp (renamed from cpp/examples/fanout/fanout_publisher.cpp)0
-rw-r--r--cpp/examples/examples/fanout/listener.cpp (renamed from cpp/examples/fanout/listener.cpp)0
-rw-r--r--cpp/examples/examples/pub-sub/Makefile (renamed from cpp/examples/pub-sub/Makefile)0
-rw-r--r--cpp/examples/examples/pub-sub/topic_config_queues.cpp (renamed from cpp/examples/pub-sub/topic_config_queues.cpp)0
-rw-r--r--cpp/examples/examples/pub-sub/topic_listener.cpp (renamed from cpp/examples/pub-sub/topic_listener.cpp)0
-rw-r--r--cpp/examples/examples/pub-sub/topic_publisher.cpp (renamed from cpp/examples/pub-sub/topic_publisher.cpp)0
-rw-r--r--cpp/examples/examples/request-response/Makefile (renamed from cpp/examples/request-response/Makefile)0
-rw-r--r--cpp/examples/examples/request-response/client.cpp (renamed from cpp/examples/request-response/client.cpp)0
-rw-r--r--cpp/examples/examples/request-response/server.cpp (renamed from cpp/examples/request-response/server.cpp)0
-rw-r--r--cpp/qpidc.spec.in9
-rw-r--r--cpp/rpm/README.qpidd-devel10
-rw-r--r--cpp/src/Makefile.am1
24 files changed, 47 insertions, 101 deletions
diff --git a/cpp/examples/Makefile.am b/cpp/examples/Makefile.am
index 3836665c35..5915e0a282 100644
--- a/cpp/examples/Makefile.am
+++ b/cpp/examples/Makefile.am
@@ -1,18 +1,38 @@
-# Note: we don't use normal automake SUBDIRS because the example
-# makefiles are don't understand all automake targets.
-EXAMPLE_DIRS=direct fanout pub-sub request-response
-src=../$(top_srcdir)/src
-bld=../$(top_builddir)/src
+nobase_pkgdata_DATA= \
+ examples/Makefile \
+ examples/request-response/client.cpp \
+ examples/request-response/server.cpp \
+ examples/request-response/Makefile \
+ examples/fanout/Makefile \
+ examples/fanout/fanout_config_queues.cpp \
+ examples/fanout/listener.cpp \
+ examples/fanout/fanout_consumer.cpp \
+ examples/fanout/fanout_publisher.cpp \
+ examples/pub-sub/Makefile \
+ examples/pub-sub/topic_publisher.cpp \
+ examples/pub-sub/topic_config_queues.cpp \
+ examples/pub-sub/topic_listener.cpp \
+ examples/direct/Makefile \
+ examples/direct/direct_publisher.cpp \
+ examples/direct/direct_persistent_config_queues.cpp \
+ examples/direct/listener.cpp \
+ examples/direct/direct_config_queues.cpp \
+ examples/direct/direct_persistent_publisher.cpp
+
+EXTRA_DIST=$(nobase_pkgdata_DATA)
+
+# Note: we don't use normal automake SUBDIRS because the example
+# makefiles don't understand all the recursive automake targets.
+#
+src=../../$(top_srcdir)/src
+bld=../../$(top_builddir)/src
EXAMPLE_FLAGS=-I$(src) -I$(src)/gen -I$(bld)/gen -L$(bld)/.libs
all:
- for d in $(EXAMPLE_DIRS); do ( cd $$d; make CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" $@; ) ; done
+ cd examples; $(MAKE) CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" all
clean:
- for d in $(EXAMPLE_DIRS); do ( cd $$d; make $@; ) ; done
-
-dist-hook: clean
- cp --parents `find $(EXAMPLE_DIRS) -name Makefile -o -name '*.cpp'` $(distdir)
+ cd examples; $(MAKE) clean
diff --git a/cpp/examples/create_queue.cpp b/cpp/examples/create_queue.cpp
deleted file mode 100644
index ad9805187b..0000000000
--- a/cpp/examples/create_queue.cpp
+++ /dev/null
@@ -1,82 +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.
- *
- */
-
-/**
- * This file provides one half of a test and example of a pub-sub
- * style of interaction. See topic_listener.cpp for the other half, in
- * which the logic for subscribers is defined.
- *
- * This file contains the publisher logic. The publisher will send a
- * number of messages to the exchange with the appropriate routing key
- * for the logical 'topic'. Once it has done this it will then send a
- * request that each subscriber report back with the number of message
- * it has received and the time that elapsed between receiving the
- * first one and receiving the report request. Once the expected
- * number of reports are received, it sends out a request that each
- * subscriber shutdown.
- */
-
-#include "qpid/Exception.h"
-#include "qpid/client/Channel.h"
-#include "qpid/client/Connection.h"
-#include "qpid/client/Exchange.h"
-#include "qpid/client/MessageListener.h"
-#include "qpid/client/Queue.h"
-#include "qpid/sys/Monitor.h"
-#include <unistd.h>
-#include "qpid/sys/Time.h"
-#include <cstdlib>
-#include <iostream>
-
-using namespace qpid::client;
-using namespace qpid::sys;
-using std::string;
-
-
-int main() {
- Connection connection;
- Channel channel;
- Message msg;
- try {
- connection.open("127.0.0.1", 5672, "guest", "guest", "/test");
- connection.openChannel(channel);
-
-
- //--------- Main body of program --------------------------------------------
-
- Queue response("listener");
- channel.declareQueue(response);
- channel.bind(Exchange::STANDARD_TOPIC_EXCHANGE, response, "listener");
-
- channel.start();
-
- //-----------------------------------------------------------------------------
-
- channel.close();
- connection.close();
- return 0;
- } catch(const std::exception& error) {
- std::cout << error.what() << std::endl;
- }
- return 1;
-}
-
-
diff --git a/cpp/examples/examples/Makefile b/cpp/examples/examples/Makefile
new file mode 100644
index 0000000000..8591bd3361
--- /dev/null
+++ b/cpp/examples/examples/Makefile
@@ -0,0 +1,6 @@
+SUBDIRS=direct fanout pub-sub request-response
+all:
+ for d in $(SUBDIRS); do ( cd $$d; $(MAKE) $@; ) ; done
+clean:
+ for d in $(SUBDIRS); do ( cd $$d; $(MAKE) $@; ) ; done
+
diff --git a/cpp/examples/direct/Makefile b/cpp/examples/examples/direct/Makefile
index c94e900a75..c94e900a75 100644
--- a/cpp/examples/direct/Makefile
+++ b/cpp/examples/examples/direct/Makefile
diff --git a/cpp/examples/direct/direct_config_queues.cpp b/cpp/examples/examples/direct/direct_config_queues.cpp
index 3a52d4f62f..3a52d4f62f 100644
--- a/cpp/examples/direct/direct_config_queues.cpp
+++ b/cpp/examples/examples/direct/direct_config_queues.cpp
diff --git a/cpp/examples/direct/direct_persistent_config_queues.cpp b/cpp/examples/examples/direct/direct_persistent_config_queues.cpp
index afe076278b..afe076278b 100644
--- a/cpp/examples/direct/direct_persistent_config_queues.cpp
+++ b/cpp/examples/examples/direct/direct_persistent_config_queues.cpp
diff --git a/cpp/examples/direct/direct_persistent_publisher.cpp b/cpp/examples/examples/direct/direct_persistent_publisher.cpp
index 75637c7eb9..75637c7eb9 100644
--- a/cpp/examples/direct/direct_persistent_publisher.cpp
+++ b/cpp/examples/examples/direct/direct_persistent_publisher.cpp
diff --git a/cpp/examples/direct/direct_publisher.cpp b/cpp/examples/examples/direct/direct_publisher.cpp
index 5135f926c3..5135f926c3 100644
--- a/cpp/examples/direct/direct_publisher.cpp
+++ b/cpp/examples/examples/direct/direct_publisher.cpp
diff --git a/cpp/examples/direct/listener.cpp b/cpp/examples/examples/direct/listener.cpp
index 52840efa03..52840efa03 100644
--- a/cpp/examples/direct/listener.cpp
+++ b/cpp/examples/examples/direct/listener.cpp
diff --git a/cpp/examples/fanout/Makefile b/cpp/examples/examples/fanout/Makefile
index 719a7e7416..719a7e7416 100644
--- a/cpp/examples/fanout/Makefile
+++ b/cpp/examples/examples/fanout/Makefile
diff --git a/cpp/examples/fanout/fanout_config_queues.cpp b/cpp/examples/examples/fanout/fanout_config_queues.cpp
index b09b5191d1..b09b5191d1 100644
--- a/cpp/examples/fanout/fanout_config_queues.cpp
+++ b/cpp/examples/examples/fanout/fanout_config_queues.cpp
diff --git a/cpp/examples/fanout/fanout_consumer.cpp b/cpp/examples/examples/fanout/fanout_consumer.cpp
index 663c765159..663c765159 100644
--- a/cpp/examples/fanout/fanout_consumer.cpp
+++ b/cpp/examples/examples/fanout/fanout_consumer.cpp
diff --git a/cpp/examples/fanout/fanout_publisher.cpp b/cpp/examples/examples/fanout/fanout_publisher.cpp
index 976c53aae4..976c53aae4 100644
--- a/cpp/examples/fanout/fanout_publisher.cpp
+++ b/cpp/examples/examples/fanout/fanout_publisher.cpp
diff --git a/cpp/examples/fanout/listener.cpp b/cpp/examples/examples/fanout/listener.cpp
index 52840efa03..52840efa03 100644
--- a/cpp/examples/fanout/listener.cpp
+++ b/cpp/examples/examples/fanout/listener.cpp
diff --git a/cpp/examples/pub-sub/Makefile b/cpp/examples/examples/pub-sub/Makefile
index ea08031da5..ea08031da5 100644
--- a/cpp/examples/pub-sub/Makefile
+++ b/cpp/examples/examples/pub-sub/Makefile
diff --git a/cpp/examples/pub-sub/topic_config_queues.cpp b/cpp/examples/examples/pub-sub/topic_config_queues.cpp
index 8c05241f3c..8c05241f3c 100644
--- a/cpp/examples/pub-sub/topic_config_queues.cpp
+++ b/cpp/examples/examples/pub-sub/topic_config_queues.cpp
diff --git a/cpp/examples/pub-sub/topic_listener.cpp b/cpp/examples/examples/pub-sub/topic_listener.cpp
index 323c93dd0b..323c93dd0b 100644
--- a/cpp/examples/pub-sub/topic_listener.cpp
+++ b/cpp/examples/examples/pub-sub/topic_listener.cpp
diff --git a/cpp/examples/pub-sub/topic_publisher.cpp b/cpp/examples/examples/pub-sub/topic_publisher.cpp
index 52c2827e58..52c2827e58 100644
--- a/cpp/examples/pub-sub/topic_publisher.cpp
+++ b/cpp/examples/examples/pub-sub/topic_publisher.cpp
diff --git a/cpp/examples/request-response/Makefile b/cpp/examples/examples/request-response/Makefile
index 32612843eb..32612843eb 100644
--- a/cpp/examples/request-response/Makefile
+++ b/cpp/examples/examples/request-response/Makefile
diff --git a/cpp/examples/request-response/client.cpp b/cpp/examples/examples/request-response/client.cpp
index 59024a1cb6..59024a1cb6 100644
--- a/cpp/examples/request-response/client.cpp
+++ b/cpp/examples/examples/request-response/client.cpp
diff --git a/cpp/examples/request-response/server.cpp b/cpp/examples/examples/request-response/server.cpp
index 6c82090794..6c82090794 100644
--- a/cpp/examples/request-response/server.cpp
+++ b/cpp/examples/examples/request-response/server.cpp
diff --git a/cpp/qpidc.spec.in b/cpp/qpidc.spec.in
index 99e668200d..bb7a4b895a 100644
--- a/cpp/qpidc.spec.in
+++ b/cpp/qpidc.spec.in
@@ -5,7 +5,7 @@
Name: @PACKAGE@
Version: @VERSION@
-Release: 8%{?dist}
+Release: 10%{?dist}
Summary: Libraries for Qpid C++ client applications
Group: System Environment/Libraries
License: Apache Software License
@@ -106,6 +106,7 @@ make check
%_includedir/qpid/log
%_libdir/libqpidcommon.so
%_libdir/libqpidclient.so
+%doc %_datadir/%{name}/examples
%doc docs/api/html
%files -n %{qpidd}
@@ -149,8 +150,12 @@ fi
/sbin/ldconfig
%changelog
+
+* Thu Nov 8 2007 Alan Conway <aconway@redhat.com> - 0.2-10
+- added examples to RPM package.
+
* Thu Oct 9 2007 Alan Conway <aconway@redhat.com> - 0.2-9
-- added %config(noreplace) for qpidd.conf
+- added config(noreplace) for qpidd.conf
* Thu Oct 4 2007 Alan Conway <aconway@redhat.com> - 0.2-8
- Added qpidd.conf configuration file.
diff --git a/cpp/rpm/README.qpidd-devel b/cpp/rpm/README.qpidd-devel
index fd13120f66..f64a9de3b3 100644
--- a/cpp/rpm/README.qpidd-devel
+++ b/cpp/rpm/README.qpidd-devel
@@ -1,11 +1,7 @@
This package provides header files needed to implement extensions to
-the Qpid broker daemon. It is not require for normal use of Qpid.
+the Qpid broker daemon. This feature is experimental and undocumented,
+it is not require for normal use of qpid.
-Support for broker extensions is still a work-in-progress. We will be
-providing API documentation soon, in the meantime go to:
-
- http://cwiki.apache.org/qpid/
-
-for more information.
+See http://cwiki.apache.org/qpid/ for more information about the qpid project.
diff --git a/cpp/src/Makefile.am b/cpp/src/Makefile.am
index 120c589d19..96f338e684 100644
--- a/cpp/src/Makefile.am
+++ b/cpp/src/Makefile.am
@@ -199,6 +199,7 @@ libqpidbroker_la_SOURCES = \
libqpidclient_la_LIBADD = libqpidcommon.la
libqpidclient_la_SOURCES = \
$(rgen_client_cpp) \
+ qpid/client/Session.h \
qpid/client/Connection.cpp \
qpid/client/Channel.cpp \
qpid/client/Exchange.cpp \