You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/04/26 17:06:39 UTC

svn commit: r768718 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp: StompCommandConstants.cpp StompCommandConstants.h commands/

Author: tabish
Date: Sun Apr 26 15:06:39 2009
New Revision: 768718

URL: http://svn.apache.org/viewvc?rev=768718&view=rev
Log:
Make some changes to start to add stomp support back into the code.

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.cpp
      - copied, changed from r768613, activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.h
      - copied, changed from r768613, activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.h
Removed:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/

Copied: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.cpp (from r768613, activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.cpp)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.cpp?p2=activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.cpp&p1=activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.cpp&r1=768613&r2=768718&rev=768718&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.cpp Sun Apr 26 15:06:39 2009
@@ -15,13 +15,10 @@
  * limitations under the License.
  */
 
-#include "CommandConstants.h"
+#include "StompCommandConstants.h"
 #include <stdio.h>
 #include <string.h>
 
-#include <activemq/connector/stomp/StompTopic.h>
-#include <activemq/connector/stomp/StompQueue.h>
-
 using namespace std;
 using namespace activemq;
 using namespace activemq::wireformat;
@@ -31,22 +28,22 @@
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-const char* CommandConstants::queuePrefix = "/queue/";
-const char* CommandConstants::topicPrefix = "/topic/";
+const char* StompCommandConstants::queuePrefix = "/queue/";
+const char* StompCommandConstants::topicPrefix = "/topic/";
 
 ////////////////////////////////////////////////////////////////////////////////
-string CommandConstants::StaticInitializer::stompHeaders[NUM_STOMP_HEADERS];
-string CommandConstants::StaticInitializer::commands[NUM_COMMANDS];
-string CommandConstants::StaticInitializer::ackModes[NUM_ACK_MODES];
-string CommandConstants::StaticInitializer::msgTypes[NUM_MSG_TYPES];
-map<std::string, CommandConstants::StompHeader> CommandConstants::StaticInitializer::stompHeaderMap;
-map<std::string, CommandConstants::CommandId> CommandConstants::StaticInitializer::commandMap;
-map<std::string, CommandConstants::AckMode> CommandConstants::StaticInitializer::ackModeMap;
-map<std::string, CommandConstants::MessageType> CommandConstants::StaticInitializer::msgTypeMap;
-CommandConstants::StaticInitializer CommandConstants::staticInits;
+string StompCommandConstants::StaticInitializer::stompHeaders[NUM_STOMP_HEADERS];
+string StompCommandConstants::StaticInitializer::commands[NUM_COMMANDS];
+string StompCommandConstants::StaticInitializer::ackModes[NUM_ACK_MODES];
+string StompCommandConstants::StaticInitializer::msgTypes[NUM_MSG_TYPES];
+map<std::string, StompCommandConstants::StompHeader> StompCommandConstants::StaticInitializer::stompHeaderMap;
+map<std::string, StompCommandConstants::CommandId> StompCommandConstants::StaticInitializer::commandMap;
+map<std::string, StompCommandConstants::AckMode> StompCommandConstants::StaticInitializer::ackModeMap;
+map<std::string, StompCommandConstants::MessageType> StompCommandConstants::StaticInitializer::msgTypeMap;
+StompCommandConstants::StaticInitializer StompCommandConstants::staticInits;
 
 ////////////////////////////////////////////////////////////////////////////////
-CommandConstants::StaticInitializer::StaticInitializer(){
+StompCommandConstants::StaticInitializer::StaticInitializer(){
 
     stompHeaders[HEADER_DESTINATION] = "destination";
     stompHeaders[HEADER_TRANSACTIONID] = "transaction";
@@ -120,7 +117,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-cms::Destination* CommandConstants::toDestination( const std::string& dest )
+cms::Destination* StompCommandConstants::toDestination( const std::string& dest )
     throw ( decaf::lang::exceptions::IllegalArgumentException )
 {
     std::size_t qpos = dest.find( queuePrefix );
@@ -133,7 +130,7 @@
     } else {
         throw IllegalArgumentException(
             __FILE__, __LINE__,
-            "CommandConstants::toDestination - Not a valid Stomp Dest [%s]", dest.c_str());
+            "StompCommandConstants::toDestination - Not a valid Stomp Dest [%s]", dest.c_str());
     }
 }
 

Copied: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.h (from r768613, activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.h)
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.h?p2=activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.h&p1=activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.h&r1=768613&r2=768718&rev=768718&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/commands/CommandConstants.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompCommandConstants.h Sun Apr 26 15:06:39 2009
@@ -14,8 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef _ACTIVEMQ_WIREFORMAT_STOMP_COMMANDS_COMMANDCONSTANTS_H_
-#define _ACTIVEMQ_WIREFORMAT_STOMP_COMMANDS_COMMANDCONSTANTS_H_
+#ifndef _ACTIVEMQ_WIREFORMAT_STOMP_STOMPCOMMANDCONSTANTS_H_
+#define _ACTIVEMQ_WIREFORMAT_STOMP_STOMPCOMMANDCONSTANTS_H_
 
 #include <cms/Destination.h>
 #include <activemq/util/Config.h>
@@ -87,14 +87,13 @@
             NUM_STOMP_HEADERS
         };
 
-        enum AckMode{
+        enum AckMode {
             ACK_CLIENT,
             ACK_AUTO,
             NUM_ACK_MODES
         };
 
-        enum MessageType
-        {
+        enum MessageType {
             TEXT,
             BYTES,
             NUM_MSG_TYPES