You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/10/23 16:36:20 UTC

[18/50] [abbrv] qpid-proton git commit: NO-JIRA: C++: Move event implementation classes out of public headers.

NO-JIRA: C++: Move event implementation classes out of public headers.

messaging_event and proton_event are implementation details, only proton::event needs to be public.


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

Branch: refs/heads/go1
Commit: 617cf6554de5b413e4cdcd6adb985ccb8d1a9463
Parents: da3ee2c
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Oct 9 15:37:23 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Oct 9 15:37:50 2015 -0400

----------------------------------------------------------------------
 .../cpp/include/proton/messaging_adapter.hpp    |   1 -
 .../cpp/include/proton/messaging_event.hpp      | 111 -------
 .../cpp/include/proton/proton_event.hpp         | 298 -------------------
 proton-c/bindings/cpp/src/container.cpp         |   2 +-
 proton-c/bindings/cpp/src/container_impl.cpp    |   2 +-
 proton-c/bindings/cpp/src/messaging_adapter.cpp |   2 +-
 proton-c/bindings/cpp/src/messaging_event.cpp   |   2 +-
 proton-c/bindings/cpp/src/messaging_event.hpp   | 111 +++++++
 proton-c/bindings/cpp/src/messaging_handler.cpp |   2 +-
 proton-c/bindings/cpp/src/proton_event.cpp      |   2 +-
 proton-c/bindings/cpp/src/proton_event.hpp      | 298 +++++++++++++++++++
 proton-c/bindings/cpp/src/proton_handler.cpp    |   2 +-
 12 files changed, 416 insertions(+), 417 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/include/proton/messaging_adapter.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/messaging_adapter.hpp b/proton-c/bindings/cpp/include/proton/messaging_adapter.hpp
index ded1309..29a26c6 100644
--- a/proton-c/bindings/cpp/include/proton/messaging_adapter.hpp
+++ b/proton-c/bindings/cpp/include/proton/messaging_adapter.hpp
@@ -25,7 +25,6 @@
 #include "proton/facade.hpp"
 #include "proton/messaging_handler.hpp"
 
