Qpid Proton C++  0.12.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
event.hpp
1 #ifndef PROTON_CPP_EVENT_H
2 #define PROTON_CPP_EVENT_H
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
25 #include "proton/export.hpp"
26 #include "proton/link.hpp"
27 #include "proton/connection.hpp"
28 #include "proton/message.hpp"
29 #include <vector>
30 #include <string>
31 
32 namespace proton {
33 
34 class handler;
35 class container;
36 class connection;
37 
41 class event {
42  public:
43  virtual PN_CPP_EXTERN ~event();
44 
46  virtual PN_CPP_EXTERN std::string name() const = 0;
47 
52  virtual PN_CPP_EXTERN class container& container() const;
53 
55  virtual PN_CPP_EXTERN class transport transport() const;
57  virtual PN_CPP_EXTERN class connection connection() const;
59  virtual PN_CPP_EXTERN class session session() const;
60 
64  virtual PN_CPP_EXTERN class sender sender() const;
65 
69  virtual PN_CPP_EXTERN class receiver receiver() const;
70 
74  virtual PN_CPP_EXTERN class link link() const;
75 
79  virtual PN_CPP_EXTERN class delivery delivery() const;
80 
84  virtual PN_CPP_EXTERN class message &message() const;
85 
86  protected:
87  PN_CPP_EXTERN event();
88 
89  private:
90  event(const event&);
91  event& operator=(const event&);
92 };
93 
94 }
95 
96 #endif // PROTON_CPP_EVENT_H
An AMQP message.
Definition: message.hpp:48
A top-level container of connections, sessions, and links.
Definition: container.hpp:57
A context for a proton event.
Definition: event.hpp:41
virtual std::string name() const =0
Return the name of the event type.
A link for sending messages.
Definition: sender.hpp:38
A connection to a remote AMQP peer.
Definition: connection.hpp:42
A container of links.
Definition: session.hpp:42
A message transfer.
Definition: delivery.hpp:36
virtual class message & message() const
Get message.
A link for receiving messages.
Definition: receiver.hpp:36
A network layer supporting an AMQP connection.
Definition: transport.hpp:38
virtual class container & container() const
Get the container.