Converted concurrency classes to use boost::shared_ptr and boost::weak_ptr:

Wrapped all thrift code in facebook::thrift:: namespace


	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664735 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TBufferedTransport.cc b/lib/cpp/src/transport/TBufferedTransport.cc
index d7ce56a..cab02df 100644
--- a/lib/cpp/src/transport/TBufferedTransport.cc
+++ b/lib/cpp/src/transport/TBufferedTransport.cc
@@ -1,6 +1,8 @@
 #include "TBufferedTransport.h"
 using std::string;
 
+namespace facebook { namespace thrift { namespace transport { 
+
 uint32_t TBufferedTransport::read(uint8_t* buf, uint32_t len) {
   uint32_t need = len;
 
@@ -58,3 +60,5 @@
   // Flush the underlying transport
   transport_->flush();
 }
+
+}}} // facebook::thrift::transport
diff --git a/lib/cpp/src/transport/TBufferedTransport.h b/lib/cpp/src/transport/TBufferedTransport.h
index 43c31f1..b8153fe 100644
--- a/lib/cpp/src/transport/TBufferedTransport.h
+++ b/lib/cpp/src/transport/TBufferedTransport.h
@@ -4,6 +4,8 @@
 #include "transport/TTransport.h"
 #include <string>
 
+namespace facebook { namespace thrift { namespace transport { 
+
 /**
  * Buffered transport. For reads it will read more data than is requested
  * and will serve future data out of a local buffer. For writes, data is
@@ -76,4 +78,6 @@
   uint32_t wLen_;
 };
 
+}}} // facebook::thrift::transport
+
 #endif
diff --git a/lib/cpp/src/transport/TChunkedTransport.cc b/lib/cpp/src/transport/TChunkedTransport.cc
index f35d747..bb42e38 100644
--- a/lib/cpp/src/transport/TChunkedTransport.cc
+++ b/lib/cpp/src/transport/TChunkedTransport.cc
@@ -1,6 +1,8 @@
 #include "TChunkedTransport.h"
 using std::string;
 
+namespace facebook { namespace thrift { namespace transport { 
+
 uint32_t TChunkedTransport::read(uint8_t* buf, uint32_t len) {
   uint32_t need = len;
 
@@ -95,3 +97,5 @@
   // Flush the underlying
   transport_->flush();
 }
+
+}}} // facebook::thrift::transport
diff --git a/lib/cpp/src/transport/TChunkedTransport.h b/lib/cpp/src/transport/TChunkedTransport.h
index 07bdbb5..16f9e0e 100644
--- a/lib/cpp/src/transport/TChunkedTransport.h
+++ b/lib/cpp/src/transport/TChunkedTransport.h
@@ -4,6 +4,8 @@
 #include "transport/TTransport.h"
 #include <string>
 
+namespace facebook { namespace thrift { namespace transport { 
+
 /**
  * Chunked transport. All writes go into an in-memory buffer until flush is
  * called, at which point the transport writes the length of the entire
@@ -73,4 +75,6 @@
   void readChunk();
 };
 
+}}} // facebook::thrift::transport
+
 #endif
diff --git a/lib/cpp/src/transport/TNullTransport.h b/lib/cpp/src/transport/TNullTransport.h
index 9562d9f..2522148 100644
--- a/lib/cpp/src/transport/TNullTransport.h
+++ b/lib/cpp/src/transport/TNullTransport.h
@@ -3,6 +3,8 @@
 
 #include "transport/TTransport.h"
 
+namespace facebook { namespace thrift { namespace transport { 
+
 /**
  * The null transport is a dummy transport that doesn't actually do anything.
  * It's sort of an analogy to /dev/null, you can never read anything from it
@@ -21,4 +23,6 @@
   void write(const std::string& s) {}
 };
 
+}}} // facebook::thrift::transport
+
 #endif
diff --git a/lib/cpp/src/transport/TServerSocket.cc b/lib/cpp/src/transport/TServerSocket.cc
index 1cf4a32..21230d9 100644
--- a/lib/cpp/src/transport/TServerSocket.cc
+++ b/lib/cpp/src/transport/TServerSocket.cc
@@ -5,6 +5,8 @@
 #include "transport/TSocket.h"
 #include "transport/TServerSocket.h"
 
+namespace facebook { namespace thrift { namespace transport { 
+
 TServerSocket::TServerSocket(int port) :
   port_(port), serverSocket_(0), acceptBacklog_(1024) {}
 
@@ -88,3 +90,5 @@
   }
   serverSocket_ = 0;
 }
+
+}}} // facebook::thrift::transport
diff --git a/lib/cpp/src/transport/TServerSocket.h b/lib/cpp/src/transport/TServerSocket.h
index ca30a03..c18a8d2 100644
--- a/lib/cpp/src/transport/TServerSocket.h
+++ b/lib/cpp/src/transport/TServerSocket.h
@@ -3,6 +3,8 @@
 
 #include "transport/TServerTransport.h"
 
+namespace facebook { namespace thrift { namespace transport { 
+
 class TSocket;
 
 /**
@@ -29,4 +31,6 @@
   int acceptBacklog_;
 };
 
+}}} // facebook::thrift::transport
+
 #endif
diff --git a/lib/cpp/src/transport/TServerTransport.h b/lib/cpp/src/transport/TServerTransport.h
index 9d71539..9bf74d1 100644
--- a/lib/cpp/src/transport/TServerTransport.h
+++ b/lib/cpp/src/transport/TServerTransport.h
@@ -4,6 +4,8 @@
 #include "transport/TTransport.h"
 #include "transport/TTransportException.h"
 
+namespace facebook { namespace thrift { namespace transport { 
+
 /**
  * Server transport framework. A server needs to have some facility for
  * creating base transports to read/write from.
@@ -58,4 +60,6 @@
 
 };
 
+}}} // facebook::thrift::transport
+
 #endif
diff --git a/lib/cpp/src/transport/TSocket.cc b/lib/cpp/src/transport/TSocket.cc
index 2161697..a1e0327 100644
--- a/lib/cpp/src/transport/TSocket.cc
+++ b/lib/cpp/src/transport/TSocket.cc
@@ -10,6 +10,8 @@
 #include "transport/TSocket.h"
 #include "transport/TTransportException.h"
 
+namespace facebook { namespace thrift { namespace transport { 
+
 using namespace std;
 
 uint32_t g_socket_syscalls = 0;
@@ -230,3 +232,4 @@
     perror("TSocket::setNoDelay()");
   }
 }
+}}} // facebook::thrift::transport
diff --git a/lib/cpp/src/transport/TSocket.h b/lib/cpp/src/transport/TSocket.h
index 18abfa7..8a6fc8f 100644
--- a/lib/cpp/src/transport/TSocket.h
+++ b/lib/cpp/src/transport/TSocket.h
@@ -6,6 +6,8 @@
 #include "transport/TTransport.h"
 #include "transport/TServerSocket.h"
 
+namespace facebook { namespace thrift { namespace transport { 
+
 /**
  * TCP Socket implementation of the TTransport interface.
  *
@@ -97,4 +99,5 @@
   int socket_;
 };
 
+}}} // facebook::thrift::transport
 #endif
diff --git a/lib/cpp/src/transport/TTransport.h b/lib/cpp/src/transport/TTransport.h
index fcaece7..e9366d3 100644
--- a/lib/cpp/src/transport/TTransport.h
+++ b/lib/cpp/src/transport/TTransport.h
@@ -4,6 +4,8 @@
 #include <string>
 #include "transport/TTransportException.h"
 
+namespace facebook { namespace thrift { namespace transport { 
+
 /**
  * Generic interface for a method of transporting data. A TTransport may be
  * capable of either reading or writing, but not necessarily both.
@@ -94,4 +96,6 @@
   TTransport() {}
 };
 
+}}} // facebook::thrift::transport
+
 #endif
diff --git a/lib/cpp/src/transport/TTransportException.h b/lib/cpp/src/transport/TTransportException.h
index 044e16d..4b2be87 100644
--- a/lib/cpp/src/transport/TTransportException.h
+++ b/lib/cpp/src/transport/TTransportException.h
@@ -3,6 +3,8 @@
 
 #include <string>
 
+namespace facebook { namespace thrift { namespace transport { 
+
 /**
  * Error codes for the various types of exceptions.
  */
@@ -60,4 +62,6 @@
   std::string message_;
 };
 
+}}} // facebook::thrift::transport
+
 #endif