-#include "proton/messaging_event.hpp"
 #include "proton/event.h"
 #include "proton/reactor.h"
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/include/proton/messaging_event.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/messaging_event.hpp b/proton-c/bindings/cpp/include/proton/messaging_event.hpp
deleted file mode 100644
index d130064..0000000
--- a/proton-c/bindings/cpp/include/proton/messaging_event.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#ifndef PROTON_CPP_MESSAGINGEVENT_H
-#define PROTON_CPP_MESSAGINGEVENT_H
-
-/*
- *
- * 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 "proton/proton_event.hpp"
-#include "proton/link.hpp"
-#include "proton/message.hpp"
-
-namespace proton {
-
-class handler;
-class container;
-class connection;
-class message;
-
-/** An event for the proton::messaging_handler */
-class messaging_event : public proton_event
-{
-  public:
-
-    std::string name() const;
-
-    // TODO aconway 2015-07-16: document meaning of each event type.
-
-    /** Event types for a messaging_handler */
-    enum event_type {
-        PROTON = 0,  // Wrapped pn_event_t
-        ABORT,
-        ACCEPTED,
-        COMMIT,
-        CONNECTION_CLOSED,
-        CONNECTION_CLOSING,
-        CONNECTION_ERROR,
-        CONNECTION_OPENED,
-        CONNECTION_OPENING,
-        DISCONNECTED,
-        FETCH,
-        ID_LOADED,
-        LINK_CLOSED,
-        LINK_CLOSING,
-        LINK_OPENED,
-        LINK_OPENING,
-        LINK_ERROR,
-        MESSAGE,
-        QUIT,
-        RECORD_INSERTED,
-        RECORDS_LOADED,
-        REJECTED,
-        RELEASED,
-        REQUEST,
-        RESPONSE,
-        SENDABLE,
-        SESSION_CLOSED,
-        SESSION_CLOSING,
-        SESSION_OPENED,
-        SESSION_OPENING,
-        SESSION_ERROR,
-        SETTLED,
-        START,
-        TIMER,
-        TRANSACTION_ABORTED,
-        TRANSACTION_COMMITTED,
-        TRANSACTION_DECLARED,
-        TRANSPORT_CLOSED
-    };
-
-    messaging_event(pn_event_t *ce, proton_event::event_type t, class container &c);
-    messaging_event(event_type t, proton_event &parent);
-    ~messaging_event();
-
-    virtual PN_CPP_EXTERN void dispatch(handler &h);
-    virtual PN_CPP_EXTERN class connection &connection();
-    virtual PN_CPP_EXTERN class sender& sender();
-    virtual PN_CPP_EXTERN class receiver& receiver();
-    virtual PN_CPP_EXTERN class link& link();
-    virtual PN_CPP_EXTERN class delivery& delivery();
-    virtual PN_CPP_EXTERN class message& message();
-
-    PN_CPP_EXTERN event_type type() const;
-
-  private:
-  friend class messaging_adapter;
-    event_type type_;
-    proton_event *parent_event_;
-    class message *message_;
-    messaging_event operator=(const messaging_event&);
-    messaging_event(const messaging_event&);
-};
-
-}
-
-#endif  /*!PROTON_CPP_MESSAGINGEVENT_H*/

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/include/proton/proton_event.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/proton_event.hpp b/proton-c/bindings/cpp/include/proton/proton_event.hpp
deleted file mode 100644
index f71af55..0000000
--- a/proton-c/bindings/cpp/include/proton/proton_event.hpp
+++ /dev/null
@@ -1,298 +0,0 @@
-#ifndef PROTON_CPP_PROTONEVENT_H
-#define PROTON_CPP_PROTONEVENT_H
-
-/*
- *
- * 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 "proton/event.hpp"
-#include "proton/link.hpp"
-
-struct pn_event_t;
-
-namespace proton {
-
-class handler;
-class container;
-class connection;
-class container;
-
-/** Event information for a proton::proton_handler */
-class proton_event : public event
-{
-  public:
-
-    std::string name() const;
-
-    ///@name Event types
-    ///@{
-
-    /// The type of an event
-    typedef int event_type;
-
-    /**
-     * Defined as a programming convenience. No event of this type will
-     * ever be generated.
-     */
-    PN_CPP_EXTERN static const event_type EVENT_NONE;
-
-    /**
-     * A reactor has been started. Events of this type point to the reactor.
-     */
-    PN_CPP_EXTERN static const event_type REACTOR_INIT;
-
-    /**
-     * A reactor has no more events to process. Events of this type
-     * point to the reactor.
-     */
-    PN_CPP_EXTERN static const event_type REACTOR_QUIESCED;
-
-    /**
-     * A reactor has been stopped. Events of this type point to the reactor.
-     */
-    PN_CPP_EXTERN static const event_type REACTOR_FINAL;
-
-    /**
-     * A timer event has occurred.
-     */
-    PN_CPP_EXTERN static const event_type TIMER_TASK;
-
-    /**
-     * The connection has been created. This is the first event that
-     * will ever be issued for a connection. Events of this type point
-     * to the relevant connection.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_INIT;
-
-    /**
-     * The connection has been bound to a transport. This event is
-     * issued when the transport::bind() is called.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_BOUND;
-
-    /**
-     * The connection has been unbound from its transport. This event is
-     * issued when transport::unbind() is called.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_UNBOUND;
-
-    /**
-     * The local connection endpoint has been closed. Events of this
-     * type point to the relevant connection.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_LOCAL_OPEN;
-
-    /**
-     * The remote endpoint has opened the connection. Events of this
-     * type point to the relevant connection.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_REMOTE_OPEN;
-
-    /**
-     * The local connection endpoint has been closed. Events of this
-     * type point to the relevant connection.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_LOCAL_CLOSE;
-
-    /**
-     *  The remote endpoint has closed the connection. Events of this
-     *  type point to the relevant connection.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_REMOTE_CLOSE;
-
-    /**
-     * The connection has been freed and any outstanding processing has
-     * been completed. This is the final event that will ever be issued
-     * for a connection.
-     */
-    PN_CPP_EXTERN static const event_type CONNECTION_FINAL;
-
-    /**
-     * The session has been created. This is the first event that will
-     * ever be issued for a session.
-     */
-    PN_CPP_EXTERN static const event_type SESSION_INIT;
-
-    /**
-     * The local session endpoint has been opened. Events of this type
-     * point ot the relevant session.
-     */
-    PN_CPP_EXTERN static const event_type SESSION_LOCAL_OPEN;
-
-    /**
-     * The remote endpoint has opened the session. Events of this type
-     * point to the relevant session.
-     */
-    PN_CPP_EXTERN static const event_type SESSION_REMOTE_OPEN;
-
-    /**
-     * The local session endpoint has been closed. Events of this type
-     * point ot the relevant session.
-     */
-    PN_CPP_EXTERN static const event_type SESSION_LOCAL_CLOSE;
-
-    /**
-     * The remote endpoint has closed the session. Events of this type
-     * point to the relevant session.
-     */
-    PN_CPP_EXTERN static const event_type SESSION_REMOTE_CLOSE;
-
-    /**
-     * The session has been freed and any outstanding processing has
-     * been completed. This is the final event that will ever be issued
-     * for a session.
-     */
-    PN_CPP_EXTERN static const event_type SESSION_FINAL;
-
-    /**
-     * The link has been created. This is the first event that will ever
-     * be issued for a link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_INIT;
-
-    /**
-     * The local link endpoint has been opened. Events of this type
-     * point ot the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_LOCAL_OPEN;
-
-    /**
-     * The remote endpoint has opened the link. Events of this type
-     * point to the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_REMOTE_OPEN;
-
-    /**
-     * The local link endpoint has been closed. Events of this type
-     * point ot the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_LOCAL_CLOSE;
-
-    /**
-     * The remote endpoint has closed the link. Events of this type
-     * point to the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_REMOTE_CLOSE;
-
-    /**
-     * The local link endpoint has been detached. Events of this type
-     * point to the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_LOCAL_DETACH;
-
-    /**
-     * The remote endpoint has detached the link. Events of this type
-     * point to the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_REMOTE_DETACH;
-
-    /**
-     * The flow control state for a link has changed. Events of this
-     * type point to the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_FLOW;
-
-    /**
-     * The link has been freed and any outstanding processing has been
-     * completed. This is the final event that will ever be issued for a
-     * link. Events of this type point to the relevant link.
-     */
-    PN_CPP_EXTERN static const event_type LINK_FINAL;
-
-    /**
-     * A delivery has been created or updated. Events of this type point
-     * to the relevant delivery.
-     */
-    PN_CPP_EXTERN static const event_type DELIVERY;
-
-    /**
-     * The transport has new data to read and/or write. Events of this
-     * type point to the relevant transport.
-     */
-    PN_CPP_EXTERN static const event_type TRANSPORT;
-
-    /**
-     * The transport has authenticated, if this is received by a server
-     * the associated transport has authenticated an incoming connection
-     * and transport::user() can be used to obtain the authenticated
-     * user.
-     */
-    PN_CPP_EXTERN static const event_type TRANSPORT_AUTHENTICATED;
-
-    /**
-     * Indicates that a transport error has occurred. Use
-     * transport::condition() to access the details of the error
-     * from the associated transport.
-     */
-    PN_CPP_EXTERN static const event_type TRANSPORT_ERROR;
-
-    /**
-     * Indicates that the head of the transport has been closed. This
-     * means the transport will never produce more bytes for output to
-     * the network. Events of this type point to the relevant transport.
-     */
-    PN_CPP_EXTERN static const event_type TRANSPORT_HEAD_CLOSED;
-
-    /**
-     * Indicates that the tail of the transport has been closed. This
-     * means the transport will never be able to process more bytes from
-     * the network. Events of this type point to the relevant transport.
-     */
-    PN_CPP_EXTERN static const event_type TRANSPORT_TAIL_CLOSED;
-
-    /**
-     * Indicates that the both the head and tail of the transport are
-     * closed. Events of this type point to the relevant transport.
-     */
-    PN_CPP_EXTERN static const event_type TRANSPORT_CLOSED;
-
-    PN_CPP_EXTERN static const event_type SELECTABLE_INIT;
-    PN_CPP_EXTERN static const event_type SELECTABLE_UPDATED;
-    PN_CPP_EXTERN static const event_type SELECTABLE_READABLE;
-    PN_CPP_EXTERN static const event_type SELECTABLE_WRITABLE;
-    PN_CPP_EXTERN static const event_type SELECTABLE_ERROR;
-    PN_CPP_EXTERN static const event_type SELECTABLE_EXPIRED;
-    PN_CPP_EXTERN static const event_type SELECTABLE_FINAL;
-
-    ///@}
-
-    virtual PN_CPP_EXTERN void dispatch(handler &h);
-    virtual PN_CPP_EXTERN class container &container();
-    virtual PN_CPP_EXTERN class connection &connection();
-    virtual PN_CPP_EXTERN class sender& sender();
-    virtual PN_CPP_EXTERN class receiver& receiver();
-    virtual PN_CPP_EXTERN class link& link();
-    virtual PN_CPP_EXTERN class delivery& delivery();
-
-    /** Get type of event */
-    PN_CPP_EXTERN event_type type() const;
-
-    PN_CPP_EXTERN pn_event_t* pn_event();
-
-  protected:
-    PN_CPP_EXTERN proton_event(pn_event_t *ce, proton_event::event_type t, class container &c);
-  private:
-    pn_event_t *pn_event_;
-    event_type type_;
-    class container &container_;
-};
-
-}
-
-#endif  /*!PROTON_CPP_PROTONEVENT_H*/

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/container.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/container.cpp b/proton-c/bindings/cpp/src/container.cpp
index f9dc06e..da97191 100644
--- a/proton-c/bindings/cpp/src/container.cpp
+++ b/proton-c/bindings/cpp/src/container.cpp
@@ -19,7 +19,7 @@
  *
  */
 #include "proton/container.hpp"
