Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
ConsoleSession.h
Go to the documentation of this file.
1 #ifndef QMF_CONSOLE_SESSION_H
2 #define QMF_CONSOLE_SESSION_H
3 /*
4  *
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  *
22  */
23 
24 #if !defined(QMF_USE_DEPRECATED_API) && !defined(qmf2_EXPORTS) && !defined(SWIG)
25 # error "The API defined in this file has been DEPRECATED and will be removed in the future."
26 # error "Define 'QMF_USE_DEPRECATED_API' to enable continued use of the API."
27 #endif
28 
29 #include <qmf/ImportExport.h>
30 #include "qmf/Handle.h"
31 #include "qmf/Agent.h"
32 #include "qmf/Subscription.h"
35 #include <string>
36 
37 namespace qmf {
38 
39 #ifndef SWIG
40  template <class> class PrivateImplRef;
41 #endif
42 
43  class ConsoleSessionImpl;
44  class ConsoleEvent;
45 
46  class QMF_CLASS_EXTERN ConsoleSession : public qmf::Handle<ConsoleSessionImpl> {
47  public:
48  QMF_EXTERN ConsoleSession(ConsoleSessionImpl* impl = 0);
49  QMF_EXTERN ConsoleSession(const ConsoleSession&);
50  QMF_EXTERN ConsoleSession& operator=(const ConsoleSession&);
51  QMF_EXTERN ~ConsoleSession();
52 
74  QMF_EXTERN ConsoleSession(qpid::messaging::Connection& conn, const std::string& options="");
75 
81  QMF_EXTERN void setDomain(const std::string& domain);
82  QMF_EXTERN void setAgentFilter(const std::string& filter);
83 
87  QMF_EXTERN void open();
88 
92  QMF_EXTERN void close();
93 
101 
105  QMF_EXTERN int pendingEvents() const;
106 
110  QMF_EXTERN uint32_t getAgentCount() const;
111  QMF_EXTERN Agent getAgent(uint32_t agentIndex) const;
112 
116  QMF_EXTERN Agent getConnectedBrokerAgent() const;
117 
125  QMF_EXTERN Subscription subscribe(const Query& query, const std::string& agentFilter = "", const std::string& options = "");
126  QMF_EXTERN Subscription subscribe(const std::string& query, const std::string& agentFilter = "", const std::string& options = "");
127 
128 #ifndef SWIG
129  private:
130  friend class qmf::PrivateImplRef<ConsoleSession>;
131  friend struct ConsoleSessionImplAccess;
132 #endif
133  };
134 
135 }
136 
137 #endif
A duration is a time in milliseconds.
Definition: Duration.h:35
static const Duration FOREVER
Definition: Duration.h:40
#define QMF_EXTERN
Definition: ImportExport.h:30
A connection represents a network connection to a remote endpoint.
Definition: Connection.h:45
unsigned int uint32_t
Definition: IntegerTypes.h:27
A handle is like a pointer: refers to an underlying implementation object.
Definition: Handle.h:43
#define QMF_CLASS_EXTERN
Definition: ImportExport.h:31

Qpid C++ API Reference
Generated on Tue Oct 28 2014 for Qpid C++ Client API by doxygen 1.8.5