Qpid C++ Messaging API  1.39.0
Sender.h
1 #ifndef QPID_MESSAGING_SENDER_H
2 #define QPID_MESSAGING_SENDER_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 #include "qpid/messaging/ImportExport.h"
25 
26 #include "qpid/messaging/Handle.h"
27 #include "qpid/sys/IntegerTypes.h"
28 
29 #include <string>
30 
31 namespace qpid {
32 namespace messaging {
33 
34 #ifndef SWIG
35 template <class> class PrivateImplRef;
36 #endif
37 class Address;
38 class Message;
39 class SenderImpl;
40 class Session;
44 class QPID_MESSAGING_CLASS_EXTERN Sender : public qpid::messaging::Handle<SenderImpl>
45 {
46  public:
47  QPID_MESSAGING_EXTERN Sender(SenderImpl* impl = 0);
48  QPID_MESSAGING_EXTERN Sender(const Sender&);
49  QPID_MESSAGING_EXTERN ~Sender();
50  QPID_MESSAGING_EXTERN Sender& operator=(const Sender&);
51 
60  QPID_MESSAGING_EXTERN void send(const Message& message, bool sync=false);
61  QPID_MESSAGING_EXTERN void close();
62 
68  QPID_MESSAGING_EXTERN void setCapacity(uint32_t);
73  QPID_MESSAGING_EXTERN uint32_t getCapacity();
78  QPID_MESSAGING_EXTERN uint32_t getUnsettled();
83  QPID_MESSAGING_EXTERN uint32_t getAvailable();
87  QPID_MESSAGING_EXTERN const std::string& getName() const;
88 
92  QPID_MESSAGING_EXTERN Session getSession() const;
93 
97  QPID_MESSAGING_EXTERN Address getAddress() const;
98 #ifndef SWIG
99  private:
100  friend class qpid::messaging::PrivateImplRef<Sender>;
101 #endif
102 };
103 }} // namespace qpid::messaging
104 
105 #endif
Definition: Address.h:122
Definition: Connection.h:36
Definition: Message.h:42
Definition: Handle.h:39
Definition: Session.h:49
Definition: Address.h:32
Definition: Sender.h:44