You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jr...@apache.org on 2018/05/07 14:21:31 UTC

qpid-cpp git commit: QPID-8183: Remove examples for the deprecated QMF API

Repository: qpid-cpp
Updated Branches:
  refs/heads/master 4a5d8aeab -> dfb1f4306


QPID-8183: Remove examples for the deprecated QMF API


Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/dfb1f430
Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/dfb1f430
Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/dfb1f430

Branch: refs/heads/master
Commit: dfb1f43067d111e97f3ab0c09f87065c6e959c77
Parents: 4a5d8ae
Author: Justin Ross <jr...@apache.org>
Authored: Mon May 7 06:54:18 2018 -0700
Committer: Justin Ross <jr...@apache.org>
Committed: Mon May 7 07:12:02 2018 -0700

----------------------------------------------------------------------
 bindings/CMakeLists.txt                         |   2 -
 bindings/qmf2/examples/cpp/CMakeLists.txt       |  81 ------
 bindings/qmf2/examples/cpp/README.txt           |  41 ---
 bindings/qmf2/examples/cpp/agent.cpp            | 254 -------------------
 .../examples/cpp/event_driven_list_agents.cpp   | 109 --------
 bindings/qmf2/examples/cpp/list_agents.cpp      |  75 ------
 bindings/qmf2/examples/cpp/print_events.cpp     |  66 -----
 7 files changed, 628 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/dfb1f430/bindings/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt
index 2152d1d..28e836a 100644
--- a/bindings/CMakeLists.txt
+++ b/bindings/CMakeLists.txt
@@ -159,5 +159,3 @@ if (BUILD_BINDING_DOTNET)
     message(STATUS "Building Dotnet bindings")
     add_subdirectory(qpid/dotnet)
 endif (BUILD_BINDING_DOTNET)
-
-add_subdirectory(qmf2/examples/cpp)

http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/dfb1f430/bindings/qmf2/examples/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/bindings/qmf2/examples/cpp/CMakeLists.txt b/bindings/qmf2/examples/cpp/CMakeLists.txt
deleted file mode 100644
index 2a01f33..0000000
--- a/bindings/qmf2/examples/cpp/CMakeLists.txt
+++ /dev/null
@@ -1,81 +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.
-#
-project(qmf2_examples)
-cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
-
-include_directories(${CMAKE_BINARY_DIR}/include)
-include_directories(${CMAKE_SOURCE_DIR}/include)
-
-# Shouldn't need this... but there are still client header inclusions
-# of Boost. When building examples at an install site, the Boost files
-# should be locatable aside from these settings.
-# So set up to find the headers, find the libs at link time, but dynamically
-# link them all and clear the CMake Boost library names to avoid adding them to
-# the project files.
-include_directories( ${Boost_INCLUDE_DIR} )
-link_directories( ${Boost_LIBRARY_DIRS} )
-
-# Visual Studio needs some Windows-specific simplifications.
-if (MSVC)
-  add_definitions( /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "BOOST_ALL_DYN_LINK" )
-  # On Windows, prevent the accidental inclusion of Boost headers from
-  # autolinking in the Boost libs. There should be no direct references to
-  # Boost in the examples, and references via qpidclient/qpidcommon are
-  # resolved in the Qpid libs.
-  add_definitions( /D "BOOST_ALL_NO_LIB" )
-endif (MSVC)
-
-# There are numerous duplicate names within the examples. Since all target
-# names must be unique, define a macro to prepend a prefix and manage the
-# actual names.
-# There can be an optional arguments at the end: libs to include
-macro(add_example subdir example)
-  add_executable(${subdir}_${example} ${example}.cpp)
-  set_target_properties(${subdir}_${example} PROPERTIES OUTPUT_NAME ${example})
-  if (${ARGC} GREATER 2)
-    target_link_libraries(${subdir}_${example} ${ARGN} qpidmessaging qpidtypes
-                          ${_boost_libs_needed})
-  else (${ARGC} GREATER 2)
-    target_link_libraries(${subdir}_${example} qpidmessaging qpidtypes
-                          ${_boost_libs_needed})
-  endif (${ARGC} GREATER 2)
-endmacro(add_example)
-
-macro(add_installed_example subdir example)
-  add_example(${subdir} ${example} ${ARGN})
-
-  # For installs, don't install the built example; that would be pointless.
-  # Install the things a user needs to build the example on-site.
-  install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp
-           DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/${subdir}
-           COMPONENT ${QPID_COMPONENT_EXAMPLES})
-endmacro(add_installed_example)
-
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.txt
-         DESTINATION ${QPID_INSTALL_EXAMPLESDIR}
-         COMPONENT ${QPID_COMPONENT_EXAMPLES})
-
-add_installed_example(qmf2 agent qmf2)
-if (NOT WIN32)
-  # uses posix select()
-  add_installed_example(qmf2 event_driven_list_agents qmf2)
-endif (NOT WIN32)
-add_installed_example(qmf2 list_agents qmf2)
-add_installed_example(qmf2 print_events qmf2)
-