-#include "proton/messaging_event.hpp"
+#include "messaging_event.hpp"
 #include "proton/connection.hpp"
 #include "proton/session.hpp"
 #include "proton/messaging_adapter.hpp"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/container_impl.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/container_impl.cpp b/proton-c/bindings/cpp/src/container_impl.cpp
index 3aab33f..eda3c3b 100644
--- a/proton-c/bindings/cpp/src/container_impl.cpp
+++ b/proton-c/bindings/cpp/src/container_impl.cpp
@@ -20,7 +20,7 @@
  */
 #include "proton/container.hpp"
 #include "proton/event.hpp"
-#include "proton/messaging_event.hpp"
+#include "messaging_event.hpp"
 #include "proton/connection.hpp"
 #include "proton/session.hpp"
 #include "proton/messaging_adapter.hpp"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/messaging_adapter.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/messaging_adapter.cpp b/proton-c/bindings/cpp/src/messaging_adapter.cpp
index 6c86581..7235244 100644
--- a/proton-c/bindings/cpp/src/messaging_adapter.cpp
+++ b/proton-c/bindings/cpp/src/messaging_adapter.cpp
@@ -19,7 +19,7 @@
  *
  */
 #include "proton/messaging_adapter.hpp"
-#include "proton/messaging_event.hpp"
+#include "messaging_event.hpp"
 #include "proton/sender.hpp"
 #include "proton/error.hpp"
 #include "msg.hpp"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/messaging_event.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/messaging_event.cpp b/proton-c/bindings/cpp/src/messaging_event.cpp
