diff options
| author | Ted Ross <tross@apache.org> | 2010-01-13 11:57:19 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-01-13 11:57:19 +0000 |
| commit | 79a29f32ef84c26de35d3e75c3acff314b727f56 (patch) | |
| tree | d66d4d2a8a6cc2d9836fd1816b818a1c6e859e35 /cpp/src/qmf/engine/EventImpl.h | |
| parent | ac53f58b4387bc54b186a9ac3a8933ecce77790e (diff) | |
| download | qpid-python-79a29f32ef84c26de35d3e75c3acff314b727f56.tar.gz | |
Added raise_event support to the Ruby and Python wrapped agent APIs.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@898727 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qmf/engine/EventImpl.h')
| -rw-r--r-- | cpp/src/qmf/engine/EventImpl.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/cpp/src/qmf/engine/EventImpl.h b/cpp/src/qmf/engine/EventImpl.h new file mode 100644 index 0000000000..dfdf64e848 --- /dev/null +++ b/cpp/src/qmf/engine/EventImpl.h @@ -0,0 +1,53 @@ +#ifndef _QmfEngineEventImpl_ +#define _QmfEngineEventImpl_ + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#include <qmf/engine/Event.h> +#include <qmf/engine/Schema.h> +#include <qpid/framing/Buffer.h> +#include <boost/shared_ptr.hpp> +#include <map> + +namespace qmf { +namespace engine { + + struct EventImpl { + typedef boost::shared_ptr<Value> ValuePtr; + const SchemaEventClass* eventClass; + mutable std::map<std::string, ValuePtr> arguments; + + EventImpl(const SchemaEventClass* type); + EventImpl(const SchemaEventClass* type, qpid::framing::Buffer& buffer); + static Event* factory(const SchemaEventClass* type, qpid::framing::Buffer& buffer); + + const SchemaEventClass* getClass() const { return eventClass; } + Value* getValue(const char* key) const; + + void encodeSchemaKey(qpid::framing::Buffer& buffer) const; + void encode(qpid::framing::Buffer& buffer) const; + std::string getRoutingKey(uint32_t brokerBank, uint32_t agentBank) const; + }; + +} +} + +#endif + |
