You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2006/12/11 19:02:51 UTC

svn commit: r485780 - in /incubator/qpid/trunk/qpid/cpp/lib/common: Makefile.am framing/Buffer.cpp framing/Buffer.h framing/Content.cpp framing/Content.h

Author: kpvdr
Date: Mon Dec 11 10:02:50 2006
New Revision: 485780

URL: http://svn.apache.org/viewvc?view=rev&rev=485780
Log:
Added new Content class and other methods in Buffer to support the new transport in AMQP 0-9. This will allow the code produced by the code generator for 0-9 to compile.

Added:
    incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.cpp
    incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.h
Modified:
    incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am
    incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.cpp
    incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.h

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=485780&r1=485779&r2=485780
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/Makefile.am Mon Dec 11 10:02:50 2006
@@ -71,6 +71,8 @@
   $(framing)/BodyHandler.h			\
   $(framing)/Buffer.cpp				\
   $(framing)/Buffer.h				\
+  $(framing)/Content.cpp			\
+  $(framing)/Content.h			\
   $(framing)/FieldTable.cpp			\
   $(framing)/FieldTable.h			\
   $(framing)/HeaderProperties.h			\

Modified: incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.cpp?view=diff&rev=485780&r1=485779&r2=485780
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.cpp Mon Dec 11 10:02:50 2006
@@ -19,6 +19,7 @@
  *
  */
 #include <Buffer.h>
+#include <Content.h> 
 #include <FieldTable.h> 
 
 qpid::framing::Buffer::Buffer(u_int32_t _size) : size(_size), owner(true), position(0), limit(_size){
@@ -160,6 +161,14 @@
 
 void qpid::framing::Buffer::getFieldTable(FieldTable& t){
     t.decode(*this);
+}
+
+void qpid::framing::Buffer::putContent(const Content& c){
+    c.encode(*this);
+}
+
+void qpid::framing::Buffer::getContent(Content& c){
+    c.decode(*this);
 }
 
 void qpid::framing::Buffer::putRawData(const string& s){

Modified: incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.h?view=diff&rev=485780&r1=485779&r2=485780
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.h (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/framing/Buffer.h Mon Dec 11 10:02:50 2006
@@ -26,6 +26,7 @@
 namespace qpid {
 namespace framing {
 
+class Content;
 class FieldTable;
 
 class Buffer
@@ -70,6 +71,9 @@
 
     void putFieldTable(const FieldTable& t);
     void getFieldTable(FieldTable& t);
+
+    void putContent(const Content& c);
+    void getContent(Content& c);
 
     void putRawData(const string& s);
     void getRawData(string& s, u_int32_t size);

Added: incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.cpp?view=auto&rev=485780
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.cpp (added)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.cpp Mon Dec 11 10:02:50 2006
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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 <Buffer.h>
+#include <Content.h> 
+
+namespace qpid
+{
+namespace framing
+{
+
+Content::~Content() {}
+  
+void Content::encode(Buffer&) const
+{
+}
+
+void Content::decode(Buffer&)
+{
+}
+
+
+} // namespace framing
+} // namespace qpid

Added: incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.h?view=auto&rev=485780
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.h (added)
+++ incubator/qpid/trunk/qpid/cpp/lib/common/framing/Content.h Mon Dec 11 10:02:50 2006
@@ -0,0 +1,47 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+#ifndef _Content_
+#define _Content_
+
+namespace qpid
+{
+namespace framing
+{
+
+/*
+ * TODO: New Content class required for AMQP 0-9. This is a stub only.
+ */
+class Content
+{
+  public:
+    ~Content();
+  
+    void encode(Buffer& buffer) const;
+    void decode(Buffer& buffer);
+          
+};    
+        
+} // namespace framing
+} // namespace qpid
+
+
+#endif