Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
00001 #ifndef QMF_AGENT_EVENT_H 00002 #define QMF_AGENT_EVENT_H 00003 /* 00004 * 00005 * Licensed to the Apache Software Foundation (ASF) under one 00006 * or more contributor license agreements. See the NOTICE file 00007 * distributed with this work for additional information 00008 * regarding copyright ownership. The ASF licenses this file 00009 * to you under the Apache License, Version 2.0 (the 00010 * "License"); you may not use this file except in compliance 00011 * with the License. You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, 00016 * software distributed under the License is distributed on an 00017 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00018 * KIND, either express or implied. See the License for the 00019 * specific language governing permissions and limitations 00020 * under the License. 00021 * 00022 */ 00023 00024 #if !defined(QMF_USE_DEPRECATED_API) && !defined(qmf2_EXPORTS) && !defined(SWIG) 00025 # error "The API defined in this file has been DEPRECATED and will be removed in the future." 00026 # error "Define 'QMF_USE_DEPRECATED_API' to enable continued use of the API." 00027 #endif 00028 00029 #include <qmf/ImportExport.h> 00030 #include "qmf/Handle.h" 00031 #include "qpid/types/Variant.h" 00032 00033 namespace qmf { 00034 00035 #ifndef SWIG 00036 template <class> class PrivateImplRef; 00037 #endif 00038 00039 class AgentEventImpl; 00040 class Query; 00041 class DataAddr; 00042 00043 enum AgentEventCode { 00044 AGENT_AUTH_QUERY = 1, 00045 AGENT_AUTH_SUBSCRIBE = 2, 00046 AGENT_QUERY = 3, 00047 AGENT_METHOD = 4, 00048 AGENT_SUBSCRIBE_BEGIN = 5, 00049 AGENT_SUBSCRIBE_TOUCH = 6, 00050 AGENT_SUBSCRIBE_END = 7, 00051 AGENT_THREAD_FAILED = 8 00052 }; 00053 00054 class QMF_CLASS_EXTERN AgentEvent : public qmf::Handle<AgentEventImpl> { 00055 public: 00056 QMF_EXTERN AgentEvent(AgentEventImpl* impl = 0); 00057 QMF_EXTERN AgentEvent(const AgentEvent&); 00058 QMF_EXTERN AgentEvent& operator=(const AgentEvent&); 00059 QMF_EXTERN ~AgentEvent(); 00060 00061 QMF_EXTERN AgentEventCode getType() const; 00062 QMF_EXTERN const std::string& getUserId() const; 00063 QMF_EXTERN Query getQuery() const; 00064 QMF_EXTERN bool hasDataAddr() const; 00065 QMF_EXTERN DataAddr getDataAddr() const; 00066 QMF_EXTERN const std::string& getMethodName() const; 00067 QMF_EXTERN qpid::types::Variant::Map& getArguments(); 00068 QMF_EXTERN qpid::types::Variant::Map& getArgumentSubtypes(); 00069 QMF_EXTERN void addReturnArgument(const std::string&, const qpid::types::Variant&, const std::string& st=""); 00070 00071 #ifndef SWIG 00072 private: 00073 friend class qmf::PrivateImplRef<AgentEvent>; 00074 friend struct AgentEventImplAccess; 00075 #endif 00076 }; 00077 } 00078 00079 #endif