From commits-return-4569-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Mon Feb 05 15:11:41 2007 Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 82064 invoked from network); 5 Feb 2007 15:11:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2007 15:11:41 -0000 Received: (qmail 21483 invoked by uid 500); 5 Feb 2007 15:11:47 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 21462 invoked by uid 500); 5 Feb 2007 15:11:47 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 21448 invoked by uid 99); 5 Feb 2007 15:11:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Feb 2007 07:11:47 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Feb 2007 07:11:40 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id D4D611A981A; Mon, 5 Feb 2007 07:11:19 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r503716 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/connector/openwire/commands/ main/cms/ test/activemq/connector/openwire/commands/ Date: Mon, 05 Feb 2007 15:11:19 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070205151119.D4D611A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Mon Feb 5 07:11:17 2007 New Revision: 503716 URL: http://svn.apache.org/viewvc?view=rev&rev=503716 Log: http://issues.apache.org/activemq/browse/AMQCPP-30 Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp?view=diff&rev=503716&r1=503715&r2=503716 ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.cpp Mon Feb 5 07:11:17 2007 @@ -179,11 +179,11 @@ } //////////////////////////////////////////////////////////////////////////////// -const unsigned char* ActiveMQMapMessage::getBytes( const std::string& name ) const +std::vector ActiveMQMapMessage::getBytes( const std::string& name ) const throw( cms::CMSException ) { try{ - return NULL; // TODO getMap().getByteArray( name ); + return getMap().getByteArray( name ); } AMQ_CATCH_RETHROW( exceptions::ActiveMQException ) AMQ_CATCHALL_THROW( exceptions::ActiveMQException ) Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h?view=diff&rev=503716&r1=503715&r2=503716 ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMapMessage.h Mon Feb 5 07:11:17 2007 @@ -154,7 +154,7 @@ * @param name of the value to fetch from the map * @throws CMSException */ - virtual const unsigned char* getBytes( const std::string& name ) const + virtual std::vector getBytes( const std::string& name ) const throw( cms::CMSException ); /** Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h?view=diff&rev=503716&r1=503715&r2=503716 ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/MapMessage.h Mon Feb 5 07:11:17 2007 @@ -97,7 +97,7 @@ * @param name of the value to fetch from the map * @throws CMSException */ - virtual const unsigned char* getBytes( const std::string& name ) const + virtual std::vector getBytes( const std::string& name ) const throw( CMSException ) = 0; /** Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp?view=diff&rev=503716&r1=503715&r2=503716 ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp Mon Feb 5 07:11:17 2007 @@ -39,6 +39,14 @@ CPPUNIT_ASSERT( myMessage.getMapNames().size() == 0 ); CPPUNIT_ASSERT( myMessage.itemExists( "Something" ) == false ); + std::vector data; + + data.push_back( 2 ); + data.push_back( 4 ); + data.push_back( 8 ); + data.push_back( 16 ); + data.push_back( 32 ); + myMessage.setBoolean( "boolean", false ); myMessage.setByte( "byte", 127 ); myMessage.setChar( "char", 'a' ); @@ -47,6 +55,7 @@ myMessage.setLong( "long", 0xFFFAAA33345LL ); myMessage.setFloat( "float", 0.000012f ); myMessage.setDouble( "double", 64.54654 ); + myMessage.setBytes( "bytes", data ); CPPUNIT_ASSERT( myMessage.getBoolean( "boolean" ) == false ); CPPUNIT_ASSERT( myMessage.getByte( "byte" ) == 127 ); @@ -56,4 +65,5 @@ CPPUNIT_ASSERT( myMessage.getLong( "long" ) == 0xFFFAAA33345LL ); CPPUNIT_ASSERT( myMessage.getFloat( "float" ) == 0.000012f ); CPPUNIT_ASSERT( myMessage.getDouble( "double" ) == 64.54654 ); + CPPUNIT_ASSERT( myMessage.getBytes( "bytes" ) == data ); }