index e602dc4..a9347d1 100644
--- a/proton-c/bindings/cpp/src/messaging_event.cpp
+++ b/proton-c/bindings/cpp/src/messaging_event.cpp
@@ -23,7 +23,7 @@
 #include "proton/event.h"
 #include "proton/link.h"
 
-#include "proton/messaging_event.hpp"
+#include "messaging_event.hpp"
 #include "proton/message.hpp"
 #include "proton/proton_handler.hpp"
 #include "proton/messaging_handler.hpp"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/messaging_event.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/messaging_event.hpp b/proton-c/bindings/cpp/src/messaging_event.hpp
new file mode 100644
index 0000000..1f73477
--- /dev/null
+++ b/proton-c/bindings/cpp/src/messaging_event.hpp
@@ -0,0 +1,111 @@
+#ifndef PROTON_CPP_MESSAGINGEVENT_H
+#define PROTON_CPP_MESSAGINGEVENT_H
+
+/*
+ *
+ * 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 "proton_event.hpp"
+#include "proton/link.hpp"
+#include "proton/message.hpp"
+
+namespace proton {
+
+class handler;
+class container;
+class connection;
+class message;
+
+/** An event for the proton::messaging_handler */
+class messaging_event : public proton_event
+{
+  public:
+
+    std::string name() const;
+
+    // TODO aconway 2015-07-16: document meaning of each event type.
+
+    /** Event types for a messaging_handler */
+    enum event_type {
+        PROTON = 0,  // Wrapped pn_event_t
+        ABORT,
+        ACCEPTED,
+        COMMIT,
+        CONNECTION_CLOSED,
+        CONNECTION_CLOSING,
+        CONNECTION_ERROR,
+        CONNECTION_OPENED,
+        CONNECTION_OPENING,
+        DISCONNECTED,
+        FETCH,
+        ID_LOADED,
+        LINK_CLOSED,
+        LINK_CLOSING,
+        LINK_OPENED,
+        LINK_OPENING,
+        LINK_ERROR,
+        MESSAGE,
+        QUIT,
+        RECORD_INSERTED,
+        RECORDS_LOADED,
+        REJECTED,
+        RELEASED,
+        REQUEST,
+        RESPONSE,
+        SENDABLE,
+        SESSION_CLOSED,
+        SESSION_CLOSING,
+        SESSION_OPENED,
+        SESSION_OPENING,
+        SESSION_ERROR,
+        SETTLED,
+        START,
+        TIMER,
+        TRANSACTION_ABORTED,
+        TRANSACTION_COMMITTED,
+        TRANSACTION_DECLARED,
+        TRANSPORT_CLOSED
+    };
+
+    messaging_event(pn_event_t *ce, proton_event::event_type t, class container &c);
+    messaging_event(event_type t, proton_event &parent);
+    ~messaging_event();
+
+    virtual PN_CPP_EXTERN void dispatch(handler &h);
+    virtual PN_CPP_EXTERN class connection &connection();
+    virtual PN_CPP_EXTERN class sender& sender();
+    virtual PN_CPP_EXTERN class receiver& receiver();
+    virtual PN_CPP_EXTERN class link& link();
+    virtual PN_CPP_EXTERN class delivery& delivery();
+    virtual PN_CPP_EXTERN class message& message();
+
+    PN_CPP_EXTERN event_type type() const;
+
+  private:
+  friend class messaging_adapter;
+    event_type type_;
+    proton_event *parent_event_;
+    class message *message_;
+    messaging_event operator=(const messaging_event&);
+    messaging_event(const messaging_event&);
+};
+
+}
+
+#endif  /*!PROTON_CPP_MESSAGINGEVENT_H*/

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/messaging_handler.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/messaging_handler.cpp b/proton-c/bindings/cpp/src/messaging_handler.cpp
index cd580f4..babe458 100644
--- a/proton-c/bindings/cpp/src/messaging_handler.cpp
+++ b/proton-c/bindings/cpp/src/messaging_handler.cpp
@@ -19,7 +19,7 @@
  *
  */
 #include "proton/messaging_handler.hpp"
