summaryrefslogtreecommitdiff
path: root/cpp/bindings/qmf2
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/bindings/qmf2')
-rw-r--r--cpp/bindings/qmf2/examples/cpp/Makefile.am5
-rw-r--r--cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp107
-rw-r--r--cpp/bindings/qmf2/python/Makefile.am4
-rw-r--r--cpp/bindings/qmf2/qmf2.i1
-rw-r--r--cpp/bindings/qmf2/ruby/Makefile.am4
5 files changed, 5 insertions, 116 deletions
diff --git a/cpp/bindings/qmf2/examples/cpp/Makefile.am b/cpp/bindings/qmf2/examples/cpp/Makefile.am
index 062fbd0a85..84207d43c4 100644
--- a/cpp/bindings/qmf2/examples/cpp/Makefile.am
+++ b/cpp/bindings/qmf2/examples/cpp/Makefile.am
@@ -21,7 +21,7 @@ INCLUDE = -I$(top_srcdir)/include
AM_CPPFLAGS = $(INCLUDE)
-noinst_PROGRAMS=agent event_driven_list_agents list_agents print_events
+noinst_PROGRAMS=agent list_agents print_events
agent_SOURCES=agent.cpp
agent_LDADD=$(top_builddir)/src/libqmf2.la
@@ -29,8 +29,5 @@ agent_LDADD=$(top_builddir)/src/libqmf2.la
list_agents_SOURCES=list_agents.cpp
list_agents_LDADD=$(top_builddir)/src/libqmf2.la
-event_driven_list_agents_SOURCES=event_driven_list_agents.cpp
-event_driven_list_agents_LDADD=$(top_builddir)/src/libqmf2.la
-
print_events_SOURCES=print_events.cpp
print_events_LDADD=$(top_builddir)/src/libqmf2.la
diff --git a/cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp b/cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp
deleted file mode 100644
index c288aa6bdd..0000000000
--- a/cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp
+++ /dev/null
@@ -1,107 +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 <sys/select.h>
-#include <time.h>
-
-#include <qpid/messaging/Connection.h>
-#include <qpid/messaging/Duration.h>
-#include <qmf/Agent.h>
-#include <qmf/ConsoleEvent.h>
-#include <qmf/ConsoleSession.h>
-#include <qpid/types/Variant.h>
-#include "qmf/posix/EventNotifier.h"
-
-#include <string>
-#include <iostream>
-
-using namespace std;
-using namespace qmf;
-using qpid::types::Variant;
-using qpid::messaging::Duration;
-
-int main(int argc, char** argv)
-{
- string url("localhost");
- string connectionOptions;
- string sessionOptions;
-
- if (argc > 1)
- url = argv[1];
- if (argc > 2)
- connectionOptions = argv[2];
- if (argc > 3)
- sessionOptions = argv[3];
-
- qpid::messaging::Connection connection(url, connectionOptions);
- connection.open();
-
- ConsoleSession session(connection, sessionOptions);
- session.open();
- session.setAgentFilter("");
-
- posix::EventNotifier notifier(session);
-
- int fd(notifier.getHandle());
- time_t lastUpdate;
- bool ftl = false;
-
- time(&lastUpdate);
-
- while (true) {
- fd_set rfds;
- struct timeval tv;
- int nfds, retval;
-
- FD_ZERO(&rfds);
- FD_SET(fd, &rfds);
- nfds = fd + 1;
- tv.tv_sec = 10;
- tv.tv_usec = 0;
-
- retval = select(nfds, &rfds, NULL, NULL, &tv);
-
- if (retval > 0 && FD_ISSET(fd, &rfds)) {
- ConsoleEvent event;
- while (session.nextEvent(event, Duration::IMMEDIATE)) {
- string eventType = "";
- switch(event.getType()) {
- case CONSOLE_AGENT_ADD: eventType = "Added"; break;
- case CONSOLE_AGENT_DEL: eventType = "Deleted"; break;
- case CONSOLE_AGENT_RESTART: eventType = "Restarted"; break;
- case CONSOLE_AGENT_SCHEMA_UPDATE: eventType = "Schema Updated"; break;
- case CONSOLE_AGENT_SCHEMA_RESPONSE: eventType = "Schema Response"; break;
- case CONSOLE_EVENT: eventType = "Event"; break;
- case CONSOLE_QUERY_RESPONSE: eventType = "Query Response"; break;
- case CONSOLE_METHOD_RESPONSE: eventType = "Method Response"; break;
- case CONSOLE_EXCEPTION: eventType = "Exception"; break;
- case CONSOLE_SUBSCRIBE_ADD: eventType = "Subscription Added"; break;
- case CONSOLE_SUBSCRIBE_UPDATE: eventType = "Subscription Updated"; break;
- case CONSOLE_SUBSCRIBE_DEL: eventType = "Subscription Deleted" ; break;
- case CONSOLE_THREAD_FAILED: eventType = "Thread Failure"; break;
- default: eventType = "[UNDEFINED]";
- }
- cout << "Agent " << eventType << ": " << event.getAgent().getName() << endl;
- }
- } else {
- cout << "No message received within waiting period." << endl;
- }
- }
-}
-
diff --git a/cpp/bindings/qmf2/python/Makefile.am b/cpp/bindings/qmf2/python/Makefile.am
index 3dc04e832f..7adc62eddb 100644
--- a/cpp/bindings/qmf2/python/Makefile.am
+++ b/cpp/bindings/qmf2/python/Makefile.am
@@ -30,12 +30,12 @@ BUILT_SOURCES = $(generated_file_list)
SWIG_FLAGS = -w362,401
$(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmf2.i $(srcdir)/../../swig_python_typemaps.i
- $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/python.i
+ swig -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/python.i
pylibdir = $(PYTHON_LIB)
lib_LTLIBRARIES = _cqmf2.la
-cqpiddir = $(pyexecdir)
+cqpiddir = $(pythondir)
cqpid_PYTHON = qmf2.py cqmf2.py
_cqmf2_la_LDFLAGS = -avoid-version -module -shared
diff --git a/cpp/bindings/qmf2/qmf2.i b/cpp/bindings/qmf2/qmf2.i
index 0f573fe3e6..a09a95168f 100644
--- a/cpp/bindings/qmf2/qmf2.i
+++ b/cpp/bindings/qmf2/qmf2.i
@@ -37,7 +37,6 @@
%}
-%include <qpid/ImportExport.h>
%include <qpid/messaging/ImportExport.h>
%include <qpid/messaging/Duration.h>
diff --git a/cpp/bindings/qmf2/ruby/Makefile.am b/cpp/bindings/qmf2/ruby/Makefile.am
index 97bbc6f385..ae840f87c6 100644
--- a/cpp/bindings/qmf2/ruby/Makefile.am
+++ b/cpp/bindings/qmf2/ruby/Makefile.am
@@ -34,9 +34,9 @@ rubylibarchdir = $(RUBY_LIB_ARCH)
rubylibarch_LTLIBRARIES = cqmf2.la
dist_rubylib_DATA = qmf2.rb
-cqmf2_la_LDFLAGS = -avoid-version -module -shared -shrext ".$(RUBY_DLEXT)"
+cqmf2_la_LDFLAGS = -avoid-version -module -shrext ".$(RUBY_DLEXT)"
cqmf2_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqmf2 $(top_builddir)/src/libqmf2.la
-cqmf2_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing
+cqmf2_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH)
nodist_cqmf2_la_SOURCES = cqmf2.cpp
CLEANFILES = cqmf2.cpp