Qpid Proton C++ API 0.41.1
Loading...
Searching...
No Matches
tracker.hpp
Go to the documentation of this file.
1#ifndef PROTON_TRACKER_HPP
2#define PROTON_TRACKER_HPP
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 "./binary.hpp"
26#include "./endpoint.hpp"
27#include "./internal/export.hpp"
28#include "./transfer.hpp"
29
32
33struct pn_delivery_t;
34
35namespace proton {
36
42class tracker : public transfer {
44 tracker(pn_delivery_t* d);
46
47 public:
49 tracker() = default;
50
52 PN_CPP_EXTERN class sender sender() const;
53
55 PN_CPP_EXTERN binary tag() const;
56
58 friend class internal::factory<tracker>;
59 friend class sender;
61};
62
64
66class tracker_iterator : public internal::iter_base<tracker, tracker_iterator> {
67 tracker_iterator(tracker t) :
68 internal::iter_base<tracker, tracker_iterator>(t) {}
69
70public:
71 explicit tracker_iterator() :
72 internal::iter_base<tracker, tracker_iterator>(tracker()) {}
74 PN_CPP_EXTERN tracker_iterator operator++();
75
76 friend class sender;
77};
78
80typedef internal::iter_range<tracker_iterator> tracker_range;
81
83
84} // proton
85
87template <> struct std::hash<proton::tracker> {
88 std::size_t operator()(const proton::tracker& k) const {
89 return std::hash<proton::binary>{}(k.tag());
90 }
91};
92
93#endif // PROTON_TRACKER_HPP
Arbitrary binary data.
Arbitrary binary data.
Definition binary.hpp:40
A tracker for a sent message.
Definition tracker.hpp:42
tracker()=default
Create an empty tracker.
binary tag() const
Get the tag for this tracker.
class sender sender() const
Get the sender for this tracker.
transfer()
Create an empty transfer.
Definition transfer.hpp:48
The base class for session, connection, and link.
The main Proton namespace.
Definition annotation_key.hpp:33
The base class for delivery and tracker.