Author: kpvdr
Date: Mon Dec 18 07:37:14 2006
New Revision: 488304
URL: http://svn.apache.org/viewvc?view=rev&rev=488304
Log:
Added additional files AMQP_HighestVersion.h/.cpp to identify the highest
available version for client use.
Added:
incubator/qpid/trunk/qpid/cpp/lib/common/framing/AMQP_HighestVersion.h
incubator/qpid/trunk/qpid/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl
Modified:
incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am
incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java
incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/Main.java
Modified: incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am?view=diff&rev=488304&r1=488303&r2=488304
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am Mon Dec 18 07:37:14
2006
@@ -72,6 +72,7 @@
$(framing)/ProtocolVersionException.cpp \
$(framing)/Value.cpp \
$(gen)/AMQP_ClientProxy.cpp \
+ $(gen)/AMQP_HighestVersion.cpp \
$(gen)/AMQP_MethodVersionMap.cpp \
$(gen)/AMQP_ServerProxy.cpp \
Exception.cpp \
@@ -104,6 +105,7 @@
$(framing)/Value.h \
$(framing)/amqp_framing.h \
$(framing)/amqp_types.h \
+ $(framing)/AMQP_HighestVersion.h \
Exception.h \
ExceptionHolder.h \
QpidError.h \
Added: incubator/qpid/trunk/qpid/cpp/lib/common/framing/AMQP_HighestVersion.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/framing/AMQP_HighestVersion.h?view=auto&rev=488304
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/framing/AMQP_HighestVersion.h
(added)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/framing/AMQP_HighestVersion.h Mon
Dec 18 07:37:14 2006
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+/*
+ * This file is auto-generated by Qpid Gentools v.0.1 - do not modify.
+ * Supported AMQP versions:
+ * 0-9
+ * 0-10
+ * 8-0
+ */
+
+
+#ifndef _AMQP_HighestVersion_
+#define _AMQP_HighestVersion_
+
+#include <ProtocolVersion.h>
+
+
+namespace qpid {
+namespace framing {
+
+static ProtocolVersion highestProtocolVersion;
+
+} /* namespace framing */
+} /* namespace qpid */
+
+#endif
Modified:
incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java?view=diff&rev=488304&r1=488303&r2=488304
==============================================================================
---
incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java
(original)
+++
incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/CppGenerator.java
Mon Dec 18 07:37:14 2006
@@ -348,6 +348,10 @@
return generateServerOperationsInvoke(thisClass, method, version,
4, 4);
if (token.compareTo("${mb_buffer_param}") == 0)
return method.fieldMap.size() > 0 ? " buffer" : "";
+ if (token.compareTo("${hv_latest_major}") == 0)
+ return String.valueOf(globalVersionSet.last().getMajor());
+ if (token.compareTo("${hv_latest_minor}") == 0)
+ return String.valueOf(globalVersionSet.last().getMinor());
throw new AmqpTemplateException("Template token " + token + "
unknown.");
}
Modified:
incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/Main.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/Main.java?view=diff&rev=488304&r1=488303&r2=488304
==============================================================================
--- incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/Main.java
(original)
+++ incubator/qpid/trunk/qpid/gentools/src/org/apache/qpid/gentools/Main.java
Mon Dec 18 07:37:14 2006
@@ -201,7 +201,8 @@
new File(tmplDir + Utils.fileSeparator +
"AMQP_ClientProxy.cpp.tmpl"),
new File(tmplDir + Utils.fileSeparator + "AMQP_Constants.h.tmpl"),
new File(tmplDir + Utils.fileSeparator +
"AMQP_MethodVersionMap.h.tmpl"),
- new File(tmplDir + Utils.fileSeparator +
"AMQP_MethodVersionMap.cpp.tmpl")
+ new File(tmplDir + Utils.fileSeparator +
"AMQP_MethodVersionMap.cpp.tmpl"),
+ new File(tmplDir + Utils.fileSeparator +
"AMQP_HighestVersion.cpp.tmpl")
};
methodTemplateFiles = new File[]
{
Added: incubator/qpid/trunk/qpid/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl?view=auto&rev=488304
==============================================================================
--- incubator/qpid/trunk/qpid/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl
(added)
+++ incubator/qpid/trunk/qpid/gentools/templ.cpp/AMQP_HighestVersion.cpp.tmpl
Mon Dec 18 07:37:14 2006
@@ -0,0 +1,31 @@
+&{AMQP_HighestVersion.cpp}
+/*
+ *
+ * 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.
+ *
+ */
+
+/*
+ * This file is auto-generated by ${GENERATOR} - do not modify.
+ * Supported AMQP versions:
+%{VLIST} * ${major}-${minor}
+ */
+
+#include <AMQP_HighestVersion.h>
+
+qpid::framing::ProtocolVersion highestProtocolVersion(${hv_latest_major},
${hv_latest_minor});