Qpid Management Framework  0.24
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Agent.h
Go to the documentation of this file.
1 #ifndef QMF_AGENT_H
2 #define QMF_AGENT_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 #include <qmf/ImportExport.h>
25 #include "qmf/Handle.h"
26 //#include "qmf/Subscription.h"
27 #include "qmf/exceptions.h"
28 #include "qpid/messaging/Duration.h"
29 #include "qpid/types/Variant.h"
30 #include <string>
31 
32 namespace qmf {
33 
34 #ifndef SWIG
35  template <class> class PrivateImplRef;
36 #endif
37 
38  class AgentImpl;
39  class ConsoleEvent;
40  class Query;
41  class DataAddr;
42  class SchemaId;
43  class Schema;
44 
45  class QMF_CLASS_EXTERN Agent : public qmf::Handle<AgentImpl> {
46  public:
47  QMF_EXTERN Agent(AgentImpl* impl = 0);
48  QMF_EXTERN Agent(const Agent&);
49  QMF_EXTERN Agent& operator=(const Agent&);
50  QMF_EXTERN ~Agent();
51 
52  QMF_EXTERN std::string getName() const;
53  QMF_EXTERN uint32_t getEpoch() const;
54  QMF_EXTERN std::string getVendor() const;
55  QMF_EXTERN std::string getProduct() const;
56  QMF_EXTERN std::string getInstance() const;
57  QMF_EXTERN const qpid::types::Variant& getAttribute(const std::string&) const;
58  QMF_EXTERN const qpid::types::Variant::Map& getAttributes() const;
59 
60  QMF_EXTERN ConsoleEvent query(const Query&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
61  QMF_EXTERN ConsoleEvent query(const std::string&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
62  QMF_EXTERN uint32_t queryAsync(const Query&);
63  QMF_EXTERN uint32_t queryAsync(const std::string&);
64 
68  //QMF_EXTERN Subscription subscribe(const Query&, const std::string& options = "");
69  //QMF_EXTERN Subscription subscribe(const std::string&, const std::string& options = "");
70 
71  QMF_EXTERN ConsoleEvent callMethod(const std::string&, const qpid::types::Variant::Map&, const DataAddr&,
72  qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
73  QMF_EXTERN uint32_t callMethodAsync(const std::string&, const qpid::types::Variant::Map&, const DataAddr&);
74 
85  QMF_EXTERN ConsoleEvent querySchema(qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
86  QMF_EXTERN uint32_t querySchemaAsync();
87 
98  QMF_EXTERN uint32_t getPackageCount() const;
99  QMF_EXTERN const std::string& getPackage(uint32_t) const;
100 
111  QMF_EXTERN uint32_t getSchemaIdCount(const std::string&) const;
112  QMF_EXTERN SchemaId getSchemaId(const std::string&, uint32_t) const;
113 
121  QMF_EXTERN Schema getSchema(const SchemaId&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
122 
123 
124 #ifndef SWIG
125  private:
126  friend class qmf::PrivateImplRef<Agent>;
127  friend struct AgentImplAccess;
128 #endif
129  };
130 
131 }
132 
133 #endif