From b1cd22ae277d9a987d37e2538aded2f3521bc362 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Mon, 10 Jan 2011 14:06:16 +0000 Subject: Updates to the C++ implementation of QMFv2: 1) Consolidated string constants for the protocol into a definition file. 2) Added hooks for subscription handling. 3) Added checks to validate properties and arguments against the schema (if there is a schema). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1057199 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qmf/Subscription.cpp | 88 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 qpid/cpp/src/qmf/Subscription.cpp (limited to 'qpid/cpp/src/qmf/Subscription.cpp') diff --git a/qpid/cpp/src/qmf/Subscription.cpp b/qpid/cpp/src/qmf/Subscription.cpp new file mode 100644 index 0000000000..73afc8c79d --- /dev/null +++ b/qpid/cpp/src/qmf/Subscription.cpp @@ -0,0 +1,88 @@ +/* + * + * 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/PrivateImplRef.h" +#include "qmf/exceptions.h" +#include "qmf/SubscriptionImpl.h" +#include "qmf/DataImpl.h" + +using namespace std; +using namespace qmf; +using qpid::types::Variant; + +typedef PrivateImplRef PI; + +Subscription::Subscription(SubscriptionImpl* impl) { PI::ctor(*this, impl); } +Subscription::Subscription(const Subscription& s) : qmf::Handle() { PI::copy(*this, s); } +Subscription::~Subscription() { PI::dtor(*this); } +Subscription& Subscription::operator=(const Subscription& s) { return PI::assign(*this, s); } + +void Subscription::cancel() { impl->cancel(); } +bool Subscription::isActive() const { return impl->isActive(); } +void Subscription::lock() { impl->lock(); } +void Subscription::unlock() { impl->unlock(); } +uint32_t Subscription::getDataCount() const { return impl->getDataCount(); } +Data Subscription::getData(uint32_t i) const { return impl->getData(i); } + + +void SubscriptionImpl::cancel() +{ +} + + +bool SubscriptionImpl::isActive() const +{ + return false; +} + + +void SubscriptionImpl::lock() +{ +} + + +void SubscriptionImpl::unlock() +{ +} + + +uint32_t SubscriptionImpl::getDataCount() const +{ + return 0; +} + + +Data SubscriptionImpl::getData(uint32_t) const +{ + return Data(); +} + + +SubscriptionImpl& SubscriptionImplAccess::get(Subscription& item) +{ + return *item.impl; +} + + +const SubscriptionImpl& SubscriptionImplAccess::get(const Subscription& item) +{ + return *item.impl; +} -- cgit v1.2.1