http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/dfb1f430/bindings/qmf2/examples/cpp/README.txt
----------------------------------------------------------------------
diff --git a/bindings/qmf2/examples/cpp/README.txt b/bindings/qmf2/examples/cpp/README.txt
deleted file mode 100644
index 8ab3d17..0000000
--- a/bindings/qmf2/examples/cpp/README.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-This directory contains C++ example management tools and an example
-managed application based on the QPID Management Framework (QMF)
-Library.
-
-agent.cpp
----------
-
-This is an example of a managed application.  Applications that can be
-managed by QMF are called "agents".  This example shows how an agent
-can create managed objects and service method calls.  When run, this
-agent will attempt to connect to a broker at address "localhost:5672".
-
-list_agents.cpp
----------------
-
-This is an example of a management tool.  QMF management tools are
-called "consoles". This console monitors the broker for agent
-additions and removals.  When run, it will attempt to connect to a
-broker at address "localhost:5672".
-
-event_driven_list_agents.cpp
-----------------------------
-
-This console is similar to the list_agents.cpp example, except it uses
-an EventNotifier to wake up when new events arrive.  An EventNotifier
-may be used in a POSIX select/poll loop.
-
-print_events.cpp
-----------------
-
-A very basic console that monitors for all events published by agents.
-
-
-Running the examples
---------------------
-
-In order to run any of the examples, you'll first need to run a broker
-daemon on your local machine (qpidd).  Once the broker is up and
-running, start any of the example consoles.  While the consoles are
-running, run the example agent.  The consoles will print out event
-information that is published by the example agent.

