activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r419371 [9/10] - in /incubator/activemq/trunk/openwire-cpp/src/main/cpp: activemq/ activemq/command/ activemq/protocol/ activemq/protocol/openwire/ activemq/transport/ activemq/transport/tcp/ cms/ ppr/ ppr/io/ ppr/io/encoding/ ppr/net/ ppr/...
Date Wed, 05 Jul 2006 22:36:42 GMT
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp Wed Jul  5 15:36:36 2006
@@ -1,53 +1,53 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_IOException_hpp_
-#define Ppr_IOException_hpp_
-
-#include "ppr/TraceException.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace apache::ppr;
-      using namespace std ;
-
-/*
- * Signals that an I/O exception of some sort has occurred.
- */
-class IOException : public TraceException
-{
-public:
-    IOException() : TraceException()
-    { /* no-op */ } ;
-    IOException(const char* msg, ...)
-    {
-        va_list vargs ;
-
-        va_start(vargs, msg) ;
-        TraceException::buildMessage(msg, vargs) ;
-    }
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IOException_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_IOException_hpp_
+#define Ppr_IOException_hpp_
+
+#include "ppr/TraceException.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace apache::ppr;
+      using namespace std ;
+
+/*
+ * Signals that an I/O exception of some sort has occurred.
+ */
+class IOException : public TraceException
+{
+public:
+    IOException() : TraceException()
+    { /* no-op */ } ;
+    IOException(const char* msg, ...)
+    {
+        va_list vargs ;
+
+        va_start(vargs, msg) ;
+        TraceException::buildMessage(msg, vargs) ;
+    }
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IOException_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOException.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp Wed Jul  5 15:36:36 2006
@@ -1,57 +1,57 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_IOutputStream_hpp_
-#define Ppr_IOutputStream_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace std;
-      using namespace ifr;
-
-/*
- * The IOutputStream interface provides for converting data from any of the
- * C++ primitive types to a series of bytes and writing these bytes to
- * a binary stream. Strings are written as raw bytes, no character
- * encoding is performed. If a byte cannot be written for any reason,
- * an IOException is thrown. 
- */
-struct IOutputStream : Interface
-{
-    virtual void close() throw(IOException) = 0 ;
-    virtual void flush() throw(IOException) = 0 ;
-    virtual int write(const char* buffer, int offset, int length) throw(IOException) = 0 ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IOutputStream_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_IOutputStream_hpp_
+#define Ppr_IOutputStream_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace std;
+      using namespace ifr;
+
+/*
+ * The IOutputStream interface provides for converting data from any of the
+ * C++ primitive types to a series of bytes and writing these bytes to
+ * a binary stream. Strings are written as raw bytes, no character
+ * encoding is performed. If a byte cannot be written for any reason,
+ * an IOException is thrown. 
+ */
+struct IOutputStream : Interface
+{
+    virtual void close() throw(IOException) = 0 ;
+    virtual void flush() throw(IOException) = 0 ;
+    virtual int write(const char* buffer, int offset, int length) throw(IOException) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IOutputStream_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/IOutputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp Wed Jul  5 15:36:36 2006
@@ -1,57 +1,57 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_SocketInputStream_hpp_
-#define Ppr_SocketInputStream_hpp_
-
-#include "ppr/io/IInputStream.hpp"
-#include "ppr/net/ISocket.hpp"
-#include "ppr/net/SocketException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace ifr ;
-      using namespace apache::ppr::net ;
-
-/*
- * SocketInputStream reads primitive C++ data types from a
- * socket stream. It currently uses PPR sockets for
- * platform independency.
- */
-class SocketInputStream : public IInputStream
-{
-private:
-    p<ISocket> socket ;
-
-public:
-    SocketInputStream(p<ISocket> socket) ;
-    virtual ~SocketInputStream() ;
-
-    virtual void close() throw(IOException) ;
-    virtual int read(char* buffer, int offset, int length) throw(IOException) ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_SocketInputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_SocketInputStream_hpp_
+#define Ppr_SocketInputStream_hpp_
+
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/net/ISocket.hpp"
+#include "ppr/net/SocketException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace ifr ;
+      using namespace apache::ppr::net ;
+
+/*
+ * SocketInputStream reads primitive C++ data types from a
+ * socket stream. It currently uses PPR sockets for
+ * platform independency.
+ */
+class SocketInputStream : public IInputStream
+{
+private:
+    p<ISocket> socket ;
+
+public:
+    SocketInputStream(p<ISocket> socket) ;
+    virtual ~SocketInputStream() ;
+
+    virtual void close() throw(IOException) ;
+    virtual int read(char* buffer, int offset, int length) throw(IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_SocketInputStream_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketInputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp Wed Jul  5 15:36:36 2006
@@ -1,58 +1,58 @@
-/* 
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_SocketOutputStream_hpp_
-#define Ppr_SocketOutputStream_hpp_
-
-#include "ppr/io/IOutputStream.hpp"
-#include "ppr/net/ISocket.hpp"
-#include "ppr/net/SocketException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      using namespace ifr ;
-      using namespace apache::ppr::net ;
-
-/*
- * SocketOutputStream writes primitive C++ data types to a
- * socket stream. It currently uses PPR sockets for
- * platform independency.
- */
-class SocketOutputStream : public IOutputStream
-{
-private:
-    p<ISocket> socket ;
-
-public:
-    SocketOutputStream(p<ISocket> socket) ;
-    virtual ~SocketOutputStream() ;
-
-    virtual void close() throw(IOException) ;
-    virtual void flush() throw(IOException) ;
-    virtual int write(const char* buffer, int offset, int length) throw(IOException) ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_SocketOutputStream_hpp_*/
+/* 
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_SocketOutputStream_hpp_
+#define Ppr_SocketOutputStream_hpp_
+
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/net/ISocket.hpp"
+#include "ppr/net/SocketException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      using namespace ifr ;
+      using namespace apache::ppr::net ;
+
+/*
+ * SocketOutputStream writes primitive C++ data types to a
+ * socket stream. It currently uses PPR sockets for
+ * platform independency.
+ */
+class SocketOutputStream : public IOutputStream
+{
+private:
+    p<ISocket> socket ;
+
+public:
+    SocketOutputStream(p<ISocket> socket) ;
+    virtual ~SocketOutputStream() ;
+
+    virtual void close() throw(IOException) ;
+    virtual void flush() throw(IOException) ;
+    virtual int write(const char* buffer, int offset, int length) throw(IOException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_SocketOutputStream_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/SocketOutputStream.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/AsciiToUTF8Encoder.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/AsciiToUTF8Encoder.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/AsciiToUTF8Encoder.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/AsciiToUTF8Encoder.hpp Wed Jul  5 15:36:36 2006
@@ -1,64 +1,64 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_AsciiToUTF8Encoder_hpp_
-#define Ppr_AsciiToUTF8Encoder_hpp_
-
-#include <string>
-#include <ppr/io/ByteArrayOutputStream.hpp>
-#include <ppr/io/encoding/ICharsetEncoder.hpp>
-#include <ppr/io/encoding/CharsetEncodingException.hpp>
-#include <ppr/util/ifr/array>
-#include <ppr/util/ifr/p>
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      namespace encoding
-      {
-        using namespace std;
-        using namespace ifr;
-        using namespace ppr::io ;
-
-/*
- * Character encoder for extended ASCII to modified UTF-8 encoding.
- */
-class AsciiToUTF8Encoder : public ICharsetEncoder
-{
-private:
-
-public:
-    static const char* NAME ;
-
-public:
-    AsciiToUTF8Encoder() ;
-    virtual ~AsciiToUTF8Encoder() ;
-
-    virtual int length(p<string> str) ;
-    virtual p<string> encode(p<string> str, int *enclen) throw (CharsetEncodingException) ;
-    virtual p<string> decode(p<string> str) throw (CharsetEncodingException) ;
-} ;
-
-/* namespace */
-      }
-    }
-  }
-}
-
-#endif /*Ppr_AsciiToUTF8Encoder_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_AsciiToUTF8Encoder_hpp_
+#define Ppr_AsciiToUTF8Encoder_hpp_
+
+#include <string>
+#include <ppr/io/ByteArrayOutputStream.hpp>
+#include <ppr/io/encoding/ICharsetEncoder.hpp>
+#include <ppr/io/encoding/CharsetEncodingException.hpp>
+#include <ppr/util/ifr/array>
+#include <ppr/util/ifr/p>
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      namespace encoding
+      {
+        using namespace std;
+        using namespace ifr;
+        using namespace ppr::io ;
+
+/*
+ * Character encoder for extended ASCII to modified UTF-8 encoding.
+ */
+class AsciiToUTF8Encoder : public ICharsetEncoder
+{
+private:
+
+public:
+    static const char* NAME ;
+
+public:
+    AsciiToUTF8Encoder() ;
+    virtual ~AsciiToUTF8Encoder() ;
+
+    virtual int length(p<string> str) ;
+    virtual p<string> encode(p<string> str, int *enclen) throw (CharsetEncodingException) ;
+    virtual p<string> decode(p<string> str) throw (CharsetEncodingException) ;
+} ;
+
+/* namespace */
+      }
+    }
+  }
+}
+
+#endif /*Ppr_AsciiToUTF8Encoder_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/AsciiToUTF8Encoder.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncoderRegistry.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncoderRegistry.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncoderRegistry.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncoderRegistry.hpp Wed Jul  5 15:36:36 2006
@@ -1,88 +1,88 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_CharsetEncoderRegistry_hpp_
-#define Ppr_CharsetEncoderRegistry_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include <map>
-#include "ppr/io/encoding/ICharsetEncoder.hpp"
-#include "ppr/IllegalArgumentException.hpp"
-#include "ppr/io/encoding/AsciiToUTF8Encoder.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      namespace encoding
-      {
-        using namespace ifr ;
-        using namespace std ;
-        using namespace apache::ppr ;
-
-/*
- * The character set encoder registry maintains all available
- * encoders/decoders.
- */
-class CharsetEncoderRegistry
-{
-private:
-    static map<string, p<ICharsetEncoder> > encoders ;
-
-public:
-    // Name of the default encoder
-    static const char* DEFAULT ;
-
-protected:
-    CharsetEncoderRegistry() ;
-
-public:
-    virtual ~CharsetEncoderRegistry() ;
-
-	static p<ICharsetEncoder> getEncoder() ;
-	static p<ICharsetEncoder> getEncoder(const char* name) ;
-
-	static void addEncoder(const char* name, p<ICharsetEncoder> encoder) throw(IllegalArgumentException) ;
-	static void removeEncoder(const char* name) throw(IllegalArgumentException) ;
-
-    class MapInitializer
-    {
-    public:
-        MapInitializer() 
-        {
-            // Add the default set of encoders
-            CharsetEncoderRegistry::addEncoder(AsciiToUTF8Encoder::NAME, new AsciiToUTF8Encoder() ) ;
-        }
-    } ;
-
-    friend class CharsetEncoderRegistry::MapInitializer ;
-} ;
-
-/* namespace */
-      }
-    }
-  }
-}
-
-#endif /*Ppr_CharsetEncoderRegistry_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_CharsetEncoderRegistry_hpp_
+#define Ppr_CharsetEncoderRegistry_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include <map>
+#include "ppr/io/encoding/ICharsetEncoder.hpp"
+#include "ppr/IllegalArgumentException.hpp"
+#include "ppr/io/encoding/AsciiToUTF8Encoder.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      namespace encoding
+      {
+        using namespace ifr ;
+        using namespace std ;
+        using namespace apache::ppr ;
+
+/*
+ * The character set encoder registry maintains all available
+ * encoders/decoders.
+ */
+class CharsetEncoderRegistry
+{
+private:
+    static map<string, p<ICharsetEncoder> > encoders ;
+
+public:
+    // Name of the default encoder
+    static const char* DEFAULT ;
+
+protected:
+    CharsetEncoderRegistry() ;
+
+public:
+    virtual ~CharsetEncoderRegistry() ;
+
+	static p<ICharsetEncoder> getEncoder() ;
+	static p<ICharsetEncoder> getEncoder(const char* name) ;
+
+	static void addEncoder(const char* name, p<ICharsetEncoder> encoder) throw(IllegalArgumentException) ;
+	static void removeEncoder(const char* name) throw(IllegalArgumentException) ;
+
+    class MapInitializer
+    {
+    public:
+        MapInitializer() 
+        {
+            // Add the default set of encoders
+            CharsetEncoderRegistry::addEncoder(AsciiToUTF8Encoder::NAME, new AsciiToUTF8Encoder() ) ;
+        }
+    } ;
+
+    friend class CharsetEncoderRegistry::MapInitializer ;
+} ;
+
+/* namespace */
+      }
+    }
+  }
+}
+
+#endif /*Ppr_CharsetEncoderRegistry_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncoderRegistry.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncodingException.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncodingException.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncodingException.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncodingException.hpp Wed Jul  5 15:36:36 2006
@@ -1,45 +1,45 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_CharsetEncodingException_hpp_
-#define Ppr_CharsetEncodingException_hpp_
-
-#include "ppr/TraceException.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-
-/*
- * Signals that a character encoding or decoding error has occurred.
- */
-class CharsetEncodingException : public TraceException
-{
-public:
-    CharsetEncodingException() : TraceException()
-       { /* no-op */ } ;
-    CharsetEncodingException(const char *const& msg) : TraceException(msg)
-       { /* no-op */ } ;
-    CharsetEncodingException(const char* fileName, int lineNo, const char* msg) : TraceException(msg)
-       { /* no-op */ } ;
-} ;
-
-/* namespace */
-  }
-}
-
-#endif /*Ppr_CharsetEncodingException_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_CharsetEncodingException_hpp_
+#define Ppr_CharsetEncodingException_hpp_
+
+#include "ppr/TraceException.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+
+/*
+ * Signals that a character encoding or decoding error has occurred.
+ */
+class CharsetEncodingException : public TraceException
+{
+public:
+    CharsetEncodingException() : TraceException()
+       { /* no-op */ } ;
+    CharsetEncodingException(const char *const& msg) : TraceException(msg)
+       { /* no-op */ } ;
+    CharsetEncodingException(const char* fileName, int lineNo, const char* msg) : TraceException(msg)
+       { /* no-op */ } ;
+} ;
+
+/* namespace */
+  }
+}
+
+#endif /*Ppr_CharsetEncodingException_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/CharsetEncodingException.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/ICharsetEncoder.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/ICharsetEncoder.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/ICharsetEncoder.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/ICharsetEncoder.hpp Wed Jul  5 15:36:36 2006
@@ -1,53 +1,53 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_ICharsetEncoder_hpp_
-#define Ppr_ICharsetEncoder_hpp_
-
-#include <string>
-#include <ppr/io/encoding/CharsetEncodingException.hpp>
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace io
-    {
-      namespace encoding
-      {
-        using namespace ifr ;
-        using namespace std ;
-
-/*
- * The ICharsetEncoder interface should be implemented by any class
- * intended to be a character set encoder/decoder.
- */
-struct ICharsetEncoder : Interface
-{
-    virtual int length(p<string> str) = 0 ;
-    virtual p<string> encode(p<string> str, int *enclen) throw (CharsetEncodingException) = 0 ;
-    virtual p<string> decode(p<string> str) throw (CharsetEncodingException) = 0 ;
-} ;
-
-/* namespace */
-      }
-    }
-  }
-}
-
-#endif /*Ppr_ICharsetEncoder_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_ICharsetEncoder_hpp_
+#define Ppr_ICharsetEncoder_hpp_
+
+#include <string>
+#include <ppr/io/encoding/CharsetEncodingException.hpp>
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace io
+    {
+      namespace encoding
+      {
+        using namespace ifr ;
+        using namespace std ;
+
+/*
+ * The ICharsetEncoder interface should be implemented by any class
+ * intended to be a character set encoder/decoder.
+ */
+struct ICharsetEncoder : Interface
+{
+    virtual int length(p<string> str) = 0 ;
+    virtual p<string> encode(p<string> str, int *enclen) throw (CharsetEncodingException) = 0 ;
+    virtual p<string> decode(p<string> str) throw (CharsetEncodingException) = 0 ;
+} ;
+
+/* namespace */
+      }
+    }
+  }
+}
+
+#endif /*Ppr_ICharsetEncoder_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/io/encoding/ICharsetEncoder.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp Wed Jul  5 15:36:36 2006
@@ -1,69 +1,69 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_IServerSocket_hpp_
-#define Ppr_IServerSocket_hpp_
-
-#include "ppr/net/ISocket.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-struct IServerSocket : Interface
-{
-    /** Bind and listen to given IP/dns and port.
-        @param host IP address or host name.
-        @param port TCP port between 1..655535
-    */
-    virtual void bind(const char* host, int port) throw (SocketException) = 0 ;
-
-    /** Bind and listen to given IP/dns and port.
-        @param host IP address or host name.
-        @param port TCP port between 1..655535
-        @param backlog Size of listen backlog.
-    */
-    virtual void bind(const char* host, int port, int backlog) throw (SocketException) = 0 ;
-
-    /** Blocks until a client connects to the bound socket.
-        @return new socket. Never returns NULL.
-    */
-    virtual p<ISocket> accept() throw (SocketException) = 0 ;
-
-    /** Closes the server socket.
-    */
-    virtual void close() = 0 ;
-
-    /** @return true of the server socket is bound.
-    */ 
-    virtual bool isBound() const = 0 ;
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IServerSocket_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_IServerSocket_hpp_
+#define Ppr_IServerSocket_hpp_
+
+#include "ppr/net/ISocket.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+struct IServerSocket : Interface
+{
+    /** Bind and listen to given IP/dns and port.
+        @param host IP address or host name.
+        @param port TCP port between 1..655535
+    */
+    virtual void bind(const char* host, int port) throw (SocketException) = 0 ;
+
+    /** Bind and listen to given IP/dns and port.
+        @param host IP address or host name.
+        @param port TCP port between 1..655535
+        @param backlog Size of listen backlog.
+    */
+    virtual void bind(const char* host, int port, int backlog) throw (SocketException) = 0 ;
+
+    /** Blocks until a client connects to the bound socket.
+        @return new socket. Never returns NULL.
+    */
+    virtual p<ISocket> accept() throw (SocketException) = 0 ;
+
+    /** Closes the server socket.
+    */
+    virtual void close() = 0 ;
+
+    /** @return true of the server socket is bound.
+    */ 
+    virtual bool isBound() const = 0 ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IServerSocket_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocket.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp Wed Jul  5 15:36:36 2006
@@ -1,46 +1,46 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_IServerSocketFactory_hpp_
-#define Ppr_IServerSocketFactory_hpp_
-
-#include "ppr/net/IServerSocket.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-struct IServerSocketFactory : Interface
-{
-    // Creates an unbound server socket, ready to call bind() on.
-    virtual p<IServerSocket> createServerSocket() = 0 ;
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_IServerSocketFactory_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_IServerSocketFactory_hpp_
+#define Ppr_IServerSocketFactory_hpp_
+
+#include "ppr/net/IServerSocket.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+struct IServerSocketFactory : Interface
+{
+    // Creates an unbound server socket, ready to call bind() on.
+    virtual p<IServerSocket> createServerSocket() = 0 ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_IServerSocketFactory_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/IServerSocketFactory.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocket.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocket.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocket.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocket.hpp Wed Jul  5 15:36:36 2006
@@ -1,68 +1,68 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_ISocket_hpp_
-#define Ppr_ISocket_hpp_
-
-#include "ppr/net/SocketException.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-struct ISocket : Interface
-{
-    /**
-    */
-    virtual void connect(const char* host, int port) throw (SocketException) = 0 ;
-    /**
-    */
-    virtual void setSoTimeout(int millisecs) throw (SocketException) = 0;
-    /**
-    */
-    virtual int  getSoTimeout() const = 0;
-    /**
-    */
-    virtual int  receive(char* buff, int size) throw (SocketException) = 0;
-    /**
-    */
-    virtual int  send(const unsigned char* buff, int size) throw (SocketException) = 0;
-    /**
-    */
-    virtual int  send(const char* buff, int size) throw (SocketException) = 0;
-    /**
-    */
-    virtual void close() = 0;
-    /**
-    */
-    virtual bool isConnected() const = 0;
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_ISocket_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_ISocket_hpp_
+#define Ppr_ISocket_hpp_
+
+#include "ppr/net/SocketException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+struct ISocket : Interface
+{
+    /**
+    */
+    virtual void connect(const char* host, int port) throw (SocketException) = 0 ;
+    /**
+    */
+    virtual void setSoTimeout(int millisecs) throw (SocketException) = 0;
+    /**
+    */
+    virtual int  getSoTimeout() const = 0;
+    /**
+    */
+    virtual int  receive(char* buff, int size) throw (SocketException) = 0;
+    /**
+    */
+    virtual int  send(const unsigned char* buff, int size) throw (SocketException) = 0;
+    /**
+    */
+    virtual int  send(const char* buff, int size) throw (SocketException) = 0;
+    /**
+    */
+    virtual void close() = 0;
+    /**
+    */
+    virtual bool isConnected() const = 0;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_ISocket_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocket.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocketFactory.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocketFactory.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocketFactory.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocketFactory.hpp Wed Jul  5 15:36:36 2006
@@ -1,46 +1,46 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_ISocketFactory_hpp_
-#define Ppr_ISocketFactory_hpp_
-
-#include "ISocket.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-struct ISocketFactory : Interface
-{
-    /** Creates an unconnected socket ready to call connect() on.
-    */
-    virtual p<ISocket> createSocket() = 0 ;
-} ;
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_ISocketFactory_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_ISocketFactory_hpp_
+#define Ppr_ISocketFactory_hpp_
+
+#include "ISocket.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+struct ISocketFactory : Interface
+{
+    /** Creates an unconnected socket ready to call connect() on.
+    */
+    virtual p<ISocket> createSocket() = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_ISocketFactory_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ISocketFactory.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocket.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocket.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocket.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocket.hpp Wed Jul  5 15:36:36 2006
@@ -1,84 +1,84 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_ServerSocket_hpp_
-#define Ppr_ServerSocket_hpp_
-
-#include "ppr/net/IServerSocket.hpp"
-#include "ppr/net/Socket.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-class ServerSocket : public IServerSocket
-{
-public:
-    typedef Socket::SocketHandle SocketHandle;
-private:
-    SocketHandle socketHandle;
-public:
-    /** Constructor.
-        Creates a non-bound server socket.
-    */
-    ServerSocket();
-
-    /** Destructor.
-        Releases socket handle if close() hasn't been called.
-    */
-    virtual ~ServerSocket();
-public:
-    /** Bind and listen to given IP/dns and port.
-        @param host IP address or host name.
-        @param port TCP port between 1..655535
-    */
-    virtual void bind (const char* host, int port) throw (SocketException);
-
-    /** Bind and listen to given IP/dns and port.
-        @param host IP address or host name.
-        @param port TCP port between 1..655535
-        @param backlog Size of listen backlog.
-    */
-    virtual void bind (const char* host, int port, int backlog) throw (SocketException);
-
-    /** Blocks until a client connects to the bound socket.
-        @return new socket. Never returns NULL.
-    */
-    virtual p<ISocket> accept () throw (SocketException);
-
-    /** Closes the server socket.
-    */
-    virtual void close();
-
-    /** @return true of the server socket is bound.
-    */ 
-    virtual bool isBound() const;
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_ServerSocket_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_ServerSocket_hpp_
+#define Ppr_ServerSocket_hpp_
+
+#include "ppr/net/IServerSocket.hpp"
+#include "ppr/net/Socket.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+class ServerSocket : public IServerSocket
+{
+public:
+    typedef Socket::SocketHandle SocketHandle;
+private:
+    SocketHandle socketHandle;
+public:
+    /** Constructor.
+        Creates a non-bound server socket.
+    */
+    ServerSocket();
+
+    /** Destructor.
+        Releases socket handle if close() hasn't been called.
+    */
+    virtual ~ServerSocket();
+public:
+    /** Bind and listen to given IP/dns and port.
+        @param host IP address or host name.
+        @param port TCP port between 1..655535
+    */
+    virtual void bind (const char* host, int port) throw (SocketException);
+
+    /** Bind and listen to given IP/dns and port.
+        @param host IP address or host name.
+        @param port TCP port between 1..655535
+        @param backlog Size of listen backlog.
+    */
+    virtual void bind (const char* host, int port, int backlog) throw (SocketException);
+
+    /** Blocks until a client connects to the bound socket.
+        @return new socket. Never returns NULL.
+    */
+    virtual p<ISocket> accept () throw (SocketException);
+
+    /** Closes the server socket.
+    */
+    virtual void close();
+
+    /** @return true of the server socket is bound.
+    */ 
+    virtual bool isBound() const;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_ServerSocket_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocket.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocketFactory.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocketFactory.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocketFactory.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocketFactory.hpp Wed Jul  5 15:36:36 2006
@@ -1,50 +1,50 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_ServerSocketFactory_hpp_
-#define Ppr_ServerSocketFactory_hpp_
-
-#include "ppr/net/IServerSocketFactory.hpp"
-#include "ppr/net/ServerSocket.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace std;
-
-/*
- *
- */
-class ServerSocketFactory : public IServerSocketFactory
-{
-public:
-    /** Creates an unbound TCP/IP server socket, ready to call bind() on.
-    */
-    virtual p<IServerSocket> createSocket() {
-        return new ServerSocket();
-    }
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_ServerSocketFactory_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_ServerSocketFactory_hpp_
+#define Ppr_ServerSocketFactory_hpp_
+
+#include "ppr/net/IServerSocketFactory.hpp"
+#include "ppr/net/ServerSocket.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace std;
+
+/*
+ *
+ */
+class ServerSocketFactory : public IServerSocketFactory
+{
+public:
+    /** Creates an unbound TCP/IP server socket, ready to call bind() on.
+    */
+    virtual p<IServerSocket> createSocket() {
+        return new ServerSocket();
+    }
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_ServerSocketFactory_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/ServerSocketFactory.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Socket.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Socket.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Socket.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Socket.hpp Wed Jul  5 15:36:36 2006
@@ -1,115 +1,115 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_Socket_hpp_
-#define Ppr_Socket_hpp_
-
-#include "ISocket.hpp"
-#ifndef unix
-#include <Winsock2.h> // SOCKET
-#endif
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace ifr;
-
-/*
- *
- */
-class Socket : public ISocket
-{
-public:
-#ifdef unix
-    typedef int SocketHandle;
-#else
-    typedef SOCKET SocketHandle;
-#endif
-    static const SocketHandle INVALID_SOCKET_HANDLE = (SocketHandle) -1;
-private:
-    SocketHandle socketHandle;
-public:
-    /** Construct a non-connected socket.
-    */
-    Socket ();
-    /** Construct a connected or bound socket based on given
-        socket handle.
-    */
-    Socket (SocketHandle socketHandle);
-    /** Destruct.
-        Releases the socket handle but not
-        gracefully shut down the connection.
-    */
-    virtual ~Socket();
-public:
-    /**
-    */
-    virtual void connect (const char* host, int port) throw (SocketException);
-    /**
-    */
-    virtual void setSoTimeout (int millisec) throw (SocketException);
-    /**
-    */
-    virtual int  getSoTimeout () const;
-    /**
-    */
-    virtual int  receive (char* buff, int size) throw (SocketException);
-    /**
-    */
-    virtual int  send (const unsigned char* buff, int size) throw (SocketException);
-    /**
-    */
-    virtual int  send (const char* buff, int size) throw (SocketException);
-    /**
-    */
-    virtual void close ();
-    /**
-    */
-    virtual bool isConnected() const;
-protected:
-    SocketHandle getSocketHandle () {
-        return socketHandle;
-    }
-    void setSocketHandle (SocketHandle socketHandle) {
-        this->socketHandle = socketHandle;
-    }
-public:
-#ifndef unix
-    // WINDOWS needs initialization of winsock
-    class StaticSocketInitializer {
-    private:
-        p<SocketException> socketInitError;
-    public:
-        p<SocketException> getSocketInitError () {
-            return socketInitError;
-        }
-        StaticSocketInitializer ();
-        virtual ~StaticSocketInitializer ();
-    };
-    static StaticSocketInitializer staticSocketInitializer;
-#endif
-
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_Socket_hpp_*/
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_Socket_hpp_
+#define Ppr_Socket_hpp_
+
+#include "ISocket.hpp"
+#ifndef unix
+#include <Winsock2.h> // SOCKET
+#endif
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace ifr;
+
+/*
+ *
+ */
+class Socket : public ISocket
+{
+public:
+#ifdef unix
+    typedef int SocketHandle;
+#else
+    typedef SOCKET SocketHandle;
+#endif
+    static const SocketHandle INVALID_SOCKET_HANDLE = (SocketHandle) -1;
+private:
+    SocketHandle socketHandle;
+public:
+    /** Construct a non-connected socket.
+    */
+    Socket ();
+    /** Construct a connected or bound socket based on given
+        socket handle.
+    */
+    Socket (SocketHandle socketHandle);
+    /** Destruct.
+        Releases the socket handle but not
+        gracefully shut down the connection.
+    */
+    virtual ~Socket();
+public:
+    /**
+    */
+    virtual void connect (const char* host, int port) throw (SocketException);
+    /**
+    */
+    virtual void setSoTimeout (int millisec) throw (SocketException);
+    /**
+    */
+    virtual int  getSoTimeout () const;
+    /**
+    */
+    virtual int  receive (char* buff, int size) throw (SocketException);
+    /**
+    */
+    virtual int  send (const unsigned char* buff, int size) throw (SocketException);
+    /**
+    */
+    virtual int  send (const char* buff, int size) throw (SocketException);
+    /**
+    */
+    virtual void close ();
+    /**
+    */
+    virtual bool isConnected() const;
+protected:
+    SocketHandle getSocketHandle () {
+        return socketHandle;
+    }
+    void setSocketHandle (SocketHandle socketHandle) {
+        this->socketHandle = socketHandle;
+    }
+public:
+#ifndef unix
+    // WINDOWS needs initialization of winsock
+    class StaticSocketInitializer {
+    private:
+        p<SocketException> socketInitError;
+    public:
+        p<SocketException> getSocketInitError () {
+            return socketInitError;
+        }
+        StaticSocketInitializer ();
+        virtual ~StaticSocketInitializer ();
+    };
+    static StaticSocketInitializer staticSocketInitializer;
+#endif
+
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_Socket_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Socket.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketException.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketException.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketException.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketException.hpp Wed Jul  5 15:36:36 2006
@@ -1,51 +1,51 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_SocketException_hpp_
-#define Ppr_SocketException_hpp_
-
-#include <stdexcept>
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace std;
-
-/**
- */
-class SocketException : public exception
-{
-protected:
-    string msg;
-public:
-    SocketException(const char* message) : msg (message) {};
-    virtual ~SocketException() throw() {}
-    virtual const char* what() const throw () {
-      return msg.c_str();
-    }
-} ;
-
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_SocketException_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_SocketException_hpp_
+#define Ppr_SocketException_hpp_
+
+#include <stdexcept>
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace std;
+
+/**
+ */
+class SocketException : public exception
+{
+protected:
+    string msg;
+public:
+    SocketException(const char* message) : msg (message) {};
+    virtual ~SocketException() throw() {}
+    virtual const char* what() const throw () {
+      return msg.c_str();
+    }
+} ;
+
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_SocketException_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketException.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketFactory.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketFactory.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketFactory.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketFactory.hpp Wed Jul  5 15:36:36 2006
@@ -1,50 +1,50 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_SocketFactory_hpp_
-#define Ppr_SocketFactory_hpp_
-
-#include "ppr/net/ISocketFactory.hpp"
-#include "ppr/net/Socket.hpp"
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace std;
-
-/*
- *
- */
-class SocketFactory : public ISocketFactory
-{
-public:
-    /** Creates an unconnected TCP/IP socket ready to call connect() on.
-    */
-    virtual p<ISocket> createSocket() {
-        return new Socket();
-    }
-};
-
-/* namespave */
-    }
-  }
-}
-
-#endif /*Ppr_SocketFactory_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_SocketFactory_hpp_
+#define Ppr_SocketFactory_hpp_
+
+#include "ppr/net/ISocketFactory.hpp"
+#include "ppr/net/Socket.hpp"
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace std;
+
+/*
+ *
+ */
+class SocketFactory : public ISocketFactory
+{
+public:
+    /** Creates an unconnected TCP/IP socket ready to call connect() on.
+    */
+    virtual p<ISocket> createSocket() {
+        return new Socket();
+    }
+};
+
+/* namespave */
+    }
+  }
+}
+
+#endif /*Ppr_SocketFactory_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/SocketFactory.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Uri.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Uri.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Uri.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Uri.hpp Wed Jul  5 15:36:36 2006
@@ -1,150 +1,150 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed 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 Ppr_Uri_hpp_
-#define Ppr_Uri_hpp_
-
-#include <string>
-#include <assert.h>
-#include <stdlib.h>
-
-namespace apache
-{
-  namespace ppr
-  {
-    namespace net
-    {
-      using namespace std;
-
-/*
- * Splits an Uri string into it's basic parts.
- * @author David Fahlander, PortWise
- */
-class Uri
-{
-public:
-  // Constructs an empty URI.
-  Uri() : port_(0), bits_ (IS_EMPTY) {};
-
-  // Constructs an URI based on given absolute URI string.
-  Uri(const string& absoluteUri);
-
-  /** Construct an Uri based on an URI and a base Uri.
-
-    Given URI can be a relative path, an absolute path or an entire Uri.
-    If given URI is an absolute URI (begins with <scheme> "://", baseUri is ignored.
-    If given URI begins with ".." or "." the constructed Uri will resolve the real
-    path without "." or "..".
-
-    @param uri URI relative to baseUri
-    @baseUri The Uri of the document that referred to given URI.
-  */
-  Uri (string uri, const Uri& baseUri);
-public:
-  /** Get scheme.
-  */
-  const string& scheme() const {return scheme_;}
-  /** Get host.
-  */
-  const string& host() const {return host_;}
-
-  /** Returns the port (if scheme supports port).
-    If the port was omitted in the string that constructed the URI, the default
-    port for that scheme is returned (if there is a default port for it). If no
-    default port exists for the scheme and port was omitted in the string that
-    constructed the URI, 0 is returned.
-
-    For example, the URI
-      http://127.0.0.1:8081/index.html has the port 8081 and the URI
-      http://www.apache.org/index.html has the port 80 (default HTTP port).
-
-    The default port-table is defined in Uri::getDefaultPort().
-  */
-  unsigned short port() const {return port_;}
-
-  /** Returns the authority.
-    The authority is equivalent to the host header when an HTTP URI is used. If a default
-    port is used, the port part of the authority may be omitted. For example, the URI
-      http://www.apache.org/index.html has the authority "www.apache.org" and the URI
-      http://127.0.0.1:8081/index.html has the authority "127.0.0.1:8081".
-  */
-  const string& authority() const {return authority_;}
-
-  /** Returns the path (without query).
-    If no path, an empty string is returned.
-  */
-  const string& path() const {return path_;}
-
-  /** Returns the query. If no query, an empty string is returned.
-  */
-  const string& query() const {return query_;}
-
-  /** Returns true if URI has a query.
-  */
-  bool hasQuery () const {return !query_.empty();}
-
-  /** Returns the path and query part of the URI.
-  */
-  string pathAndQuery() const {return (hasQuery() ? path() + "?" + query() : path());}
-
-  /** Returns true if the URI failed to be interpreted in any of the constructors used.
-  */
-  bool isFail () const { return ((bits_ & IS_FAIL) != 0); }
-
-  /** Returns true if the URI is empty.
-  */
-  bool isEmpty () const { return ((bits_ & IS_EMPTY) != 0); }
-
-  /** Returns true if the URI is a URL using a secure scheme such as https.
-  */
-  bool isSecure() const;
-
-  /** Converts this URI into a string.
-  */
-  string toString() const {
-    if (isEmpty() || isFail()) {
-      return "";
-    } else if (hasQuery()) {
-      return scheme() + "://" + authority() + path() + "?" + query();
-    } else {
-      return scheme() + "://" + authority() + path();
-    }
-  }
-public:
-  /** Returns the default port if given scheme is a protocol that is recognized
-      by this implementation.
-  */
-  static unsigned short getDefaultPort (const string& scheme);
-private:
-  string scheme_;
-  string host_;
-  unsigned short port_;
-  string authority_;
-  string path_;
-  string query_;
-private:
-  static const unsigned char IS_EMPTY = 0x01;
-  static const unsigned char IS_FAIL  = 0x02;
-  unsigned char bits_;
-};
-
-/* namespace */
-    }
-  }
-}
-
-#endif /*Ppr_Uri_hpp_*/
-
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed 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 Ppr_Uri_hpp_
+#define Ppr_Uri_hpp_
+
+#include <string>
+#include <assert.h>
+#include <stdlib.h>
+
+namespace apache
+{
+  namespace ppr
+  {
+    namespace net
+    {
+      using namespace std;
+
+/*
+ * Splits an Uri string into it's basic parts.
+ * @author David Fahlander, PortWise
+ */
+class Uri
+{
+public:
+  // Constructs an empty URI.
+  Uri() : port_(0), bits_ (IS_EMPTY) {};
+
+  // Constructs an URI based on given absolute URI string.
+  Uri(const string& absoluteUri);
+
+  /** Construct an Uri based on an URI and a base Uri.
+
+    Given URI can be a relative path, an absolute path or an entire Uri.
+    If given URI is an absolute URI (begins with <scheme> "://", baseUri is ignored.
+    If given URI begins with ".." or "." the constructed Uri will resolve the real
+    path without "." or "..".
+
+    @param uri URI relative to baseUri
+    @baseUri The Uri of the document that referred to given URI.
+  */
+  Uri (string uri, const Uri& baseUri);
+public:
+  /** Get scheme.
+  */
+  const string& scheme() const {return scheme_;}
+  /** Get host.
+  */
+  const string& host() const {return host_;}
+
+  /** Returns the port (if scheme supports port).
+    If the port was omitted in the string that constructed the URI, the default
+    port for that scheme is returned (if there is a default port for it). If no
+    default port exists for the scheme and port was omitted in the string that
+    constructed the URI, 0 is returned.
+
+    For example, the URI
+      http://127.0.0.1:8081/index.html has the port 8081 and the URI
+      http://www.apache.org/index.html has the port 80 (default HTTP port).
+
+    The default port-table is defined in Uri::getDefaultPort().
+  */
+  unsigned short port() const {return port_;}
+
+  /** Returns the authority.
+    The authority is equivalent to the host header when an HTTP URI is used. If a default
+    port is used, the port part of the authority may be omitted. For example, the URI
+      http://www.apache.org/index.html has the authority "www.apache.org" and the URI
+      http://127.0.0.1:8081/index.html has the authority "127.0.0.1:8081".
+  */
+  const string& authority() const {return authority_;}
+
+  /** Returns the path (without query).
+    If no path, an empty string is returned.
+  */
+  const string& path() const {return path_;}
+
+  /** Returns the query. If no query, an empty string is returned.
+  */
+  const string& query() const {return query_;}
+
+  /** Returns true if URI has a query.
+  */
+  bool hasQuery () const {return !query_.empty();}
+
+  /** Returns the path and query part of the URI.
+  */
+  string pathAndQuery() const {return (hasQuery() ? path() + "?" + query() : path());}
+
+  /** Returns true if the URI failed to be interpreted in any of the constructors used.
+  */
+  bool isFail () const { return ((bits_ & IS_FAIL) != 0); }
+
+  /** Returns true if the URI is empty.
+  */
+  bool isEmpty () const { return ((bits_ & IS_EMPTY) != 0); }
+
+  /** Returns true if the URI is a URL using a secure scheme such as https.
+  */
+  bool isSecure() const;
+
+  /** Converts this URI into a string.
+  */
+  string toString() const {
+    if (isEmpty() || isFail()) {
+      return "";
+    } else if (hasQuery()) {
+      return scheme() + "://" + authority() + path() + "?" + query();
+    } else {
+      return scheme() + "://" + authority() + path();
+    }
+  }
+public:
+  /** Returns the default port if given scheme is a protocol that is recognized
+      by this implementation.
+  */
+  static unsigned short getDefaultPort (const string& scheme);
+private:
+  string scheme_;
+  string host_;
+  unsigned short port_;
+  string authority_;
+  string path_;
+  string query_;
+private:
+  static const unsigned char IS_EMPTY = 0x01;
+  static const unsigned char IS_FAIL  = 0x02;
+  unsigned char bits_;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Ppr_Uri_hpp_*/
+

Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/ppr/net/Uri.hpp
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message