-#include "proton/proton_event.hpp"
+#include "proton_event.hpp"
 #include "proton/messaging_adapter.hpp"
 #include "proton/handlers.h"
 #include <algorithm>

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/proton_event.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/proton_event.cpp b/proton-c/bindings/cpp/src/proton_event.cpp
index 9b08826..767c6af 100644
--- a/proton-c/bindings/cpp/src/proton_event.cpp
+++ b/proton-c/bindings/cpp/src/proton_event.cpp
@@ -26,7 +26,7 @@
 #include "proton/container.hpp"
 #include "proton/delivery.hpp"
 #include "proton/error.hpp"
-#include "proton/proton_event.hpp"
+#include "proton_event.hpp"
 #include "proton/proton_handler.hpp"
 #include "proton/receiver.hpp"
 #include "proton/sender.hpp"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/proton_event.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/proton_event.hpp b/proton-c/bindings/cpp/src/proton_event.hpp
new file mode 100644
index 0000000..f71af55
--- /dev/null
+++ b/proton-c/bindings/cpp/src/proton_event.hpp
@@ -0,0 +1,298 @@
+#ifndef PROTON_CPP_PROTONEVENT_H
+#define PROTON_CPP_PROTONEVENT_H
+
+/*
+ *
+ * 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 "proton/event.hpp"
+#include "proton/link.hpp"
+
+struct pn_event_t;
+
+namespace proton {
+
+class handler;
+class container;
+class connection;
+class container;
+
+/** Event information for a proton::proton_handler */
+class proton_event : public event
+{
+  public:
+
+    std::string name() const;
+
+    ///@name Event types
+    ///@{
+
+    /// The type of an event
+    typedef int event_type;
+
+    /**
+     * Defined as a programming convenience. No event of this type will
+     * ever be generated.
+     */
+    PN_CPP_EXTERN static const event_type EVENT_NONE;
+
+    /**
+     * A reactor has been started. Events of this type point to the reactor.
+     */
+    PN_CPP_EXTERN static const event_type REACTOR_INIT;
+
+    /**
+     * A reactor has no more events to process. Events of this type
+     * point to the reactor.
+     */
+    PN_CPP_EXTERN static const event_type REACTOR_QUIESCED;
+
+    /**
+     * A reactor has been stopped. Events of this type point to the reactor.
+     */
+    PN_CPP_EXTERN static const event_type REACTOR_FINAL;
+
+    /**
+     * A timer event has occurred.
+     */
+    PN_CPP_EXTERN static const event_type TIMER_TASK;
+
+    /**
+     * The connection has been created. This is the first event that
+     * will ever be issued for a connection. Events of this type point
+     * to the relevant connection.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_INIT;
+
+    /**
+     * The connection has been bound to a transport. This event is
+     * issued when the transport::bind() is called.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_BOUND;
+
+    /**
+     * The connection has been unbound from its transport. This event is
+     * issued when transport::unbind() is called.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_UNBOUND;
+
+    /**
+     * The local connection endpoint has been closed. Events of this
+     * type point to the relevant connection.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_LOCAL_OPEN;
+
+    /**
+     * The remote endpoint has opened the connection. Events of this
+     * type point to the relevant connection.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_REMOTE_OPEN;
+
+    /**
+     * The local connection endpoint has been closed. Events of this
+     * type point to the relevant connection.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_LOCAL_CLOSE;
+
+    /**
+     *  The remote endpoint has closed the connection. Events of this
+     *  type point to the relevant connection.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_REMOTE_CLOSE;
+
+    /**
+     * The connection has been freed and any outstanding processing has
+     * been completed. This is the final event that will ever be issued
+     * for a connection.
+     */
+    PN_CPP_EXTERN static const event_type CONNECTION_FINAL;
+
+    /**
+     * The session has been created. This is the first event that will
+     * ever be issued for a session.
+     */
+    PN_CPP_EXTERN static const event_type SESSION_INIT;
+
+    /**
+     * The local session endpoint has been opened. Events of this type
+     * point ot the relevant session.
+     */
+    PN_CPP_EXTERN static const event_type SESSION_LOCAL_OPEN;
+
+    /**
+     * The remote endpoint has opened the session. Events of this type
+     * point to the relevant session.
+     */
+    PN_CPP_EXTERN static const event_type SESSION_REMOTE_OPEN;
+
+    /**
+     * The local session endpoint has been closed. Events of this type
+     * point ot the relevant session.
+     */
+    PN_CPP_EXTERN static const event_type SESSION_LOCAL_CLOSE;
+
+    /**
+     * The remote endpoint has closed the session. Events of this type
+     * point to the relevant session.
+     */
+    PN_CPP_EXTERN static const event_type SESSION_REMOTE_CLOSE;
+
+    /**
+     * The session has been freed and any outstanding processing has
+     * been completed. This is the final event that will ever be issued
+     * for a session.
+     */
+    PN_CPP_EXTERN static const event_type SESSION_FINAL;
+
+    /**
+     * The link has been created. This is the first event that will ever
+     * be issued for a link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_INIT;
+
+    /**
+     * The local link endpoint has been opened. Events of this type
+     * point ot the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_LOCAL_OPEN;
+
+    /**
+     * The remote endpoint has opened the link. Events of this type
+     * point to the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_REMOTE_OPEN;
+
+    /**
+     * The local link endpoint has been closed. Events of this type
+     * point ot the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_LOCAL_CLOSE;
+
+    /**
+     * The remote endpoint has closed the link. Events of this type
+     * point to the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_REMOTE_CLOSE;
+
+    /**
+     * The local link endpoint has been detached. Events of this type
+     * point to the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_LOCAL_DETACH;
+
+    /**
+     * The remote endpoint has detached the link. Events of this type
+     * point to the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_REMOTE_DETACH;
+
+    /**
+     * The flow control state for a link has changed. Events of this
+     * type point to the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_FLOW;
+
+    /**
+     * The link has been freed and any outstanding processing has been
+     * completed. This is the final event that will ever be issued for a
+     * link. Events of this type point to the relevant link.
+     */
+    PN_CPP_EXTERN static const event_type LINK_FINAL;
+
+    /**
+     * A delivery has been created or updated. Events of this type point
+     * to the relevant delivery.
+     */
+    PN_CPP_EXTERN static const event_type DELIVERY;
+
+    /**
+     * The transport has new data to read and/or write. Events of this
+     * type point to the relevant transport.
+     */
+    PN_CPP_EXTERN static const event_type TRANSPORT;
+
+    /**
+     * The transport has authenticated, if this is received by a server
+     * the associated transport has authenticated an incoming connection
+     * and transport::user() can be used to obtain the authenticated
+     * user.
+     */
+    PN_CPP_EXTERN static const event_type TRANSPORT_AUTHENTICATED;
+
+    /**
+     * Indicates that a transport error has occurred. Use
+     * transport::condition() to access the details of the error
+     * from the associated transport.
+     */
+    PN_CPP_EXTERN static const event_type TRANSPORT_ERROR;
+
+    /**
+     * Indicates that the head of the transport has been closed. This
+     * means the transport will never produce more bytes for output to
+     * the network. Events of this type point to the relevant transport.
+     */
+    PN_CPP_EXTERN static const event_type TRANSPORT_HEAD_CLOSED;
+
+    /**
+     * Indicates that the tail of the transport has been closed. This
+     * means the transport will never be able to process more bytes from
+     * the network. Events of this type point to the relevant transport.
+     */
+    PN_CPP_EXTERN static const event_type TRANSPORT_TAIL_CLOSED;
+
+    /**
+     * Indicates that the both the head and tail of the transport are
+     * closed. Events of this type point to the relevant transport.
+     */
+    PN_CPP_EXTERN static const event_type TRANSPORT_CLOSED;
+
+    PN_CPP_EXTERN static const event_type SELECTABLE_INIT;
+    PN_CPP_EXTERN static const event_type SELECTABLE_UPDATED;
+    PN_CPP_EXTERN static const event_type SELECTABLE_READABLE;
+    PN_CPP_EXTERN static const event_type SELECTABLE_WRITABLE;
+    PN_CPP_EXTERN static const event_type SELECTABLE_ERROR;
+    PN_CPP_EXTERN static const event_type SELECTABLE_EXPIRED;
+    PN_CPP_EXTERN static const event_type SELECTABLE_FINAL;
+
+    ///@}
+
+    virtual PN_CPP_EXTERN void dispatch(handler &h);
+    virtual PN_CPP_EXTERN class container &container();
+    virtual PN_CPP_EXTERN class connection &connection();
+    virtual PN_CPP_EXTERN class sender& sender();
+    virtual PN_CPP_EXTERN class receiver& receiver();
+    virtual PN_CPP_EXTERN class link& link();
+    virtual PN_CPP_EXTERN class delivery& delivery();
+
+    /** Get type of event */
+    PN_CPP_EXTERN event_type type() const;
+
+    PN_CPP_EXTERN pn_event_t* pn_event();
+
+  protected:
+    PN_CPP_EXTERN proton_event(pn_event_t *ce, proton_event::event_type t, class container &c);
+  private:
+    pn_event_t *pn_event_;
+    event_type type_;
+    class container &container_;
+};
+
+}
+
+#endif  /*!PROTON_CPP_PROTONEVENT_H*/

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/617cf655/proton-c/bindings/cpp/src/proton_handler.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/proton_handler.cpp b/proton-c/bindings/cpp/src/proton_handler.cpp
index d7c2da4..7080d39 100644
--- a/proton-c/bindings/cpp/src/proton_handler.cpp
+++ b/proton-c/bindings/cpp/src/proton_handler.cpp
@@ -19,7 +19,7 @@
  *
  */
 #include "proton/proton_handler.hpp"
-#include "proton/proton_event.hpp"
+#include "proton_event.hpp"
 
 namespace proton {
 


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