THRIFT-270: change cpp namespaces from facebook::thrift to apache::thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739644 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/TProcessor.h b/lib/cpp/src/TProcessor.h
index cba4a84..3c4b171 100644
--- a/lib/cpp/src/TProcessor.h
+++ b/lib/cpp/src/TProcessor.h
@@ -11,7 +11,7 @@
#include <protocol/TProtocol.h>
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
/**
* A processor is a generic object that acts upon two streams of data, one
@@ -28,7 +28,7 @@
virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
boost::shared_ptr<protocol::TProtocol> out) = 0;
- bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> io) {
+ bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> io) {
return process(io, io);
}
@@ -36,6 +36,6 @@
TProcessor() {}
};
-}} // facebook::thrift
+}} // apache::thrift
#endif // #ifndef _THRIFT_PROCESSOR_H_
diff --git a/lib/cpp/src/TReflectionLocal.h b/lib/cpp/src/TReflectionLocal.h
index 8e39117..3644140 100644
--- a/lib/cpp/src/TReflectionLocal.h
+++ b/lib/cpp/src/TReflectionLocal.h
@@ -19,9 +19,9 @@
* @author David Reiss <dreiss@facebook.com>
*/
-namespace facebook { namespace thrift { namespace reflection { namespace local {
+namespace apache { namespace thrift { namespace reflection { namespace local {
-using facebook::thrift::protocol::TType;
+using apache::thrift::protocol::TType;
// We include this many bytes of the structure's fingerprint when serializing
// a top-level structure. Long enough to make collisions unlikely, short
@@ -79,6 +79,6 @@
};
-}}}} // facebook::thrift::reflection::local
+}}}} // apache::thrift::reflection::local
#endif // #ifndef _THRIFT_TREFLECTIONLOCAL_H_
diff --git a/lib/cpp/src/Thrift.cpp b/lib/cpp/src/Thrift.cpp
index fb6bcbc..bbf9710 100644
--- a/lib/cpp/src/Thrift.cpp
+++ b/lib/cpp/src/Thrift.cpp
@@ -11,7 +11,7 @@
#include <stdarg.h>
#include <stdio.h>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
TOutput GlobalOutput;
@@ -77,29 +77,29 @@
#endif // HAVE_STRERROR_R
}
-uint32_t TApplicationException::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t TApplicationException::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
while (true) {
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid) {
case 1:
- if (ftype == facebook::thrift::protocol::T_STRING) {
+ if (ftype == apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(message_);
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_I32) {
+ if (ftype == apache::thrift::protocol::T_I32) {
int32_t type;
xfer += iprot->readI32(type);
type_ = (TApplicationExceptionType)type;
@@ -118,13 +118,13 @@
return xfer;
}
-uint32_t TApplicationException::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t TApplicationException::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TApplicationException");
- xfer += oprot->writeFieldBegin("message", facebook::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(message_);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("type", facebook::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(type_);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -132,4 +132,4 @@
return xfer;
}
-}} // facebook::thrift
+}} // apache::thrift
diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h
index eb5000e..624687b 100644
--- a/lib/cpp/src/Thrift.h
+++ b/lib/cpp/src/Thrift.h
@@ -24,7 +24,7 @@
#include "TLogging.h"
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
class TOutput {
public:
@@ -171,6 +171,6 @@
}}
-}} // facebook::thrift
+}} // apache::thrift
#endif // #ifndef _THRIFT_THRIFT_H_
diff --git a/lib/cpp/src/concurrency/Exception.h b/lib/cpp/src/concurrency/Exception.h
index 00e2649..cdc8538 100644
--- a/lib/cpp/src/concurrency/Exception.h
+++ b/lib/cpp/src/concurrency/Exception.h
@@ -10,31 +10,31 @@
#include <exception>
#include <Thrift.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
-class NoSuchTaskException : public facebook::thrift::TException {};
+class NoSuchTaskException : public apache::thrift::TException {};
-class UncancellableTaskException : public facebook::thrift::TException {};
+class UncancellableTaskException : public apache::thrift::TException {};
-class InvalidArgumentException : public facebook::thrift::TException {};
+class InvalidArgumentException : public apache::thrift::TException {};
-class IllegalStateException : public facebook::thrift::TException {};
+class IllegalStateException : public apache::thrift::TException {};
-class TimedOutException : public facebook::thrift::TException {
+class TimedOutException : public apache::thrift::TException {
public:
TimedOutException():TException("TimedOutException"){};
TimedOutException(const std::string& message ) :
TException(message) {}
};
-class TooManyPendingTasksException : public facebook::thrift::TException {
+class TooManyPendingTasksException : public apache::thrift::TException {
public:
TooManyPendingTasksException():TException("TooManyPendingTasksException"){};
TooManyPendingTasksException(const std::string& message ) :
TException(message) {}
};
-class SystemResourceException : public facebook::thrift::TException {
+class SystemResourceException : public apache::thrift::TException {
public:
SystemResourceException() {}
@@ -42,6 +42,6 @@
TException(message) {}
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_
diff --git a/lib/cpp/src/concurrency/FunctionRunner.h b/lib/cpp/src/concurrency/FunctionRunner.h
index 94ab837..6379c1c 100644
--- a/lib/cpp/src/concurrency/FunctionRunner.h
+++ b/lib/cpp/src/concurrency/FunctionRunner.h
@@ -10,7 +10,7 @@
#include <tr1/functional>
#include "thrift/lib/cpp/concurrency/Thread.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Convenient implementation of Runnable that will execute arbitrary callbacks.
@@ -60,6 +60,6 @@
VoidFunc func_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H
diff --git a/lib/cpp/src/concurrency/Monitor.cpp b/lib/cpp/src/concurrency/Monitor.cpp
index 932ae68..81855dc 100644
--- a/lib/cpp/src/concurrency/Monitor.cpp
+++ b/lib/cpp/src/concurrency/Monitor.cpp
@@ -15,7 +15,7 @@
#include <pthread.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Monitor implementation using the POSIX pthread library
@@ -122,4 +122,4 @@
void Monitor::notifyAll() const { impl_->notifyAll(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Monitor.h b/lib/cpp/src/concurrency/Monitor.h
index 1eb36eb..fe7bf11 100644
--- a/lib/cpp/src/concurrency/Monitor.h
+++ b/lib/cpp/src/concurrency/Monitor.h
@@ -9,7 +9,7 @@
#include "Exception.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A monitor is a combination mutex and condition-event. Waiting and
@@ -67,6 +67,6 @@
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_MONITOR_H_
diff --git a/lib/cpp/src/concurrency/Mutex.cpp b/lib/cpp/src/concurrency/Mutex.cpp
index b160b67..af68db6 100644
--- a/lib/cpp/src/concurrency/Mutex.cpp
+++ b/lib/cpp/src/concurrency/Mutex.cpp
@@ -11,7 +11,7 @@
using boost::shared_ptr;
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Implementation of Mutex class using POSIX mutex
@@ -145,5 +145,5 @@
void ReadWriteMutex::release() const { impl_->release(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h
index 3b8631b..92eb0db 100644
--- a/lib/cpp/src/concurrency/Mutex.h
+++ b/lib/cpp/src/concurrency/Mutex.h
@@ -9,7 +9,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A simple mutex class
@@ -95,6 +95,6 @@
#define RWGuard(m) incorrect_use_of_RWGuard(m)
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_
diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.cpp b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
index 001d6ad..9655a86 100644
--- a/lib/cpp/src/concurrency/PosixThreadFactory.cpp
+++ b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
@@ -18,7 +18,7 @@
#include <boost/weak_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::weak_ptr;
@@ -293,4 +293,4 @@
Thread::id_t PosixThreadFactory::getCurrentThreadId() const { return impl_->getCurrentThreadId(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.h b/lib/cpp/src/concurrency/PosixThreadFactory.h
index 0f12fc9..66df4b3 100644
--- a/lib/cpp/src/concurrency/PosixThreadFactory.h
+++ b/lib/cpp/src/concurrency/PosixThreadFactory.h
@@ -11,7 +11,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A thread factory to create posix threads
@@ -113,6 +113,6 @@
boost::shared_ptr<Impl> impl_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_
diff --git a/lib/cpp/src/concurrency/Thread.h b/lib/cpp/src/concurrency/Thread.h
index 39ee816..0ce5e17 100644
--- a/lib/cpp/src/concurrency/Thread.h
+++ b/lib/cpp/src/concurrency/Thread.h
@@ -10,7 +10,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
class Thread;
@@ -49,7 +49,7 @@
* is difficult to abstract across platforms and is left for platform-specific
* ThreadFactory implemtations to deal with
*
- * @see facebook::thrift::concurrency::ThreadFactory)
+ * @see apache::thrift::concurrency::ThreadFactory)
*/
class Thread {
@@ -107,6 +107,6 @@
virtual Thread::id_t getCurrentThreadId() const = 0;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_THREAD_H_
diff --git a/lib/cpp/src/concurrency/ThreadManager.cpp b/lib/cpp/src/concurrency/ThreadManager.cpp
index 34acc4c..11c19a8 100644
--- a/lib/cpp/src/concurrency/ThreadManager.cpp
+++ b/lib/cpp/src/concurrency/ThreadManager.cpp
@@ -18,7 +18,7 @@
#include <iostream>
#endif //defined(DEBUG)
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
@@ -477,5 +477,5 @@
return shared_ptr<ThreadManager>(new SimpleThreadManager(count, pendingTaskCountMax));
}
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/ThreadManager.h b/lib/cpp/src/concurrency/ThreadManager.h
index 7bca5d0..b973b08 100644
--- a/lib/cpp/src/concurrency/ThreadManager.h
+++ b/lib/cpp/src/concurrency/ThreadManager.h
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include "Thread.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Thread Pool Manager and related classes
@@ -152,6 +152,6 @@
class Impl;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_
diff --git a/lib/cpp/src/concurrency/TimerManager.cpp b/lib/cpp/src/concurrency/TimerManager.cpp
index e3b7a89..c9555fb 100644
--- a/lib/cpp/src/concurrency/TimerManager.cpp
+++ b/lib/cpp/src/concurrency/TimerManager.cpp
@@ -12,7 +12,7 @@
#include <iostream>
#include <set>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
@@ -268,5 +268,5 @@
const TimerManager::STATE TimerManager::state() const { return state_; }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/TimerManager.h b/lib/cpp/src/concurrency/TimerManager.h
index 6d2eae9..3729646 100644
--- a/lib/cpp/src/concurrency/TimerManager.h
+++ b/lib/cpp/src/concurrency/TimerManager.h
@@ -15,7 +15,7 @@
#include <map>
#include <time.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Timer Manager
@@ -103,6 +103,6 @@
boost::shared_ptr<Thread> dispatcherThread_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_
diff --git a/lib/cpp/src/concurrency/Util.cpp b/lib/cpp/src/concurrency/Util.cpp
index eeee0e5..c220238 100644
--- a/lib/cpp/src/concurrency/Util.cpp
+++ b/lib/cpp/src/concurrency/Util.cpp
@@ -16,7 +16,7 @@
#include <sys/time.h>
#endif // defined(HAVE_CLOCK_GETTIME)
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
const int64_t Util::currentTime() {
int64_t result;
@@ -39,4 +39,4 @@
}
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Util.h b/lib/cpp/src/concurrency/Util.h
index 483d14a..fa5b7f4 100644
--- a/lib/cpp/src/concurrency/Util.h
+++ b/lib/cpp/src/concurrency/Util.h
@@ -13,7 +13,7 @@
#include <time.h>
#include <sys/time.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Utility methods
@@ -83,6 +83,6 @@
static const int64_t currentTime();
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_UTIL_H_
diff --git a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
index 0dcf0bb..440f69b 100644
--- a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
@@ -14,10 +14,10 @@
#include <iostream>
#include <set>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
using boost::shared_ptr;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -341,5 +341,5 @@
const double ThreadFactoryTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency::test
+}}}} // apache::thrift::concurrency::test
diff --git a/lib/cpp/src/concurrency/test/ThreadManagerTests.h b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
index 261ad5e..feb3e47 100644
--- a/lib/cpp/src/concurrency/test/ThreadManagerTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
@@ -16,9 +16,9 @@
#include <set>
#include <stdint.h>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -348,7 +348,7 @@
const double ThreadManagerTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency
-using namespace facebook::thrift::concurrency::test;
+using namespace apache::thrift::concurrency::test;
diff --git a/lib/cpp/src/concurrency/test/TimerManagerTests.h b/lib/cpp/src/concurrency/test/TimerManagerTests.h
index 13e3ef8..9e4e757 100644
--- a/lib/cpp/src/concurrency/test/TimerManagerTests.h
+++ b/lib/cpp/src/concurrency/test/TimerManagerTests.h
@@ -12,9 +12,9 @@
#include <assert.h>
#include <iostream>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -126,5 +126,5 @@
const double TimerManagerTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/processor/PeekProcessor.cpp b/lib/cpp/src/processor/PeekProcessor.cpp
index d864805..4cbaca0 100644
--- a/lib/cpp/src/processor/PeekProcessor.cpp
+++ b/lib/cpp/src/processor/PeekProcessor.cpp
@@ -1,10 +1,10 @@
#include "PeekProcessor.h"
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift;
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
PeekProcessor::PeekProcessor() {
memoryBuffer_.reset(new TMemoryBuffer());
diff --git a/lib/cpp/src/processor/PeekProcessor.h b/lib/cpp/src/processor/PeekProcessor.h
index 697be27..6404b71 100644
--- a/lib/cpp/src/processor/PeekProcessor.h
+++ b/lib/cpp/src/processor/PeekProcessor.h
@@ -14,7 +14,7 @@
#include <transport/TBufferTransports.h>
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
/*
* Class for peeking at the raw data that is being processed by another processor
@@ -22,7 +22,7 @@
*
* @author James Wang <jwang@facebook.com>
*/
-class PeekProcessor : public facebook::thrift::TProcessor {
+class PeekProcessor : public apache::thrift::TProcessor {
public:
PeekProcessor();
@@ -32,34 +32,34 @@
// protocolFactory - the protocol factory used to wrap the memory buffer
// transportFactory - this TPipedTransportFactory is used to wrap the source transport
// via a call to getPipedTransport
- void initialize(boost::shared_ptr<facebook::thrift::TProcessor> actualProcessor,
- boost::shared_ptr<facebook::thrift::protocol::TProtocolFactory> protocolFactory,
- boost::shared_ptr<facebook::thrift::transport::TPipedTransportFactory> transportFactory);
+ void initialize(boost::shared_ptr<apache::thrift::TProcessor> actualProcessor,
+ boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> protocolFactory,
+ boost::shared_ptr<apache::thrift::transport::TPipedTransportFactory> transportFactory);
- boost::shared_ptr<facebook::thrift::transport::TTransport> getPipedTransport(boost::shared_ptr<facebook::thrift::transport::TTransport> in);
+ boost::shared_ptr<apache::thrift::transport::TTransport> getPipedTransport(boost::shared_ptr<apache::thrift::transport::TTransport> in);
- void setTargetTransport(boost::shared_ptr<facebook::thrift::transport::TTransport> targetTransport);
+ void setTargetTransport(boost::shared_ptr<apache::thrift::transport::TTransport> targetTransport);
- virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> in,
- boost::shared_ptr<facebook::thrift::protocol::TProtocol> out);
+ virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> in,
+ boost::shared_ptr<apache::thrift::protocol::TProtocol> out);
// The following three functions can be overloaded by child classes to
// achieve desired peeking behavior
virtual void peekName(const std::string& fname);
virtual void peekBuffer(uint8_t* buffer, uint32_t size);
- virtual void peek(boost::shared_ptr<facebook::thrift::protocol::TProtocol> in,
- facebook::thrift::protocol::TType ftype,
+ virtual void peek(boost::shared_ptr<apache::thrift::protocol::TProtocol> in,
+ apache::thrift::protocol::TType ftype,
int16_t fid);
virtual void peekEnd();
private:
- boost::shared_ptr<facebook::thrift::TProcessor> actualProcessor_;
- boost::shared_ptr<facebook::thrift::protocol::TProtocol> pipedProtocol_;
- boost::shared_ptr<facebook::thrift::transport::TPipedTransportFactory> transportFactory_;
- boost::shared_ptr<facebook::thrift::transport::TMemoryBuffer> memoryBuffer_;
- boost::shared_ptr<facebook::thrift::transport::TTransport> targetTransport_;
+ boost::shared_ptr<apache::thrift::TProcessor> actualProcessor_;
+ boost::shared_ptr<apache::thrift::protocol::TProtocol> pipedProtocol_;
+ boost::shared_ptr<apache::thrift::transport::TPipedTransportFactory> transportFactory_;
+ boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> memoryBuffer_;
+ boost::shared_ptr<apache::thrift::transport::TTransport> targetTransport_;
};
-}}} // facebook::thrift::processor
+}}} // apache::thrift::processor
#endif
diff --git a/lib/cpp/src/processor/StatsProcessor.h b/lib/cpp/src/processor/StatsProcessor.h
index 140a1d4..2cccab1 100644
--- a/lib/cpp/src/processor/StatsProcessor.h
+++ b/lib/cpp/src/processor/StatsProcessor.h
@@ -12,14 +12,14 @@
#include <protocol/TProtocol.h>
#include <TProcessor.h>
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
/*
* Class for keeping track of function call statistics and printing them if desired
*
* @author James Wang <jwang@facebook.com>
*/
-class StatsProcessor : public facebook::thrift::TProcessor {
+class StatsProcessor : public apache::thrift::TProcessor {
public:
StatsProcessor(bool print, bool frequency)
: print_(print),
@@ -27,20 +27,20 @@
{}
virtual ~StatsProcessor() {};
- virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot) {
+ virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot) {
piprot_ = piprot;
std::string fname;
- facebook::thrift::protocol::TMessageType mtype;
+ apache::thrift::protocol::TMessageType mtype;
int32_t seqid;
piprot_->readMessageBegin(fname, mtype, seqid);
- if (mtype != facebook::thrift::protocol::T_CALL) {
+ if (mtype != apache::thrift::protocol::T_CALL) {
if (print_) {
printf("Unknown message type\n");
}
- throw facebook::thrift::TException("Unexpected message type");
+ throw apache::thrift::TException("Unexpected message type");
}
if (print_) {
printf("%s (", fname.c_str());
@@ -53,12 +53,12 @@
}
}
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
while (true) {
piprot_->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
@@ -79,9 +79,9 @@
}
protected:
- void printAndPassToBuffer(facebook::thrift::protocol::TType ftype) {
+ void printAndPassToBuffer(apache::thrift::protocol::TType ftype) {
switch (ftype) {
- case facebook::thrift::protocol::T_BOOL:
+ case apache::thrift::protocol::T_BOOL:
{
bool boolv;
piprot_->readBool(boolv);
@@ -90,7 +90,7 @@
}
}
break;
- case facebook::thrift::protocol::T_BYTE:
+ case apache::thrift::protocol::T_BYTE:
{
int8_t bytev;
piprot_->readByte(bytev);
@@ -99,7 +99,7 @@
}
}
break;
- case facebook::thrift::protocol::T_I16:
+ case apache::thrift::protocol::T_I16:
{
int16_t i16;
piprot_->readI16(i16);
@@ -108,7 +108,7 @@
}
}
break;
- case facebook::thrift::protocol::T_I32:
+ case apache::thrift::protocol::T_I32:
{
int32_t i32;
piprot_->readI32(i32);
@@ -117,7 +117,7 @@
}
}
break;
- case facebook::thrift::protocol::T_I64:
+ case apache::thrift::protocol::T_I64:
{
int64_t i64;
piprot_->readI64(i64);
@@ -126,7 +126,7 @@
}
}
break;
- case facebook::thrift::protocol::T_DOUBLE:
+ case apache::thrift::protocol::T_DOUBLE:
{
double dub;
piprot_->readDouble(dub);
@@ -135,7 +135,7 @@
}
}
break;
- case facebook::thrift::protocol::T_STRING:
+ case apache::thrift::protocol::T_STRING:
{
std::string str;
piprot_->readString(str);
@@ -144,18 +144,18 @@
}
}
break;
- case facebook::thrift::protocol::T_STRUCT:
+ case apache::thrift::protocol::T_STRUCT:
{
std::string name;
int16_t fid;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
piprot_->readStructBegin(name);
if (print_) {
printf("<");
}
while (true) {
piprot_->readFieldBegin(name, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
printAndPassToBuffer(ftype);
@@ -170,10 +170,10 @@
}
}
break;
- case facebook::thrift::protocol::T_MAP:
+ case apache::thrift::protocol::T_MAP:
{
- facebook::thrift::protocol::TType keyType;
- facebook::thrift::protocol::TType valType;
+ apache::thrift::protocol::TType keyType;
+ apache::thrift::protocol::TType valType;
uint32_t i, size;
piprot_->readMapBegin(keyType, valType, size);
if (print_) {
@@ -195,9 +195,9 @@
}
}
break;
- case facebook::thrift::protocol::T_SET:
+ case apache::thrift::protocol::T_SET:
{
- facebook::thrift::protocol::TType elemType;
+ apache::thrift::protocol::TType elemType;
uint32_t i, size;
piprot_->readSetBegin(elemType, size);
if (print_) {
@@ -215,9 +215,9 @@
}
}
break;
- case facebook::thrift::protocol::T_LIST:
+ case apache::thrift::protocol::T_LIST:
{
- facebook::thrift::protocol::TType elemType;
+ apache::thrift::protocol::TType elemType;
uint32_t i, size;
piprot_->readListBegin(elemType, size);
if (print_) {
@@ -240,13 +240,13 @@
}
}
- boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot_;
+ boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot_;
std::map<std::string, int64_t> frequency_map_;
bool print_;
bool frequency_;
};
-}}} // facebook::thrift::processor
+}}} // apache::thrift::processor
#endif
diff --git a/lib/cpp/src/protocol/TBase64Utils.cpp b/lib/cpp/src/protocol/TBase64Utils.cpp
index beb659f..b294eec 100644
--- a/lib/cpp/src/protocol/TBase64Utils.cpp
+++ b/lib/cpp/src/protocol/TBase64Utils.cpp
@@ -10,7 +10,7 @@
using std::string;
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
static const uint8_t *kBase64EncodeTable = (const uint8_t *)
@@ -63,4 +63,4 @@
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TBase64Utils.h b/lib/cpp/src/protocol/TBase64Utils.h
index ec3daf3..f81476d 100644
--- a/lib/cpp/src/protocol/TBase64Utils.h
+++ b/lib/cpp/src/protocol/TBase64Utils.h
@@ -9,7 +9,7 @@
#include <string>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
// in must be at least len bytes
// len must be 1, 2, or 3
@@ -23,6 +23,6 @@
// no '=' padding should be included in the input
void base64_decode(uint8_t *buf, uint32_t len);
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #define _THRIFT_PROTOCOL_TBASE64UTILS_H_
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.cpp b/lib/cpp/src/protocol/TBinaryProtocol.cpp
index 2962180..2da5c11 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.cpp
+++ b/lib/cpp/src/protocol/TBinaryProtocol.cpp
@@ -51,7 +51,7 @@
}
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
uint32_t TBinaryProtocol::writeMessageBegin(const std::string& name,
const TMessageType messageType,
@@ -419,4 +419,4 @@
return (uint32_t)size;
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/protocol/TBinaryProtocol.h
index a6a8983..b38b493 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.h
+++ b/lib/cpp/src/protocol/TBinaryProtocol.h
@@ -11,7 +11,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* The default binary protocol for thrift. Writes all data in a very basic
@@ -237,6 +237,6 @@
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TDebugProtocol.cpp b/lib/cpp/src/protocol/TDebugProtocol.cpp
index 92e9d36..05291ef 100644
--- a/lib/cpp/src/protocol/TDebugProtocol.cpp
+++ b/lib/cpp/src/protocol/TDebugProtocol.cpp
@@ -25,7 +25,7 @@
}
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
string TDebugProtocol::fieldTypeName(TType type) {
switch (type) {
@@ -330,4 +330,4 @@
return TDebugProtocol::writeString(str);
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TDebugProtocol.h b/lib/cpp/src/protocol/TDebugProtocol.h
index dbad1e3..fa4b807 100644
--- a/lib/cpp/src/protocol/TDebugProtocol.h
+++ b/lib/cpp/src/protocol/TDebugProtocol.h
@@ -12,7 +12,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/*
@@ -153,18 +153,18 @@
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
// TODO(dreiss): Move (part of) ThriftDebugString into a .cpp file and remove this.
#include <transport/TBufferTransports.h>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
template<typename ThriftStruct>
std::string ThriftDebugString(const ThriftStruct& ts) {
- using namespace facebook::thrift::transport;
- using namespace facebook::thrift::protocol;
+ using namespace apache::thrift::transport;
+ using namespace apache::thrift::protocol;
TMemoryBuffer* buffer = new TMemoryBuffer;
boost::shared_ptr<TTransport> trans(buffer);
TDebugProtocol protocol(trans);
@@ -181,8 +181,8 @@
#if 0
template<typename Object>
std::string DebugString(const std::vector<Object>& vec) {
- using namespace facebook::thrift::transport;
- using namespace facebook::thrift::protocol;
+ using namespace apache::thrift::transport;
+ using namespace apache::thrift::protocol;
TMemoryBuffer* buffer = new TMemoryBuffer;
boost::shared_ptr<TTransport> trans(buffer);
TDebugProtocol protocol(trans);
@@ -205,7 +205,7 @@
}
#endif // 0
-}} // facebook::thrift
+}} // apache::thrift
#endif // #ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TDenseProtocol.cpp b/lib/cpp/src/protocol/TDenseProtocol.cpp
index d1602a0..70059b3 100644
--- a/lib/cpp/src/protocol/TDenseProtocol.cpp
+++ b/lib/cpp/src/protocol/TDenseProtocol.cpp
@@ -104,10 +104,10 @@
#define UNLIKELY(val) (val)
#endif
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
const int TDenseProtocol::FP_PREFIX_LEN =
- facebook::thrift::reflection::local::FP_PREFIX_LEN;
+ apache::thrift::reflection::local::FP_PREFIX_LEN;
// Top TypeSpec. TypeSpec of the structure being encoded.
#define TTS (ts_stack_.back()) // type = TypeSpec*
@@ -746,4 +746,4 @@
return xfer + readStringBody(str, size);
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TDenseProtocol.h b/lib/cpp/src/protocol/TDenseProtocol.h
index 5dd5a8c..4692132 100644
--- a/lib/cpp/src/protocol/TDenseProtocol.h
+++ b/lib/cpp/src/protocol/TDenseProtocol.h
@@ -9,7 +9,7 @@
#include "TBinaryProtocol.h"
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* !!!WARNING!!!
@@ -51,7 +51,7 @@
static const int32_t VERSION_2 = 0x80020000;
public:
- typedef facebook::thrift::reflection::local::TypeSpec TypeSpec;
+ typedef apache::thrift::reflection::local::TypeSpec TypeSpec;
static const int FP_PREFIX_LEN;
/**
@@ -236,6 +236,6 @@
bool standalone_;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TJSONProtocol.cpp b/lib/cpp/src/protocol/TJSONProtocol.cpp
index ca3a51f..01fe471 100644
--- a/lib/cpp/src/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/protocol/TJSONProtocol.cpp
@@ -11,9 +11,9 @@
#include "TBase64Utils.h"
#include <transport/TTransportException.h>
-using namespace facebook::thrift::transport;
+using namespace apache::thrift::transport;
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
// Static data
@@ -874,7 +874,7 @@
// Check if we hit the end of the list
uint8_t ch = reader_.peek();
if (ch == kJSONObjectEnd) {
- fieldType = facebook::thrift::protocol::T_STOP;
+ fieldType = apache::thrift::protocol::T_STOP;
}
else {
uint64_t tmpVal = 0;
@@ -982,4 +982,4 @@
return readJSONBase64(str);
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
diff --git a/lib/cpp/src/protocol/TJSONProtocol.h b/lib/cpp/src/protocol/TJSONProtocol.h
index cbf4ef8..4287adf 100644
--- a/lib/cpp/src/protocol/TJSONProtocol.h
+++ b/lib/cpp/src/protocol/TJSONProtocol.h
@@ -11,7 +11,7 @@
#include <stack>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
// Forward declaration
class TJSONContext;
@@ -299,18 +299,18 @@
}
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
// TODO(dreiss): Move part of ThriftJSONString into a .cpp file and remove this.
#include <transport/TBufferTransports.h>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
template<typename ThriftStruct>
std::string ThriftJSONString(const ThriftStruct& ts) {
- using namespace facebook::thrift::transport;
- using namespace facebook::thrift::protocol;
+ using namespace apache::thrift::transport;
+ using namespace apache::thrift::protocol;
TMemoryBuffer* buffer = new TMemoryBuffer;
boost::shared_ptr<TTransport> trans(buffer);
TJSONProtocol protocol(trans);
@@ -323,6 +323,6 @@
return std::string((char*)buf, (unsigned int)size);
}
-}} // facebook::thrift
+}} // apache::thrift
#endif // #define _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ 1
diff --git a/lib/cpp/src/protocol/TOneWayProtocol.h b/lib/cpp/src/protocol/TOneWayProtocol.h
index dda113f..ad5f8fa 100644
--- a/lib/cpp/src/protocol/TOneWayProtocol.h
+++ b/lib/cpp/src/protocol/TOneWayProtocol.h
@@ -9,7 +9,7 @@
#include "TProtocol.h"
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* Abstract class for implementing a protocol that can only be written,
@@ -288,6 +288,6 @@
std::string subclass_;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_
diff --git a/lib/cpp/src/protocol/TProtocol.h b/lib/cpp/src/protocol/TProtocol.h
index 1e9ce99..e4cfe0f 100644
--- a/lib/cpp/src/protocol/TProtocol.h
+++ b/lib/cpp/src/protocol/TProtocol.h
@@ -17,9 +17,9 @@
#include <string>
#include <map>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
-using facebook::thrift::transport::TTransport;
+using apache::thrift::transport::TTransport;
#ifdef HAVE_ENDIAN_H
#include <endian.h>
@@ -352,6 +352,6 @@
virtual boost::shared_ptr<TProtocol> getProtocol(boost::shared_ptr<TTransport> trans) = 0;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1
diff --git a/lib/cpp/src/protocol/TProtocolException.h b/lib/cpp/src/protocol/TProtocolException.h
index b3146d5..be0767b 100644
--- a/lib/cpp/src/protocol/TProtocolException.h
+++ b/lib/cpp/src/protocol/TProtocolException.h
@@ -9,7 +9,7 @@
#include <string>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* Class to encapsulate all the possible types of protocol errors that may
@@ -20,7 +20,7 @@
*
* @author Mark Slee <mcslee@facebook.com>
*/
-class TProtocolException : public facebook::thrift::TException {
+class TProtocolException : public apache::thrift::TException {
public:
/**
@@ -36,19 +36,19 @@
};
TProtocolException() :
- facebook::thrift::TException(),
+ apache::thrift::TException(),
type_(UNKNOWN) {}
TProtocolException(TProtocolExceptionType type) :
- facebook::thrift::TException(),
+ apache::thrift::TException(),
type_(type) {}
TProtocolException(const std::string& message) :
- facebook::thrift::TException(message),
+ apache::thrift::TException(message),
type_(UNKNOWN) {}
TProtocolException(TProtocolExceptionType type, const std::string& message) :
- facebook::thrift::TException(message),
+ apache::thrift::TException(message),
type_(type) {}
virtual ~TProtocolException() throw() {}
@@ -87,6 +87,6 @@
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_
diff --git a/lib/cpp/src/protocol/TProtocolTap.h b/lib/cpp/src/protocol/TProtocolTap.h
index 162f783..07f000d 100644
--- a/lib/cpp/src/protocol/TProtocolTap.h
+++ b/lib/cpp/src/protocol/TProtocolTap.h
@@ -9,9 +9,9 @@
#include <protocol/TOneWayProtocol.h>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
-using facebook::thrift::transport::TTransport;
+using apache::thrift::transport::TTransport;
/**
* Puts a wiretap on a protocol object. Any reads to this class are passed
@@ -170,6 +170,6 @@
boost::shared_ptr<TProtocol> sink_;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1
diff --git a/lib/cpp/src/reflection_limited_types.cpp b/lib/cpp/src/reflection_limited_types.cpp
index 2f53e9e..8bd4248 100644
--- a/lib/cpp/src/reflection_limited_types.cpp
+++ b/lib/cpp/src/reflection_limited_types.cpp
@@ -5,33 +5,33 @@
*/
#include "reflection_limited_types.h"
-namespace facebook { namespace thrift { namespace reflection { namespace limited {
+namespace apache { namespace thrift { namespace reflection { namespace limited {
const char* SimpleType::ascii_fingerprint = "19B5240589E680301A7E32DF3971EFBE";
const uint8_t SimpleType::binary_fingerprint[16] = {0x19,0xB5,0x24,0x05,0x89,0xE6,0x80,0x30,0x1A,0x7E,0x32,0xDF,0x39,0x71,0xEF,0xBE};
-uint32_t SimpleType::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t SimpleType::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
- using facebook::thrift::protocol::TProtocolException;
+ using apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
- if (ftype == facebook::thrift::protocol::T_I32) {
+ if (ftype == apache::thrift::protocol::T_I32) {
int32_t ecast0;
xfer += iprot->readI32(ecast0);
this->ttype = (TTypeTag)ecast0;
@@ -41,7 +41,7 @@
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_STRING) {
+ if (ftype == apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
@@ -60,13 +60,13 @@
return xfer;
}
-uint32_t SimpleType::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t SimpleType::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("SimpleType");
- xfer += oprot->writeFieldBegin("ttype", facebook::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeFieldBegin("ttype", apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32((int32_t)this->ttype);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -77,28 +77,28 @@
const char* ContainerType::ascii_fingerprint = "654FA6EFFF8242F4C2A604B970686634";
const uint8_t ContainerType::binary_fingerprint[16] = {0x65,0x4F,0xA6,0xEF,0xFF,0x82,0x42,0xF4,0xC2,0xA6,0x04,0xB9,0x70,0x68,0x66,0x34};
-uint32_t ContainerType::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t ContainerType::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
- using facebook::thrift::protocol::TProtocolException;
+ using apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
- if (ftype == facebook::thrift::protocol::T_I32) {
+ if (ftype == apache::thrift::protocol::T_I32) {
int32_t ecast1;
xfer += iprot->readI32(ecast1);
this->ttype = (TTypeTag)ecast1;
@@ -108,7 +108,7 @@
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_STRUCT) {
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->subtype1.read(iprot);
this->__isset.subtype1 = true;
} else {
@@ -116,7 +116,7 @@
}
break;
case 3:
- if (ftype == facebook::thrift::protocol::T_STRUCT) {
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->subtype2.read(iprot);
this->__isset.subtype2 = true;
} else {
@@ -135,17 +135,17 @@
return xfer;
}
-uint32_t ContainerType::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t ContainerType::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ContainerType");
- xfer += oprot->writeFieldBegin("ttype", facebook::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeFieldBegin("ttype", apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32((int32_t)this->ttype);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("subtype1", facebook::thrift::protocol::T_STRUCT, 2);
+ xfer += oprot->writeFieldBegin("subtype1", apache::thrift::protocol::T_STRUCT, 2);
xfer += this->subtype1.write(oprot);
xfer += oprot->writeFieldEnd();
if (this->__isset.subtype2) {
- xfer += oprot->writeFieldBegin("subtype2", facebook::thrift::protocol::T_STRUCT, 3);
+ xfer += oprot->writeFieldBegin("subtype2", apache::thrift::protocol::T_STRUCT, 3);
xfer += this->subtype2.write(oprot);
xfer += oprot->writeFieldEnd();
}
@@ -157,28 +157,28 @@
const char* ThriftType::ascii_fingerprint = "76BC1CC759001D7D85FEE75C4F183062";
const uint8_t ThriftType::binary_fingerprint[16] = {0x76,0xBC,0x1C,0xC7,0x59,0x00,0x1D,0x7D,0x85,0xFE,0xE7,0x5C,0x4F,0x18,0x30,0x62};
-uint32_t ThriftType::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t ThriftType::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
- using facebook::thrift::protocol::TProtocolException;
+ using apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
- if (ftype == facebook::thrift::protocol::T_BOOL) {
+ if (ftype == apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->is_container);
this->__isset.is_container = true;
} else {
@@ -186,7 +186,7 @@
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_STRUCT) {
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->simple_type.read(iprot);
this->__isset.simple_type = true;
} else {
@@ -194,7 +194,7 @@
}
break;
case 3:
- if (ftype == facebook::thrift::protocol::T_STRUCT) {
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->container_type.read(iprot);
this->__isset.container_type = true;
} else {
@@ -213,19 +213,19 @@
return xfer;
}
-uint32_t ThriftType::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t ThriftType::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ThriftType");
- xfer += oprot->writeFieldBegin("is_container", facebook::thrift::protocol::T_BOOL, 1);
+ xfer += oprot->writeFieldBegin("is_container", apache::thrift::protocol::T_BOOL, 1);
xfer += oprot->writeBool(this->is_container);
xfer += oprot->writeFieldEnd();
if (this->__isset.simple_type) {
- xfer += oprot->writeFieldBegin("simple_type", facebook::thrift::protocol::T_STRUCT, 2);
+ xfer += oprot->writeFieldBegin("simple_type", apache::thrift::protocol::T_STRUCT, 2);
xfer += this->simple_type.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.container_type) {
- xfer += oprot->writeFieldBegin("container_type", facebook::thrift::protocol::T_STRUCT, 3);
+ xfer += oprot->writeFieldBegin("container_type", apache::thrift::protocol::T_STRUCT, 3);
xfer += this->container_type.write(oprot);
xfer += oprot->writeFieldEnd();
}
@@ -237,28 +237,28 @@
const char* Argument::ascii_fingerprint = "8C45506BE0EFBB22FB19FA40DDCECB3F";
const uint8_t Argument::binary_fingerprint[16] = {0x8C,0x45,0x50,0x6B,0xE0,0xEF,0xBB,0x22,0xFB,0x19,0xFA,0x40,0xDD,0xCE,0xCB,0x3F};
-uint32_t Argument::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t Argument::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
- using facebook::thrift::protocol::TProtocolException;
+ using apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
- if (ftype == facebook::thrift::protocol::T_I16) {
+ if (ftype == apache::thrift::protocol::T_I16) {
xfer += iprot->readI16(this->key);
this->__isset.key = true;
} else {
@@ -266,7 +266,7 @@
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_STRING) {
+ if (ftype == apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
@@ -274,7 +274,7 @@
}
break;
case 3:
- if (ftype == facebook::thrift::protocol::T_STRUCT) {
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->type.read(iprot);
this->__isset.type = true;
} else {
@@ -293,16 +293,16 @@
return xfer;
}
-uint32_t Argument::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t Argument::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Argument");
- xfer += oprot->writeFieldBegin("key", facebook::thrift::protocol::T_I16, 1);
+ xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_I16, 1);
xfer += oprot->writeI16(this->key);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("type", facebook::thrift::protocol::T_STRUCT, 3);
+ xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_STRUCT, 3);
xfer += this->type.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -313,28 +313,28 @@
const char* Method::ascii_fingerprint = "E6573428C492D24C84A19432D39A17B0";
const uint8_t Method::binary_fingerprint[16] = {0xE6,0x57,0x34,0x28,0xC4,0x92,0xD2,0x4C,0x84,0xA1,0x94,0x32,0xD3,0x9A,0x17,0xB0};
-uint32_t Method::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t Method::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
- using facebook::thrift::protocol::TProtocolException;
+ using apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
- if (ftype == facebook::thrift::protocol::T_STRING) {
+ if (ftype == apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
@@ -342,7 +342,7 @@
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_STRUCT) {
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->return_type.read(iprot);
this->__isset.return_type = true;
} else {
@@ -350,11 +350,11 @@
}
break;
case 3:
- if (ftype == facebook::thrift::protocol::T_LIST) {
+ if (ftype == apache::thrift::protocol::T_LIST) {
{
this->arguments.clear();
uint32_t _size2;
- facebook::thrift::protocol::TType _etype5;
+ apache::thrift::protocol::TType _etype5;
iprot->readListBegin(_etype5, _size2);
this->arguments.resize(_size2);
uint32_t _i6;
@@ -381,18 +381,18 @@
return xfer;
}
-uint32_t Method::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t Method::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Method");
- xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("return_type", facebook::thrift::protocol::T_STRUCT, 2);
+ xfer += oprot->writeFieldBegin("return_type", apache::thrift::protocol::T_STRUCT, 2);
xfer += this->return_type.write(oprot);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("arguments", facebook::thrift::protocol::T_LIST, 3);
+ xfer += oprot->writeFieldBegin("arguments", apache::thrift::protocol::T_LIST, 3);
{
- xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRUCT, this->arguments.size());
+ xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->arguments.size());
std::vector<Argument> ::const_iterator _iter7;
for (_iter7 = this->arguments.begin(); _iter7 != this->arguments.end(); ++_iter7)
{
@@ -409,28 +409,28 @@
const char* Service::ascii_fingerprint = "4673B0777B701D9B02A7A74CEC7908A7";
const uint8_t Service::binary_fingerprint[16] = {0x46,0x73,0xB0,0x77,0x7B,0x70,0x1D,0x9B,0x02,0xA7,0xA7,0x4C,0xEC,0x79,0x08,0xA7};
-uint32_t Service::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t Service::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
- using facebook::thrift::protocol::TProtocolException;
+ using apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
- if (ftype == facebook::thrift::protocol::T_STRING) {
+ if (ftype == apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
@@ -438,11 +438,11 @@
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_LIST) {
+ if (ftype == apache::thrift::protocol::T_LIST) {
{
this->methods.clear();
uint32_t _size8;
- facebook::thrift::protocol::TType _etype11;
+ apache::thrift::protocol::TType _etype11;
iprot->readListBegin(_etype11, _size8);
this->methods.resize(_size8);
uint32_t _i12;
@@ -458,7 +458,7 @@
}
break;
case 3:
- if (ftype == facebook::thrift::protocol::T_BOOL) {
+ if (ftype == apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->fully_reflected);
this->__isset.fully_reflected = true;
} else {
@@ -477,15 +477,15 @@
return xfer;
}
-uint32_t Service::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t Service::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Service");
- xfer += oprot->writeFieldBegin("name", facebook::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("methods", facebook::thrift::protocol::T_LIST, 2);
+ xfer += oprot->writeFieldBegin("methods", apache::thrift::protocol::T_LIST, 2);
{
- xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRUCT, this->methods.size());
+ xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->methods.size());
std::vector<Method> ::const_iterator _iter13;
for (_iter13 = this->methods.begin(); _iter13 != this->methods.end(); ++_iter13)
{
@@ -494,7 +494,7 @@
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("fully_reflected", facebook::thrift::protocol::T_BOOL, 3);
+ xfer += oprot->writeFieldBegin("fully_reflected", apache::thrift::protocol::T_BOOL, 3);
xfer += oprot->writeBool(this->fully_reflected);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
diff --git a/lib/cpp/src/reflection_limited_types.h b/lib/cpp/src/reflection_limited_types.h
index 23bf83b..570397a 100644
--- a/lib/cpp/src/reflection_limited_types.h
+++ b/lib/cpp/src/reflection_limited_types.h
@@ -13,7 +13,7 @@
-namespace facebook { namespace thrift { namespace reflection { namespace limited {
+namespace apache { namespace thrift { namespace reflection { namespace limited {
enum TTypeTag {
T_VOID = 1,
@@ -66,8 +66,8 @@
bool operator < (const SimpleType & ) const;
- uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
- uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
};
@@ -111,8 +111,8 @@
bool operator < (const ContainerType & ) const;
- uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
- uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
};
@@ -158,8 +158,8 @@
bool operator < (const ThriftType & ) const;
- uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
- uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
};
@@ -201,8 +201,8 @@
bool operator < (const Argument & ) const;
- uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
- uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
};
@@ -244,8 +244,8 @@
bool operator < (const Method & ) const;
- uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
- uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
};
@@ -287,8 +287,8 @@
bool operator < (const Service & ) const;
- uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
- uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
};
diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index 06f11aa..8644526 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -16,11 +16,11 @@
#include <errno.h>
#include <assert.h>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::concurrency;
using namespace std;
class TConnection::Task: public Runnable {
@@ -685,4 +685,4 @@
event_base_loop(eventBase_, 0);
}
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/server/TNonblockingServer.h
index a2d6533..cf024ed 100644
--- a/lib/cpp/src/server/TNonblockingServer.h
+++ b/lib/cpp/src/server/TNonblockingServer.h
@@ -17,12 +17,12 @@
#include <cstdlib>
#include <event.h>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
-using facebook::thrift::transport::TMemoryBuffer;
-using facebook::thrift::protocol::TProtocol;
-using facebook::thrift::concurrency::Runnable;
-using facebook::thrift::concurrency::ThreadManager;
+using apache::thrift::transport::TMemoryBuffer;
+using apache::thrift::protocol::TProtocol;
+using apache::thrift::concurrency::Runnable;
+using apache::thrift::concurrency::ThreadManager;
// Forward declaration of class
class TConnection;
@@ -300,7 +300,7 @@
TConnection(int socket, short eventFlags, TNonblockingServer *s) {
readBuffer_ = (uint8_t*)std::malloc(1024);
if (readBuffer_ == NULL) {
- throw new facebook::thrift::TException("Out of memory.");
+ throw new apache::thrift::TException("Out of memory.");
}
readBufferSize_ = 1024;
@@ -341,6 +341,6 @@
};
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_
diff --git a/lib/cpp/src/server/TServer.cpp b/lib/cpp/src/server/TServer.cpp
index 6febf98..a21fab6 100644
--- a/lib/cpp/src/server/TServer.cpp
+++ b/lib/cpp/src/server/TServer.cpp
@@ -8,7 +8,7 @@
#include <sys/resource.h>
#include <unistd.h>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
int increase_max_fds(int max_fds=(1<<24)) {
struct rlimit fdmaxrl;
@@ -22,4 +22,4 @@
return fdmaxrl.rlim_cur;
}
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TServer.h b/lib/cpp/src/server/TServer.h
index f05b2eb..c30b561 100644
--- a/lib/cpp/src/server/TServer.h
+++ b/lib/cpp/src/server/TServer.h
@@ -14,15 +14,15 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
-using facebook::thrift::TProcessor;
-using facebook::thrift::protocol::TBinaryProtocolFactory;
-using facebook::thrift::protocol::TProtocol;
-using facebook::thrift::protocol::TProtocolFactory;
-using facebook::thrift::transport::TServerTransport;
-using facebook::thrift::transport::TTransport;
-using facebook::thrift::transport::TTransportFactory;
+using apache::thrift::TProcessor;
+using apache::thrift::protocol::TBinaryProtocolFactory;
+using apache::thrift::protocol::TProtocol;
+using apache::thrift::protocol::TProtocolFactory;
+using apache::thrift::transport::TServerTransport;
+using apache::thrift::transport::TTransport;
+using apache::thrift::transport::TTransportFactory;
/**
* Virtual interface class that can handle events from the server core. To
@@ -196,6 +196,6 @@
int increase_max_fds(int max_fds=(1<<24));
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
#endif // #ifndef _THRIFT_SERVER_TSERVER_H_
diff --git a/lib/cpp/src/server/TSimpleServer.cpp b/lib/cpp/src/server/TSimpleServer.cpp
index f3011a2..08309b2 100644
--- a/lib/cpp/src/server/TSimpleServer.cpp
+++ b/lib/cpp/src/server/TSimpleServer.cpp
@@ -9,12 +9,12 @@
#include <string>
#include <iostream>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
using boost::shared_ptr;
/**
@@ -103,4 +103,4 @@
}
}
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TSimpleServer.h b/lib/cpp/src/server/TSimpleServer.h
index 1ab6f07..8bed8c2 100644
--- a/lib/cpp/src/server/TSimpleServer.h
+++ b/lib/cpp/src/server/TSimpleServer.h
@@ -10,7 +10,7 @@
#include "server/TServer.h"
#include "transport/TServerTransport.h"
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
/**
* This is the most basic simple server. It is single-threaded and runs a
@@ -53,6 +53,6 @@
};
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_
diff --git a/lib/cpp/src/server/TThreadPoolServer.cpp b/lib/cpp/src/server/TThreadPoolServer.cpp
index 55a73d3..4924044 100644
--- a/lib/cpp/src/server/TThreadPoolServer.cpp
+++ b/lib/cpp/src/server/TThreadPoolServer.cpp
@@ -11,14 +11,14 @@
#include <string>
#include <iostream>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
using boost::shared_ptr;
using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::concurrency;
-using namespace facebook::thrift::protocol;;
-using namespace facebook::thrift::transport;
+using namespace apache::thrift;
+using namespace apache::thrift::concurrency;
+using namespace apache::thrift::protocol;;
+using namespace apache::thrift::transport;
class TThreadPoolServer::Task : public Runnable {
@@ -201,4 +201,4 @@
timeout_ = value;
}
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TThreadPoolServer.h b/lib/cpp/src/server/TThreadPoolServer.h
index f27e8f7..0cd3a4a 100644
--- a/lib/cpp/src/server/TThreadPoolServer.h
+++ b/lib/cpp/src/server/TThreadPoolServer.h
@@ -13,12 +13,12 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
-using facebook::thrift::concurrency::ThreadManager;
-using facebook::thrift::protocol::TProtocolFactory;
-using facebook::thrift::transport::TServerTransport;
-using facebook::thrift::transport::TTransportFactory;
+using apache::thrift::concurrency::ThreadManager;
+using apache::thrift::protocol::TProtocolFactory;
+using apache::thrift::transport::TServerTransport;
+using apache::thrift::transport::TTransportFactory;
class TThreadPoolServer : public TServer {
public:
@@ -61,6 +61,6 @@
};
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
#endif // #ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_
diff --git a/lib/cpp/src/server/TThreadedServer.cpp b/lib/cpp/src/server/TThreadedServer.cpp
index a08fd54..4840b7f 100644
--- a/lib/cpp/src/server/TThreadedServer.cpp
+++ b/lib/cpp/src/server/TThreadedServer.cpp
@@ -13,14 +13,14 @@
#include <pthread.h>
#include <unistd.h>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
using boost::shared_ptr;
using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::concurrency;
class TThreadedServer::Task: public Runnable {
@@ -217,4 +217,4 @@
}
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
diff --git a/lib/cpp/src/server/TThreadedServer.h b/lib/cpp/src/server/TThreadedServer.h
index 28d3549..8294f69 100644
--- a/lib/cpp/src/server/TThreadedServer.h
+++ b/lib/cpp/src/server/TThreadedServer.h
@@ -14,13 +14,13 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace server {
+namespace apache { namespace thrift { namespace server {
-using facebook::thrift::TProcessor;
-using facebook::thrift::transport::TServerTransport;
-using facebook::thrift::transport::TTransportFactory;
-using facebook::thrift::concurrency::Monitor;
-using facebook::thrift::concurrency::ThreadFactory;
+using apache::thrift::TProcessor;
+using apache::thrift::transport::TServerTransport;
+using apache::thrift::transport::TTransportFactory;
+using apache::thrift::concurrency::Monitor;
+using apache::thrift::concurrency::ThreadFactory;
class TThreadedServer : public TServer {
@@ -50,6 +50,6 @@
};
-}}} // facebook::thrift::server
+}}} // apache::thrift::server
#endif // #ifndef _THRIFT_SERVER_TTHREADEDSERVER_H_
diff --git a/lib/cpp/src/transport/TBufferTransports.cpp b/lib/cpp/src/transport/TBufferTransports.cpp
index 1583014..8829b48 100644
--- a/lib/cpp/src/transport/TBufferTransports.cpp
+++ b/lib/cpp/src/transport/TBufferTransports.cpp
@@ -11,7 +11,7 @@
using std::string;
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
uint32_t TBufferedTransport::readSlow(uint8_t* buf, uint32_t len) {
@@ -354,4 +354,4 @@
return NULL;
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TBufferTransports.h b/lib/cpp/src/transport/TBufferTransports.h
index 334ad51..f0298df 100644
--- a/lib/cpp/src/transport/TBufferTransports.h
+++ b/lib/cpp/src/transport/TBufferTransports.h
@@ -20,7 +20,7 @@
#define TDB_UNLIKELY(val) (val)
#endif
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
@@ -660,6 +660,6 @@
// you add new members.
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_
diff --git a/lib/cpp/src/transport/TFDTransport.cpp b/lib/cpp/src/transport/TFDTransport.cpp
index bbdcb19..dbc7e4e 100644
--- a/lib/cpp/src/transport/TFDTransport.cpp
+++ b/lib/cpp/src/transport/TFDTransport.cpp
@@ -13,7 +13,7 @@
using namespace std;
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
void TFDTransport::close() {
if (!isOpen()) {
@@ -61,4 +61,4 @@
}
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TFDTransport.h b/lib/cpp/src/transport/TFDTransport.h
index 7cb6140..56408ca 100644
--- a/lib/cpp/src/transport/TFDTransport.h
+++ b/lib/cpp/src/transport/TFDTransport.h
@@ -13,7 +13,7 @@
#include "TTransport.h"
#include "TServerSocket.h"
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* Dead-simple wrapper around a file descriptor.
@@ -56,6 +56,6 @@
ClosePolicy close_policy_;
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TFDTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp
index 121b4df..3bc2b91 100644
--- a/lib/cpp/src/transport/TFileTransport.cpp
+++ b/lib/cpp/src/transport/TFileTransport.cpp
@@ -28,11 +28,11 @@
#include <iostream>
#include <sys/stat.h>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
using boost::shared_ptr;
using namespace std;
-using namespace facebook::thrift::protocol;
+using namespace apache::thrift::protocol;
#ifndef HAVE_CLOCK_GETTIME
@@ -938,4 +938,4 @@
}
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TFileTransport.h b/lib/cpp/src/transport/TFileTransport.h
index c4c921e..66f17d3 100644
--- a/lib/cpp/src/transport/TFileTransport.h
+++ b/lib/cpp/src/transport/TFileTransport.h
@@ -16,10 +16,10 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
-using facebook::thrift::TProcessor;
-using facebook::thrift::protocol::TProtocolFactory;
+using apache::thrift::TProcessor;
+using apache::thrift::protocol::TProtocolFactory;
// Data pertaining to a single event
typedef struct eventInfo {
@@ -424,6 +424,6 @@
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // _THRIFT_TRANSPORT_TFILETRANSPORT_H_
diff --git a/lib/cpp/src/transport/THttpClient.cpp b/lib/cpp/src/transport/THttpClient.cpp
index 8c82d7f..fffb4bd 100644
--- a/lib/cpp/src/transport/THttpClient.cpp
+++ b/lib/cpp/src/transport/THttpClient.cpp
@@ -10,7 +10,7 @@
#include "THttpClient.h"
#include "TSocket.h"
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
using namespace std;
@@ -333,4 +333,4 @@
readHeaders_ = true;
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/THttpClient.h b/lib/cpp/src/transport/THttpClient.h
index dbffe99..b0fa28e 100644
--- a/lib/cpp/src/transport/THttpClient.h
+++ b/lib/cpp/src/transport/THttpClient.h
@@ -9,7 +9,7 @@
#include <transport/TBufferTransports.h>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* HTTP client implementation of the thrift transport. This was irritating
@@ -94,6 +94,6 @@
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_
diff --git a/lib/cpp/src/transport/TServerSocket.cpp b/lib/cpp/src/transport/TServerSocket.cpp
index 3493fc0..69f5217 100644
--- a/lib/cpp/src/transport/TServerSocket.cpp
+++ b/lib/cpp/src/transport/TServerSocket.cpp
@@ -18,7 +18,7 @@
#include "TServerSocket.h"
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
using namespace std;
using boost::shared_ptr;
@@ -350,4 +350,4 @@
intSock2_ = -1;
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TServerSocket.h b/lib/cpp/src/transport/TServerSocket.h
index b6bafa0..b406b78 100644
--- a/lib/cpp/src/transport/TServerSocket.h
+++ b/lib/cpp/src/transport/TServerSocket.h
@@ -10,7 +10,7 @@
#include "TServerTransport.h"
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
class TSocket;
@@ -59,6 +59,6 @@
int intSock2_;
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TSERVERSOCKET_H_
diff --git a/lib/cpp/src/transport/TServerTransport.h b/lib/cpp/src/transport/TServerTransport.h
index b8e6b97..612a94c 100644
--- a/lib/cpp/src/transport/TServerTransport.h
+++ b/lib/cpp/src/transport/TServerTransport.h
@@ -11,7 +11,7 @@
#include "TTransportException.h"
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* Server transport framework. A server needs to have some facility for
@@ -75,6 +75,6 @@
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TShortReadTransport.h b/lib/cpp/src/transport/TShortReadTransport.h
index 428fa9e..8b9b192 100644
--- a/lib/cpp/src/transport/TShortReadTransport.h
+++ b/lib/cpp/src/transport/TShortReadTransport.h
@@ -11,7 +11,7 @@
#include <transport/TTransport.h>
-namespace facebook { namespace thrift { namespace transport { namespace test {
+namespace apache { namespace thrift { namespace transport { namespace test {
/**
* This class is only meant for testing. It wraps another transport.
@@ -79,6 +79,6 @@
double fullProb_;
};
-}}}} // facebook::thrift::transport::test
+}}}} // apache::thrift::transport::test
#endif // #ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TSocket.cpp b/lib/cpp/src/transport/TSocket.cpp
index 46cd2b4..04cd81e 100644
--- a/lib/cpp/src/transport/TSocket.cpp
+++ b/lib/cpp/src/transport/TSocket.cpp
@@ -22,7 +22,7 @@
#include "TSocket.h"
#include "TTransportException.h"
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
using namespace std;
@@ -556,4 +556,4 @@
return peerPort_;
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TSocket.h b/lib/cpp/src/transport/TSocket.h
index 8d4a5a7..27baa99 100644
--- a/lib/cpp/src/transport/TSocket.h
+++ b/lib/cpp/src/transport/TSocket.h
@@ -13,7 +13,7 @@
#include "TTransport.h"
#include "TServerSocket.h"
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* TCP Socket implementation of the TTransport interface.
@@ -225,7 +225,7 @@
struct timeval recvTimeval_;
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TSOCKET_H_
diff --git a/lib/cpp/src/transport/TSocketPool.cpp b/lib/cpp/src/transport/TSocketPool.cpp
index d5a6501..549569f 100644
--- a/lib/cpp/src/transport/TSocketPool.cpp
+++ b/lib/cpp/src/transport/TSocketPool.cpp
@@ -9,7 +9,7 @@
#include "TSocketPool.h"
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
using namespace std;
@@ -221,4 +221,4 @@
}
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TSocketPool.h b/lib/cpp/src/transport/TSocketPool.h
index a455aca..b72dfb2 100644
--- a/lib/cpp/src/transport/TSocketPool.h
+++ b/lib/cpp/src/transport/TSocketPool.h
@@ -10,7 +10,7 @@
#include <vector>
#include "TSocket.h"
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* Class to hold server information for TSocketPool
@@ -174,7 +174,7 @@
bool alwaysTryLast_;
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TSOCKETPOOL_H_
diff --git a/lib/cpp/src/transport/TTransport.h b/lib/cpp/src/transport/TTransport.h
index d775d4e..e2e30f8 100644
--- a/lib/cpp/src/transport/TTransport.h
+++ b/lib/cpp/src/transport/TTransport.h
@@ -12,7 +12,7 @@
#include <transport/TTransportException.h>
#include <string>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* Generic interface for a method of transporting data. A TTransport may be
@@ -208,6 +208,6 @@
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_
diff --git a/lib/cpp/src/transport/TTransportException.cpp b/lib/cpp/src/transport/TTransportException.cpp
index e231a93..e48fe93 100644
--- a/lib/cpp/src/transport/TTransportException.cpp
+++ b/lib/cpp/src/transport/TTransportException.cpp
@@ -12,7 +12,7 @@
using std::string;
using boost::lexical_cast;
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TTransportException.h b/lib/cpp/src/transport/TTransportException.h
index e254aac..d0c44cf 100644
--- a/lib/cpp/src/transport/TTransportException.h
+++ b/lib/cpp/src/transport/TTransportException.h
@@ -10,7 +10,7 @@
#include <string>
#include <Thrift.h>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* Class to encapsulate all the possible types of transport errors that may
@@ -21,7 +21,7 @@
*
* @author Mark Slee <mcslee@facebook.com>
*/
-class TTransportException : public facebook::thrift::TException {
+class TTransportException : public apache::thrift::TException {
public:
/**
* Error codes for the various types of exceptions.
@@ -39,25 +39,25 @@
};
TTransportException() :
- facebook::thrift::TException(),
+ apache::thrift::TException(),
type_(UNKNOWN) {}
TTransportException(TTransportExceptionType type) :
- facebook::thrift::TException(),
+ apache::thrift::TException(),
type_(type) {}
TTransportException(const std::string& message) :
- facebook::thrift::TException(message),
+ apache::thrift::TException(message),
type_(UNKNOWN) {}
TTransportException(TTransportExceptionType type, const std::string& message) :
- facebook::thrift::TException(message),
+ apache::thrift::TException(message),
type_(type) {}
TTransportException(TTransportExceptionType type,
const std::string& message,
int errno_copy) :
- facebook::thrift::TException(message + ": " + TOutput::strerror_s(errno_copy)),
+ apache::thrift::TException(message + ": " + TOutput::strerror_s(errno_copy)),
type_(type) {}
virtual ~TTransportException() throw() {}
@@ -100,6 +100,6 @@
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_
diff --git a/lib/cpp/src/transport/TTransportUtils.cpp b/lib/cpp/src/transport/TTransportUtils.cpp
index d365a3c..6ce0c1a 100644
--- a/lib/cpp/src/transport/TTransportUtils.cpp
+++ b/lib/cpp/src/transport/TTransportUtils.cpp
@@ -8,7 +8,7 @@
using std::string;
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
uint32_t TPipedTransport::read(uint8_t* buf, uint32_t len) {
uint32_t need = len;
@@ -162,4 +162,4 @@
srcTrans_->seekToEnd();
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TTransportUtils.h b/lib/cpp/src/transport/TTransportUtils.h
index 61f6822..50ce859 100644
--- a/lib/cpp/src/transport/TTransportUtils.h
+++ b/lib/cpp/src/transport/TTransportUtils.h
@@ -16,7 +16,7 @@
#include <transport/TBufferTransports.h>
#include <transport/TFileTransport.h>
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
/**
* The null transport is a dummy transport that doesn't actually do anything.
@@ -274,6 +274,6 @@
}
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_
diff --git a/lib/cpp/src/transport/TZlibTransport.cpp b/lib/cpp/src/transport/TZlibTransport.cpp
index c14b039..7519d96 100644
--- a/lib/cpp/src/transport/TZlibTransport.cpp
+++ b/lib/cpp/src/transport/TZlibTransport.cpp
@@ -12,7 +12,7 @@
using std::string;
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
// Don't call this outside of the constructor.
void TZlibTransport::initZlib() {
@@ -283,4 +283,4 @@
}
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
diff --git a/lib/cpp/src/transport/TZlibTransport.h b/lib/cpp/src/transport/TZlibTransport.h
index c2c1849..482bfda 100644
--- a/lib/cpp/src/transport/TZlibTransport.h
+++ b/lib/cpp/src/transport/TZlibTransport.h
@@ -12,7 +12,7 @@
struct z_stream_s;
-namespace facebook { namespace thrift { namespace transport {
+namespace apache { namespace thrift { namespace transport {
class TZlibTransportException : public TTransportException {
public:
@@ -202,6 +202,6 @@
struct z_stream_s* wstream_;
};
-}}} // facebook::thrift::transport
+}}} // apache::thrift::transport
#endif // #ifndef _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_