http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/dfb1f430/bindings/qmf2/examples/cpp/agent.cpp
----------------------------------------------------------------------
diff --git a/bindings/qmf2/examples/cpp/agent.cpp b/bindings/qmf2/examples/cpp/agent.cpp
deleted file mode 100644
index faa5d5f..0000000
--- a/bindings/qmf2/examples/cpp/agent.cpp
+++ /dev/null
@@ -1,254 +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/messaging/Connection.h>
-#include <qpid/messaging/Duration.h>
-
-#define QMF_USE_DEPRECATED_API
-#include <qmf/AgentSession.h>
-#include <qmf/AgentEvent.h>
-#include <qmf/Schema.h>
-#include <qmf/SchemaProperty.h>
-#include <qmf/SchemaMethod.h>
-#include <qmf/Data.h>
-#include <qmf/DataAddr.h>
-#include <qpid/types/Variant.h>
-#include <string>
-#include <iostream>
-
-using namespace std;
-using namespace qmf;
-using qpid::types::Variant;
-using qpid::messaging::Duration;
-
-class ExampleAgent {
-public:
-    ExampleAgent(const string& url);
-    ~ExampleAgent();
-
-    void setupSchema();
-    void populateData();
-    void run();
-private:
-    qpid::messaging::Connection connection;
-    AgentSession session;
-    Schema sch_exception;
-    Schema sch_control;
-    Schema sch_child;
-    Schema sch_event;
-    Data control;
-    DataAddr controlAddr;
-
-    bool method(AgentEvent& event);
-};
-
-
-ExampleAgent::ExampleAgent(const string& url)
-{
-    //
-    // Create and open a messaging connection to a broker.
-    //
-    connection = qpid::messaging::Connection(url, "{reconnect:True}");
-    connection.open();
-
-    //
-    // Create, configure, and open a QMFv2 agent session using the connection.
-    //
-    session = AgentSession(connection, "{interval:30}");
-    session.setVendor("profitron.com");
-    session.setProduct("gizmo");
-    session.setAttribute("attr1", 2000);
-    session.open();
-}
-
-ExampleAgent::~ExampleAgent()
-{
-    //
-    // Clean up the QMF session and the AMQP connection.
-    //
-    session.close();
-    connection.close();
-}
-
-void ExampleAgent::setupSchema()
-{
-    //
-    // Create and register schema for this agent.
-    //
-    string package("com.profitron.gizmo");
-
-    //
-    // Declare a schema for a structured exception that can be used in failed
-    // method invocations.
-    //
-    sch_exception = Schema(SCHEMA_TYPE_DATA, package, "exception");
-    sch_exception.addProperty(SchemaProperty("whatHappened", SCHEMA_DATA_STRING));
-    sch_exception.addProperty(SchemaProperty("howBad", SCHEMA_DATA_INT));
-    sch_exception.addProperty(SchemaProperty("details", SCHEMA_DATA_MAP));
-
-    //
-    // Declare a control object to test methods against.
-    //
-    sch_control = Schema(SCHEMA_TYPE_DATA, package, "control");
-    sch_control.addProperty(SchemaProperty("state", SCHEMA_DATA_STRING));
-    sch_control.addProperty(SchemaProperty("methodCount", SCHEMA_DATA_INT));
-
-    SchemaMethod stopMethod("stop", "{desc:'Stop Agent'}");
-    stopMethod.addArgument(SchemaProperty("message", SCHEMA_DATA_STRING));
-    sch_control.addMethod(stopMethod);
-
-    SchemaMethod echoMethod("echo", "{desc:'Echo Arguments'}");
-    echoMethod.addArgument(SchemaProperty("sequence", SCHEMA_DATA_INT, "{dir:INOUT}"));
-    echoMethod.addArgument(SchemaProperty("map", SCHEMA_DATA_MAP, "{dir:INOUT}"));
-    sch_control.addMethod(echoMethod);
-
-    SchemaMethod eventMethod("event", "{desc:'Raise an Event'}");
-    eventMethod.addArgument(SchemaProperty("text", SCHEMA_DATA_STRING, "{dir:IN}"));
-    eventMethod.addArgument(SchemaProperty("severity", SCHEMA_DATA_INT, "{dir:IN}"));
-    sch_control.addMethod(eventMethod);
-
-    SchemaMethod failMethod("fail", "{desc:'Expected to Fail'}");
-    failMethod.addArgument(SchemaProperty("useString", SCHEMA_DATA_BOOL, "{dir:IN}"));
-    failMethod.addArgument(SchemaProperty("stringVal", SCHEMA_DATA_STRING, "{dir:IN}"));
-    failMethod.addArgument(SchemaProperty("details", SCHEMA_DATA_MAP, "{dir:IN}"));
-    sch_control.addMethod(failMethod);
-
-    SchemaMethod createMethod("create_child", "{desc:'Create Child Object'}");
-    createMethod.addArgument(SchemaProperty("name", SCHEMA_DATA_STRING, "{dir:IN}"));
-    createMethod.addArgument(SchemaProperty("childAddr", SCHEMA_DATA_MAP, "{dir:OUT}"));
-    sch_control.addMethod(createMethod);
-
-    //
-    // Declare the child class
-    //
-    sch_child = Schema(SCHEMA_TYPE_DATA, package, "child");
-    sch_child.addProperty(SchemaProperty("name", SCHEMA_DATA_STRING));
-
-    //
-    // Declare the event class
-    //
-    sch_event = Schema(SCHEMA_TYPE_EVENT, package, "event");
-    sch_event.addProperty(SchemaProperty("text", SCHEMA_DATA_STRING));
-
-    //
-    // Register our schemata with the agent session.
-    //
-    session.registerSchema(sch_exception);
-    session.registerSchema(sch_control);
-    session.registerSchema(sch_child);
-    session.registerSchema(sch_event);
-}
-
-void ExampleAgent::populateData()
-{
-    //
-    // Create a control object and give it to the agent session to manage.
-    //
-    control = Data(sch_control);
-    control.setProperty("state", "OPERATIONAL");
-    control.setProperty("methodCount", 0);
-    controlAddr = session.addData(control, "singleton");
-}
-
-void ExampleAgent::run()
-{
-    AgentEvent event;
-    bool running(true);
-
-    while (running) {
-        bool valid(session.nextEvent(event, Duration::SECOND));
-        if (valid && running) {
-            switch (event.getType()) {
-            case AGENT_METHOD:
-                running = method(event);
-                break;
-            default:
-                break;
-            }
-        }
-    }
-}
-
-bool ExampleAgent::method(AgentEvent& event)
-{
-    const string& name(event.getMethodName());
-    control.setProperty("methodCount", control.getProperty("methodCount").asUint32() + 1);
-
-    try {
-        if (controlAddr == event.getDataAddr()) {
-            if (name == "stop") {
-                cout << "Stopping: message=" << event.getArguments()["message"] << endl;
-                session.methodSuccess(event);
-                return false;
-            }
-
-            if (name == "echo") {
-                event.addReturnArgument("sequence", event.getArguments()["sequence"]);
-                event.addReturnArgument("map", event.getArguments()["map"]);
-                session.methodSuccess(event);
-                return true;
-            }
-
-            if (name == "event") {
-                Data ev(sch_event);
-                ev.setProperty("text", event.getArguments()["text"]);
-                session.raiseEvent(ev, event.getArguments()["severity"]);
-                session.methodSuccess(event);
-                return true;
-            }
-
-            if (name == "fail") {
-                if (event.getArguments()["useString"])
-                    session.raiseException(event, event.getArguments()["stringVal"]);
-                else {
-                    Data ex(sch_exception);
-                    ex.setProperty("whatHappened", "It Failed");
-                    ex.setProperty("howBad", 75);
-                    ex.setProperty("details", event.getArguments()["details"]);
-                    session.raiseException(event, ex);
-                }
-            }
-
-            if (name == "create_child") {
-                const string& name(event.getArguments()["name"]);
-                Data child(sch_child);
-                child.setProperty("name", name);
-                DataAddr addr(session.addData(child, name));
-                event.addReturnArgument("childAddr", addr.asMap());
-                session.methodSuccess(event);
-            }
-        }
-    } catch (const exception& e) {
-        //
-        // Pass the exception on to the caller.
-        //
-        session.raiseException(event, e.what());
-    }
-
-    return true;
-}
-
-int main()
-{
-    ExampleAgent agent("localhost");
-    agent.setupSchema();
-    agent.populateData();
-    agent.run();
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/dfb1f430/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp
----------------------------------------------------------------------
diff --git a/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp b/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp
deleted file mode 100644
index 0b09bbf..0000000
--- a/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp
+++ /dev/null
@@ -1,109 +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>
-
-#define QMF_USE_DEPRECATED_API
-#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;
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/dfb1f430/bindings/qmf2/examples/cpp/list_agents.cpp
----------------------------------------------------------------------
diff --git a/bindings/qmf2/examples/cpp/list_agents.cpp b/bindings/qmf2/examples/cpp/list_agents.cpp
deleted file mode 100644
index 5fff985..0000000
--- a/bindings/qmf2/examples/cpp/list_agents.cpp
+++ /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/messaging/Connection.h>
-#include <qpid/messaging/Duration.h>
-
-#define QMF_USE_DEPRECATED_API
-#include <qmf/ConsoleSession.h>
-#include <qmf/ConsoleEvent.h>
-#include <qmf/Agent.h>
-#include <qpid/types/Variant.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("");
-
-    while (true) {
-        ConsoleEvent event;
-        if (session.nextEvent(event)) {
-            if (event.getType() == CONSOLE_AGENT_ADD) {
-                string extra;
-                if (event.getAgent().getName() == session.getConnectedBrokerAgent().getName())
-                    extra = "  [Connected Broker]";
-                cout << "Agent Added: " << event.getAgent().getName() << extra << endl;
-            }
-            if (event.getType() == CONSOLE_AGENT_DEL) {
-                if (event.getAgentDelReason() == AGENT_DEL_AGED)
-                    cout << "Agent Aged: " << event.getAgent().getName() << endl;
-                else
-                    cout << "Agent Filtered: " << event.getAgent().getName() << endl;
-            }
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/dfb1f430/bindings/qmf2/examples/cpp/print_events.cpp
----------------------------------------------------------------------
diff --git a/bindings/qmf2/examples/cpp/print_events.cpp b/bindings/qmf2/examples/cpp/print_events.cpp
deleted file mode 100644
index 413c01b..0000000
--- a/bindings/qmf2/examples/cpp/print_events.cpp
+++ /dev/null
@@ -1,66 +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/messaging/Connection.h>
-#include <qpid/messaging/Duration.h>
-
-#define QMF_USE_DEPRECATED_API
-#include <qmf/ConsoleSession.h>
-#include <qmf/ConsoleEvent.h>
-#include <qmf/Data.h>
-#include <qpid/types/Variant.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();
-
-    while (true) {
-        ConsoleEvent event;
-        if (session.nextEvent(event)) {
-            if (event.getType() == CONSOLE_EVENT) {
-                const Data& data(event.getData(0));
-                cout << "Event: timestamp=" << event.getTimestamp() << " severity=" <<
-                    event.getSeverity() << " content=" << data.getProperties() << endl;
-            }
-        }
-    }
-}
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org