00001 #ifndef PROTON_TRANSFER_HPP
00002 #define PROTON_TRANSFER_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "./internal/export.hpp"
00026 #include "./internal/object.hpp"
00027
00028 #include <proton/delivery.h>
00029 #include <proton/disposition.h>
00030
00031 namespace proton {
00032
00034 class transfer : public internal::object<pn_delivery_t> {
00036 transfer(pn_delivery_t* d) : internal::object<pn_delivery_t>(d) {}
00038
00039 public:
00041 transfer() : internal::object<pn_delivery_t>(0) {}
00042
00044 enum state {
00045 NONE = 0,
00046 RECEIVED = PN_RECEIVED,
00047 ACCEPTED = PN_ACCEPTED,
00048 REJECTED = PN_REJECTED,
00049 RELEASED = PN_RELEASED,
00050 MODIFIED = PN_MODIFIED
00051 };
00052
00054 PN_CPP_EXTERN enum state state() const;
00055
00057 PN_CPP_EXTERN class session session() const;
00058
00060 PN_CPP_EXTERN class connection connection() const;
00061
00063 PN_CPP_EXTERN class container &container() const;
00064
00066 PN_CPP_EXTERN void settle();
00067
00069 PN_CPP_EXTERN bool settled() const;
00070
00072 friend class internal::factory<transfer>;
00074 };
00075
00076 }
00077
00078 #endif // PROTON_TRANSFER_HPP