1 Only in libjingle-0.4.0: Makefile.in
2 diff -r libjingle-0.4.0/README libjingle/files/README
6 < Libjingle is a set of components provided by Google to interoperate with Google
7 < Talk's peer-to-peer and voice capabilities. This package will create several
8 < static libraries you may link to your project as needed.
10 < -talk - No source files in talk/, just these subdirectories
11 < |-base - Contains basic low-level portable utility functions for
12 < | things like threads and sockets
13 < |-p2p - The P2P stack
14 < |-base - Base p2p functionality
15 < |-client - Hooks to tie it into XMPP
16 < |-session - Signaling
17 < |-phone - Signaling code specific to making phone calls
18 < |-third_party - Components that aren't ours
19 < |-mediastreamer - Media components for dealing with sound hardware and
21 < |-xmllite - XML parser
22 < |-xmpp - XMPP engine
24 < In addition, this package contains two examples in talk/examples which
25 < illustrate the basic concepts of how the provided classes work.
27 < The xmllite component of libjingle depends on expat. You can download expat
28 < from http://expat.sourceforge.net/.
30 < mediastreamer, the media components used by the example applications depend on
31 < the oRTP and iLBC components from linphone, which can be found at
32 < http://www.linphone.org. Linphone, in turn depends on GLib, which can be found
33 < at http://www.gtk.org. This GLib dependency should be removed in future
38 < Once the dependencies are installed, run ./configure. ./configure will return
39 < an error if it failed to locate the proper dependencies. If ./configure
40 < succeeds, run 'make' to build the components and examples.
42 < When the build is complete, you can run the call example from
46 > Libjingle is a set of components provided by Google to interoperate with Google
47 > Talk's peer-to-peer and voice capabilities. This package will create several
48 > static libraries you may link to your project as needed.
50 > -talk - No source files in talk/, just these subdirectories
51 > |-base - Contains basic low-level portable utility functions for
52 > | things like threads and sockets
53 > |-p2p - The P2P stack
54 > |-base - Base p2p functionality
55 > |-client - Hooks to tie it into XMPP
56 > |-session - Signaling
57 > |-phone - Signaling code specific to making phone calls
58 > |-third_party - Components that aren't ours
59 > |-mediastreamer - Media components for dealing with sound hardware and
61 > |-xmllite - XML parser
62 > |-xmpp - XMPP engine
64 > In addition, this package contains two examples in talk/examples which
65 > illustrate the basic concepts of how the provided classes work.
67 > The xmllite component of libjingle depends on expat. You can download expat
68 > from http://expat.sourceforge.net/.
70 > mediastreamer, the media components used by the example applications depend on
71 > the oRTP and iLBC components from linphone, which can be found at
72 > http://www.linphone.org. Linphone, in turn depends on GLib, which can be found
73 > at http://www.gtk.org. This GLib dependency should be removed in future
78 > Once the dependencies are installed, run ./configure. ./configure will return
79 > an error if it failed to locate the proper dependencies. If ./configure
80 > succeeds, run 'make' to build the components and examples.
82 > When the build is complete, you can run the call example from
87 < Libjingle will also build a relay server that may be used to relay traffic
88 < when a direct peer-to-peer connection could not be established. The relay
89 < server will build in talk/p2p/base/relayserver and will listen on UDP
90 < ports 5000 and 5001. See the Libjingle Developer Guide at
91 < http://code.google.com/apis/talk/index.html for information about configuring
92 < a client to use this relay server.
96 < Lastly, Libjingle builds a STUN server which implements the STUN protocol for
97 < Simple Traversal of UDP over NAT. The STUN server is built as
98 < talk/p2p/base/stunserver and listens on UDP port 7000. See the Libjingle
99 < Developer Guide at http://code.google.com/apis/talk/index.html for information
100 < about configuring a client to use this STUN server.
105 > Libjingle will also build a relay server that may be used to relay traffic
106 > when a direct peer-to-peer connection could not be established. The relay
107 > server will build in talk/p2p/base/relayserver and will listen on UDP
108 > ports 5000 and 5001. See the Libjingle Developer Guide at
109 > http://code.google.com/apis/talk/index.html for information about configuring
110 > a client to use this relay server.
114 > Lastly, Libjingle builds a STUN server which implements the STUN protocol for
115 > Simple Traversal of UDP over NAT. The STUN server is built as
116 > talk/p2p/base/stunserver and listens on UDP port 7000. See the Libjingle
117 > Developer Guide at http://code.google.com/apis/talk/index.html for information
118 > about configuring a client to use this STUN server.
119 diff -r libjingle-0.4.0/README.win libjingle/files/README.win
121 < 1. Install Visual C++ Express 2005. It is free from this link:
122 < http://msdn.microsoft.com/vstudio/express/visualc/
124 < 2. Install the platform SDK and integrate it into VC++ express
125 < http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
127 < 3. Download and install binary package for expat:
128 < http://sourceforge.net/project/showfiles.php?group_id=10127&package_id=11277
130 < 4. Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box
131 < Library files: C:\expat-VERSION\StaticLibs
132 < Include files: C:\expat-VERSION\Source\Lib
133 < where VERSION is the version of expat you've downoaded
135 < 5. Unzip the libjingle files and open the solution.
137 < 6. If you wish to build the call example with GIPS Voice Engine Lite, download Voice Engine Lite from http://developer.globalipsound.com
139 < 7. Extract the Interface and Library directories from the Voice Engine Lite zip file into talk\third_party\gips
141 < 8. Open talk\third_party\gips\expiration.h and set the GIPS_EXPIRATION #defines to the expiration date provided by GIPS and remove the #error directive
143 < 9. Build the solution
146 > 1. Install Visual C++ Express 2005. It is free from this link:
147 > http://msdn.microsoft.com/vstudio/express/visualc/
149 > 2. Install the platform SDK and integrate it into VC++ express
150 > http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
152 > 3. Download and install binary package for expat:
153 > http://sourceforge.net/project/showfiles.php?group_id=10127&package_id=11277
155 > 4. Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box
156 > Library files: C:\expat-VERSION\StaticLibs
157 > Include files: C:\expat-VERSION\Source\Lib
158 > where VERSION is the version of expat you've downoaded
160 > 5. Unzip the libjingle files and open the solution.
162 > 6. If you wish to build the call example with GIPS Voice Engine Lite, download Voice Engine Lite from http://developer.globalipsound.com
164 > 7. Extract the Interface and Library directories from the Voice Engine Lite zip file into talk\third_party\gips
166 > 8. Open talk\third_party\gips\expiration.h and set the GIPS_EXPIRATION #defines to the expiration date provided by GIPS and remove the #error directive
168 > 9. Build the solution
170 Only in libjingle-0.4.0: aclocal.m4
171 Only in libjingle-0.4.0: config.guess
172 diff -r libjingle-0.4.0/config.h libjingle/files/config.h
174 < #define HAVE_ALSA_ASOUNDLIB_H 1
176 > /* #undef HAVE_ALSA_ASOUNDLIB_H */
178 < #define HAVE_GLIB 1
180 > /* #undef HAVE_GLIB */
182 < #define HAVE_ORTP 1
184 > /* #undef HAVE_ORTP */
186 < #define HAVE_SPEEX 1
188 > /* #undef HAVE_SPEEX */
190 < #define HAVE_SPEEX_SPEEX_H 1
192 > /* #undef HAVE_SPEEX_SPEEX_H */
198 < #define __ALSA_ENABLED__ 1
200 > /* #undef __ALSA_ENABLED__ */
201 Only in libjingle-0.4.0: config.h.in
202 Only in libjingle-0.4.0: config.sub
203 Only in libjingle-0.4.0: configure
204 Only in libjingle-0.4.0: depcomp
205 Only in libjingle-0.4.0: install-sh
206 Only in libjingle-0.4.0: ltmain.sh
207 Only in libjingle-0.4.0: missing
208 Only in libjingle-0.4.0/talk: Makefile.in
209 Only in libjingle-0.4.0/talk/base: Makefile.in
210 diff -r libjingle-0.4.0/talk/base/asynchttprequest.cc libjingle/files/talk/base/asynchttprequest.cc
212 < talk_base::SSLAdapter * ssl_adapter = talk_base::SSLAdapter::Create(socket);
214 > talk_base::SSLAdapter * ssl_adapter = factory_->CreateSSLAdapter(socket);
216 < ssl_adapter->StartSSL(hostname_.c_str(), true);
218 > int error = ssl_adapter->StartSSL(hostname_.c_str(),
219 > use_restartable_ssl_sockets_);
221 > LOG(LS_WARNING) << "Could not start SSL; error = " << error;
222 > delete ssl_adapter;
225 diff -r libjingle-0.4.0/talk/base/asynchttprequest.h libjingle/files/talk/base/asynchttprequest.h
227 < public SignalThread,
228 < public sigslot::has_slots<> {
230 > public SignalThread {
232 < binary_mode_(false), agent_(user_agent) { }
234 > binary_mode_(false), agent_(user_agent),
235 > ignore_bad_cert_(false), use_restartable_ssl_sockets_(false) { }
237 > bool use_restartable_ssl_sockets() const {
238 > return use_restartable_ssl_sockets_;
240 > void SetUseRestartableSSLSockets(bool use_restartable_ssl_sockets) {
241 > use_restartable_ssl_sockets_ = use_restartable_ssl_sockets;
244 > bool use_restartable_ssl_sockets_;
245 diff -r libjingle-0.4.0/talk/base/asynctcpsocket.cc libjingle/files/talk/base/asynctcpsocket.cc
249 diff -r libjingle-0.4.0/talk/base/autodetectproxy.cc libjingle/files/talk/base/autodetectproxy.cc
251 < #include "talk/base/httpcommon.h"
253 > #include "talk/base/httpcommon-inl.h"
255 < Thread::Current()->MessageQueue::Stop();
257 > Thread::Current()->Quit();
258 diff -r libjingle-0.4.0/talk/base/autodetectproxy.h libjingle/files/talk/base/autodetectproxy.h
260 < class AutoDetectProxy : public SignalThread, public sigslot::has_slots<> {
262 > class AutoDetectProxy : public SignalThread {
263 diff -r libjingle-0.4.0/talk/base/base64.h libjingle/files/talk/base/base64.h
265 < static const std::string Base64::Base64Table;
266 < static const std::string::size_type Base64::DecodeTable[];
268 > static const std::string Base64Table;
269 > static const std::string::size_type DecodeTable[];
270 diff -r libjingle-0.4.0/talk/base/common.h libjingle/files/talk/base/common.h
272 < #define stdmax(x,y) max(x,y)
274 > #define stdmax(x,y) _max(x,y)
276 < // A macro to disallow the evil copy constructor and operator= functions
277 < // This should be used in the private: declarations for a class
278 < #define DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
279 < TypeName(const TypeName&); \
280 < void operator=(const TypeName&)
282 diff -r libjingle-0.4.0/talk/base/criticalsection.h libjingle/files/talk/base/criticalsection.h
286 > #if !defined(NDEBUG)
290 > #endif // !defined(NDEBUG)
296 > pthread_mutexattr_init(&mutex_attribute);
298 > pthread_mutexattr_destroy(&mutex_attribute);
299 > TRACK_OWNER(thread_ = 0);
301 > TRACK_OWNER(thread_ = pthread_self());
303 > TRACK_OWNER(thread_ = 0);
309 > bool CurrentThreadIsOwner() const {
310 > return pthread_equal(thread_, pthread_self());
312 > #endif // CS_TRACK_OWNER
316 > TRACK_OWNER(pthread_t thread_);
317 diff -r libjingle-0.4.0/talk/base/cryptstring.h libjingle/files/talk/base/cryptstring.h
319 > #include <string.h>
320 diff -r libjingle-0.4.0/talk/base/diskcache.cc libjingle/files/talk/base/diskcache.cc
324 > #if !defined(NDEBUG)
328 > #else // defined(NDEBUG)
332 > #endif // !defined(NDEBUG)
336 > #if !defined(NDEBUG)
340 > #endif // !defined(NDEBUG)
341 diff -r libjingle-0.4.0/talk/base/diskcache_win32.cc libjingle/files/talk/base/diskcache_win32.cc
343 < entry->streams = max(entry->streams, index + 1);
345 > entry->streams = _max(entry->streams, index + 1);
346 diff -r libjingle-0.4.0/talk/base/helpers.cc libjingle/files/talk/base/helpers.cc
348 > #include <wincrypt.h>
349 diff -r libjingle-0.4.0/talk/base/host.cc libjingle/files/talk/base/host.cc
352 diff -r libjingle-0.4.0/talk/base/httpclient.cc libjingle/files/talk/base/httpclient.cc
354 > HttpAuthContext *context = context_.get();
356 < *context_.use(), response, auth_method);
358 > context, response, auth_method);
359 > context_.reset(context);
360 diff -r libjingle-0.4.0/talk/base/httpcommon.h libjingle/files/talk/base/httpcommon.h
362 < inline const uint16 UrlDefaultPort(bool secure) {
364 > inline uint16 UrlDefaultPort(bool secure) {
365 diff -r libjingle-0.4.0/talk/base/logging.cc libjingle/files/talk/base/logging.cc
380 diff -r libjingle-0.4.0/talk/base/logging.h libjingle/files/talk/base/logging.h
383 > #if defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
385 > #endif // defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
387 > #if defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
389 < #if defined(_DEBUG) && !defined(NDEBUG)
391 > #if !defined(NDEBUG)
393 > #endif // defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
394 diff -r libjingle-0.4.0/talk/base/messagequeue.cc libjingle/files/talk/base/messagequeue.cc
397 < ss_ = new PhysicalSocketServer();
399 > default_ss_.reset(new PhysicalSocketServer());
400 > ss_ = default_ss_.get();
402 > // The signal is done from here to ensure
403 > // that it always gets called when the queue
405 > SignalQueueDestroyed();
414 < void MessageQueue::Stop() {
416 > void MessageQueue::Quit() {
418 < bool MessageQueue::IsStopping() {
420 > bool MessageQueue::IsQuitting() {
421 diff -r libjingle-0.4.0/talk/base/messagequeue.h libjingle/files/talk/base/messagequeue.h
423 > #include "talk/base/scoped_ptr.h"
426 < virtual void Stop();
427 < virtual bool IsStopping();
429 > virtual void Quit();
430 > virtual bool IsQuitting();
432 > // When this signal is sent out, any references to this queue should
433 > // no longer be used.
434 > sigslot::signal0<> SignalQueueDestroyed;
437 > // If a server isn't supplied in the constructor, use this one.
438 > scoped_ptr<SocketServer> default_ss_;
439 diff -r libjingle-0.4.0/talk/base/natserver.cc libjingle/files/talk/base/natserver.cc
442 diff -r libjingle-0.4.0/talk/base/natsocketfactory.cc libjingle/files/talk/base/natsocketfactory.cc
445 diff -r libjingle-0.4.0/talk/base/openssladapter.cc libjingle/files/talk/base/openssladapter.cc
449 > #if !defined(NDEBUG)
453 > #if !defined(NDEBUG)
457 > #endif // !defined(NDEBUG)
461 > #if !defined(NDEBUG)
465 > #if !defined(NDEBUG)
466 diff -r libjingle-0.4.0/talk/base/openssladapter.h libjingle/files/talk/base/openssladapter.h
470 > #if !defined(NDEBUG)
474 > #endif // !defined(NDEBUG)
475 diff -r libjingle-0.4.0/talk/base/physicalsocketserver.cc libjingle/files/talk/base/physicalsocketserver.cc
477 > #include "talk/base/winsock_initializer.h"
480 < class WinsockInitializer {
482 < WinsockInitializer() {
484 < WORD wVersionRequested = MAKEWORD(1, 0);
485 < err_ = WSAStartup(wVersionRequested, &wsaData);
487 < ~WinsockInitializer() {
496 < WinsockInitializer g_winsockinit;
501 > EnsureWinsockInit();
504 < addr2.Resolve(); // TODO: Do this async later?
506 > // TODO: Do this async later?
507 > if (!addr2.Resolve()) {
508 > LOG(LS_ERROR) << "Resolving addr failed";
511 > return SOCKET_ERROR;
514 > LOG(LS_WARNING) << "EOF from socket; deferring close event";
515 > // Must turn this back on so that the select() loop will notice the close
517 > enabled_events_ |= kfRead;
519 > virtual bool IsDescriptorClosed() = 0;
521 > virtual bool IsDescriptorClosed() {
526 > virtual bool IsDescriptorClosed() {
527 > // We don't have a reliable way of distinguishing end-of-stream
528 > // from readability. So test on each readable call. Is this
529 > // inefficient? Probably.
531 > return (0 == ::recv(s_, &ch, 1, MSG_PEEK));
535 > virtual bool IsDescriptorClosed() {
542 > if (pdispatcher->IsDescriptorClosed()) {
547 diff -r libjingle-0.4.0/talk/base/proxydetect.cc libjingle/files/talk/base/proxydetect.cc
549 < const char* list = slist.c_str();
552 > const char* clist = slist.c_str();
555 < if (isspace(*list)) {
558 > if (isspace(*clist)) {
561 < const char * start = list;
562 < if (const char * end = strchr(list, sep)) {
563 < len = (end - list);
566 > const char * start = clist;
567 > if (const char * end = strchr(clist, sep)) {
568 > len = (end - clist);
571 < len = strlen(list);
574 > len = strlen(clist);
576 diff -r libjingle-0.4.0/talk/base/schanneladapter.cc libjingle/files/talk/base/schanneladapter.cc
578 < size_t read = min(cb, readable.size());
580 > size_t read = _min(cb, readable.size());
581 diff -r libjingle-0.4.0/talk/base/scoped_ptr.h libjingle/files/talk/base/scoped_ptr.h
583 < namespace talk_base {
585 < template <typename T>
591 < scoped_ptr(scoped_ptr const &);
592 < scoped_ptr & operator=(scoped_ptr const &);
596 < typedef T element_type;
598 < explicit scoped_ptr(T* p = 0): ptr(p) {}
601 < typedef char type_must_be_complete[sizeof(T)];
605 < void reset(T* p = 0) {
606 < typedef char type_must_be_complete[sizeof(T)];
614 < T& operator*() const {
619 < T* operator->() const {
628 < void swap(scoped_ptr & b) {
653 < template<typename T> inline
654 < void swap(scoped_ptr<T>& a, scoped_ptr<T>& b) {
661 < // scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to
662 < // is guaranteed, either on destruction of the scoped_array or via an explicit
663 < // reset(). Use shared_array or std::vector if your needs are more complex.
665 < template<typename T>
666 < class scoped_array {
671 < scoped_array(scoped_array const &);
672 < scoped_array & operator=(scoped_array const &);
676 < typedef T element_type;
678 < explicit scoped_array(T* p = 0) : ptr(p) {}
681 < typedef char type_must_be_complete[sizeof(T)];
685 < void reset(T* p = 0) {
686 < typedef char type_must_be_complete[sizeof(T)];
694 < T& operator[](std::ptrdiff_t i) const {
704 < void swap(scoped_array & b) {
725 < template<class T> inline
726 < void swap(scoped_array<T>& a, scoped_array<T>& b) {
730 < // scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a
731 < // second template argument, the function used to free the object.
733 < template<typename T, void (*FF)(void*) = free> class scoped_ptr_malloc {
738 < scoped_ptr_malloc(scoped_ptr_malloc const &);
739 < scoped_ptr_malloc & operator=(scoped_ptr_malloc const &);
743 < typedef T element_type;
745 < explicit scoped_ptr_malloc(T* p = 0): ptr(p) {}
747 < ~scoped_ptr_malloc() {
748 < typedef char type_must_be_complete[sizeof(T)];
749 < FF(static_cast<void*>(ptr));
752 < void reset(T* p = 0) {
753 < typedef char type_must_be_complete[sizeof(T)];
756 < FF(static_cast<void*>(ptr));
761 < T& operator*() const {
766 < T* operator->() const {
775 < void swap(scoped_ptr_malloc & b) {
789 < FF(static_cast<void*>(ptr));
796 < template<typename T, void (*FF)(void*)> inline
797 < void swap(scoped_ptr_malloc<T,FF>& a, scoped_ptr_malloc<T,FF>& b) {
801 < } // namespace talk_base
803 < // TODO: get rid of this global using
804 < using talk_base::scoped_ptr;
806 > #include "base/scoped_ptr.h"
807 diff -r libjingle-0.4.0/talk/base/signalthread.cc libjingle/files/talk/base/signalthread.cc
809 > main_->SignalQueueDestroyed.connect(this,
810 > &SignalThread::OnMainThreadDestroyed);
813 > void SignalThread::OnMainThreadDestroyed() {
814 > EnterExit ee(this);
819 > EnterExit ee(this);
821 > EnterExit ee(this);
823 < if (kInit == state_) {
825 > if (kInit == state_ || kComplete == state_) {
827 < void SignalThread::Destroy() {
829 > void SignalThread::Destroy(bool wait) {
830 > EnterExit ee(this);
833 < } else if (kRunning == state_) {
836 > } else if (kRunning == state_ || kReleasing == state_) {
838 < // A couple tricky issues here:
839 < // 1) Thread::Stop() calls Join(), which we don't want... we just want
840 < // to stop the MessageQueue, which causes ContinueWork() to return false.
841 < // 2) OnWorkStop() must follow Stop(), so that when the thread wakes up
842 < // due to OWS(), ContinueWork() will return false.
843 < worker_.MessageQueue::Stop();
845 > // OnWorkStop() must follow Quit(), so that when the thread wakes up due to
846 > // OWS(), ContinueWork() will return false.
848 > // Release the thread's lock so that it can return from ::Run.
857 > EnterExit ee(this);
863 > EnterExit ee(this);
865 > EnterExit ee(this);
867 > // Before signaling that the work is done, make sure that the worker
868 > // thread actually is done. We got here because DoWork() finished and
869 > // Run() posted the ST_MSG_WORKER_DONE message. This means the worker
870 > // thread is about to go away anyway, but sometimes it doesn't actually
871 > // finish before SignalWorkDone is processed, and for a reusable
872 > // SignalThread this makes an assert in thread.cc fire.
874 > // Calling Stop() on the worker ensures that the OS thread that underlies
875 > // the worker will finish, and will be set to NULL, enabling us to call
883 < main_->Post(this, ST_MSG_WORKER_DONE);
886 > EnterExit ee(this);
888 > main_->Post(this, ST_MSG_WORKER_DONE);
891 diff -r libjingle-0.4.0/talk/base/signalthread.h libjingle/files/talk/base/signalthread.h
893 > // Periodic tasks: Wait for SignalWorkDone, then eventually call Start()
894 > // again to repeat the task. When the instance isn't needed anymore,
895 > // call Release. DoWork, OnWorkStart and OnWorkStop are called again,
896 > // on a new thread.
898 < class SignalThread : protected MessageHandler {
900 > class SignalThread : public sigslot::has_slots<>, protected MessageHandler {
902 < // SignalWorkDone will not be signalled.
905 > // SignalWorkDone will not be signalled. If wait is true, does not return
906 > // until the thread is deleted.
907 > void Destroy(bool wait);
913 < // Context: Worker Thread. Subclass should call periodically to
915 > // Context: Worker Thread. Subclass should call periodically to
922 > friend class SignalThread;
926 > EnterExit(SignalThread * t) : t_(t) {
928 > t_->refcount_ += 1;
931 > bool d = (0 == (--(t_->refcount_)));
938 > friend class EnterExit;
940 > CriticalSection cs_;
944 > void OnMainThreadDestroyed();
946 < enum State { kInit, kRunning, kComplete, kStopping, kReleasing } state_;
949 > kInit, // Initialized, but not started
950 > kRunning, // Started and doing work
951 > kReleasing, // Same as running, but to be deleted when work is done
952 > kComplete, // Work is done
953 > kStopping, // Work is being interrupted
955 diff -r libjingle-0.4.0/talk/base/sigslot.h libjingle/files/talk/base/sigslot.h
959 > #if !defined(NDEBUG)
963 > #if !defined(NDEBUG)
967 > #if !defined(NDEBUG)
971 > #if !defined(NDEBUG)
975 > #if !defined(NDEBUG)
979 > #if !defined(NDEBUG)
983 > #if !defined(NDEBUG)
987 > #if !defined(NDEBUG)
991 > #if !defined(NDEBUG)
992 diff -r libjingle-0.4.0/talk/base/socket.h libjingle/files/talk/base/socket.h
994 > #undef ETIMEDOUT // remove pthread.h's definition
995 diff -r libjingle-0.4.0/talk/base/socketadapters.cc libjingle/files/talk/base/socketadapters.cc
999 diff -r libjingle-0.4.0/talk/base/socketaddress.cc libjingle/files/talk/base/socketaddress.cc
1003 > #if !defined(NDEBUG)
1007 > #else // defined(NDEBUG)
1011 > #endif // !defined(NDEBUG)
1012 diff -r libjingle-0.4.0/talk/base/socketfactory.h libjingle/files/talk/base/socketfactory.h
1014 > #include "talk/base/ssladapter.h"
1017 > // Wraps the given socket in an SSL adapter.
1018 > virtual SSLAdapter* CreateSSLAdapter(AsyncSocket* socket) {
1019 > return SSLAdapter::Create(socket);
1021 diff -r libjingle-0.4.0/talk/base/socketpool.cc libjingle/files/talk/base/socketpool.cc
1026 diff -r libjingle-0.4.0/talk/base/ssladapter.cc libjingle/files/talk/base/ssladapter.cc
1028 < #define SSL_USE_OPENSSL 1
1030 > // Turn off OpenSSL
1031 > //#define SSL_USE_OPENSSL 1
1033 > #if SSL_USE_OPENSSL || SSL_USE_SCHANNEL
1038 diff -r libjingle-0.4.0/talk/base/stream.cc libjingle/files/talk/base/stream.cc
1040 > #include <stdio.h>
1041 diff -r libjingle-0.4.0/talk/base/stringencode.cc libjingle/files/talk/base/stringencode.cc
1043 > #include <stdlib.h>
1047 > #if !defined(NDEBUG)
1051 > #endif // !defined(NDEBUG)
1052 diff -r libjingle-0.4.0/talk/base/stringutils.cc libjingle/files/talk/base/stringutils.cc
1056 > #if !defined(NDEBUG)
1060 > #endif // !defined(NDEBUG)
1061 diff -r libjingle-0.4.0/talk/base/stringutils.h libjingle/files/talk/base/stringutils.h
1063 > #include <string.h>
1069 < size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) {
1071 < va_start(args, format);
1072 < size_t len = vsprintfn(buffer, buflen, format, args);
1077 < template<class CTYPE>
1079 > template<class CTYPE>
1080 > size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) {
1082 > va_start(args, format);
1083 > size_t len = vsprintfn(buffer, buflen, format, args);
1089 < inline static const char* Traits<char>::empty_str() { return ""; }
1091 > inline static const char* empty_str() { return ""; }
1092 diff -r libjingle-0.4.0/talk/base/task.cc libjingle/files/talk/base/task.cc
1094 < * Redistribution and use in source and binary forms, with or without
1096 > * Redistribution and use in source and binary forms, with or without
1098 < * 1. Redistributions of source code must retain the above copyright notice,
1100 > * 1. Redistributions of source code must retain the above copyright notice,
1102 < * 3. The name of the author may not be used to endorse or promote products
1104 > * 3. The name of the author may not be used to endorse or promote products
1106 < * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1108 > * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1110 < * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1112 > * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1114 < * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1115 < * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1117 > * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1118 > * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1120 < if (aborted_ || done_)
1124 < Wake(); // to self-delete
1126 > GetRunner()->WakeTasks();
1127 diff -r libjingle-0.4.0/talk/base/taskrunner.h libjingle/files/talk/base/taskrunner.h
1129 > bool HasPendingTimeoutTask() {
1130 > return next_timeout_task_ != NULL &&
1131 > next_timeout_task_->TimedOut();
1134 diff -r libjingle-0.4.0/talk/base/testclient.cc libjingle/files/talk/base/testclient.cc
1136 > #include <cstring>
1137 diff -r libjingle-0.4.0/talk/base/thread.cc libjingle/files/talk/base/thread.cc
1139 > bool ThreadManager::ThreadActive(Thread *thread) {
1140 > CritScope cs(&crit_);
1141 > return(std::find(threads_.begin(), threads_.end(), thread) != threads_.end());
1147 < pthread_create(&thread_, &attr, PreRun, this);
1150 > CritScope cs(&started_crit_);
1151 > // Make sure Join() hasn't been called yet.
1154 > if (pthread_create(&thread_, &attr, PreRun, this) == 0)
1157 > CritScope cs(&started_crit_);
1162 > CritScope cs(&started_crit_);
1163 > // Make sure Join() hasn't been called yet.
1167 > CritScope cs(&started_crit_);
1170 > // Make sure the thread hasn't been deleted.
1171 > if (!g_thmgr.ThreadActive(thread))
1174 < MessageQueue::Stop();
1176 > MessageQueue::Quit();
1180 > return !IsQuitting();
1181 diff -r libjingle-0.4.0/talk/base/thread.h libjingle/files/talk/base/thread.h
1183 > bool ThreadActive(Thread *thread);
1185 > CriticalSection started_crit_;
1188 diff -r libjingle-0.4.0/talk/base/urlencode.cc libjingle/files/talk/base/urlencode.cc
1190 > #include <stdlib.h>
1191 > #include <string.h>
1192 Only in libjingle-0.4.0/talk/base: win32socketserver.cc
1193 Only in libjingle-0.4.0/talk/base: win32socketserver.h
1194 Only in libjingle/files/talk/base: win32window.cc
1195 diff -r libjingle-0.4.0/talk/base/winping.cc libjingle/files/talk/base/winping.cc
1197 < return sizeof(ICMP_ECHO_REPLY) + max(8UL, data_size);
1199 > return sizeof(ICMP_ECHO_REPLY) + _max((uint32)(8UL), data_size);
1201 < } // namespace talk_base
1202 \ No newline at end of file
1204 > } // namespace talk_base
1205 Only in libjingle/files/talk/base: winsock_initializer.cc
1206 Only in libjingle/files/talk/base: winsock_initializer.h
1207 Only in libjingle-0.4.0/talk: examples
1208 Only in libjingle-0.4.0/talk: libjingle.sln
1209 Only in libjingle-0.4.0/talk: libjingle.vcproj
1210 Only in libjingle-0.4.0/talk: p2p
1211 Only in libjingle-0.4.0/talk: session
1212 Only in libjingle-0.4.0/talk: third_party
1213 Only in libjingle-0.4.0/talk/xmllite: Makefile.in
1214 diff -r libjingle-0.4.0/talk/xmllite/qname.cc libjingle/files/talk/xmllite/qname.cc
1216 < int result = ns.size() * 101;
1218 > int result = static_cast<int>(ns.size()) * 101;
1219 diff -r libjingle-0.4.0/talk/xmllite/qname.h libjingle/files/talk/xmllite/qname.h
1223 < localPart_(local) {}
1225 > localPart_(local),
1227 diff -r libjingle-0.4.0/talk/xmllite/xmlelement.cc libjingle/files/talk/xmllite/xmlelement.cc
1229 < pLastChild_(NULL) {
1231 > pLastChild_(NULL),
1234 < pLastChild_(NULL) {
1236 > pLastChild_(NULL),
1239 > cdata_ = elt.cdata_;
1241 < pLastChild_(NULL) {
1243 > pLastChild_(NULL),
1246 > XmlElement::AddCDATAText(const char * buf, int len) {
1248 > AddParsedText(buf, len);
1252 diff -r libjingle-0.4.0/talk/xmllite/xmlelement.h libjingle/files/talk/xmllite/xmlelement.h
1254 > // Note: CDATA is not supported by XMPP, therefore using this function will
1255 > // generate non-XMPP compatible XML.
1256 > void AddCDATAText(const char * buf, int len);
1258 > bool IsCDATA() const { return cdata_; }
1262 diff -r libjingle-0.4.0/talk/xmllite/xmlparser.cc libjingle/files/talk/xmllite/xmlparser.cc
1264 < #include "talk/xmllite/xmlparser.h"
1267 > #include "talk/xmllite/xmlconstants.h"
1269 < #include "talk/xmllite/xmlconstants.h"
1271 > #include "talk/xmllite/xmlparser.h"
1273 > context_.SetPosition(XML_GetCurrentLineNumber(expat_),
1274 > XML_GetCurrentColumnNumber(expat_),
1275 > XML_GetCurrentByteIndex(expat_));
1277 > context_.SetPosition(XML_GetCurrentLineNumber(expat_),
1278 > XML_GetCurrentColumnNumber(expat_),
1279 > XML_GetCurrentByteIndex(expat_));
1281 > context_.SetPosition(XML_GetCurrentLineNumber(expat_),
1282 > XML_GetCurrentColumnNumber(expat_),
1283 > XML_GetCurrentByteIndex(expat_));
1285 < if (XML_Parse(expat_, data, static_cast<int>(len), isFinal) != XML_STATUS_OK)
1287 > if (XML_Parse(expat_, data, static_cast<int>(len), isFinal) !=
1289 > context_.SetPosition(XML_GetCurrentLineNumber(expat_),
1290 > XML_GetCurrentColumnNumber(expat_),
1291 > XML_GetCurrentByteIndex(expat_));
1295 < raised_(XML_ERROR_NONE) {
1297 > raised_(XML_ERROR_NONE),
1299 > column_number_(0),
1302 < XmlParser::ParseContext::~ParseContext() {
1305 > XmlParser::ParseContext::SetPosition(XML_Size line, XML_Size column,
1306 > XML_Index byte_index) {
1307 > line_number_ = line;
1308 > column_number_ = column;
1309 > byte_index_ = byte_index;
1313 > XmlParser::ParseContext::GetPosition(unsigned long * line,
1314 > unsigned long * column,
1315 > unsigned long * byte_index) {
1316 > if (line != NULL) {
1317 > *line = static_cast<unsigned long>(line_number_);
1320 > if (column != NULL) {
1321 > *column = static_cast<unsigned long>(column_number_);
1324 > if (byte_index != NULL) {
1325 > *byte_index = static_cast<unsigned long>(byte_index_);
1328 > XmlParser::ParseContext::~ParseContext() {
1331 diff -r libjingle-0.4.0/talk/xmllite/xmlparser.h libjingle/files/talk/xmllite/xmlparser.h
1333 > virtual void GetPosition(unsigned long * line, unsigned long * column,
1334 > unsigned long * byte_index) = 0;
1336 > virtual void GetPosition(unsigned long * line, unsigned long * column,
1337 > unsigned long * byte_index);
1339 > void SetPosition(XML_Size line, XML_Size column, XML_Index byte_index);
1341 > XML_Size line_number_;
1342 > XML_Size column_number_;
1343 > XML_Index byte_index_;
1344 diff -r libjingle-0.4.0/talk/xmllite/xmlprinter.cc libjingle/files/talk/xmllite/xmlprinter.cc
1346 > void PrintCDATAText(const std::string & text);
1348 < if (pchild->IsText())
1349 < PrintBodyText(pchild->AsText()->Text());
1352 > if (pchild->IsText()) {
1353 > if (element->IsCDATA()) {
1354 > PrintCDATAText(pchild->AsText()->Text());
1356 > PrintBodyText(pchild->AsText()->Text());
1361 > XmlPrinterImpl::PrintCDATAText(const std::string & text) {
1362 > *pout_ << "<![CDATA[" << text << "]]>";
1364 Only in libjingle-0.4.0/talk/xmpp: Makefile.in
1365 Only in libjingle-0.4.0/talk/xmpp: constants.cc
1366 Only in libjingle-0.4.0/talk/xmpp: constants.h
1367 diff -r libjingle-0.4.0/talk/xmpp/jid.cc libjingle/files/talk/xmpp/jid.cc
1369 < #include "talk/xmpp/constants.h"
1371 > #include "talk/xmpp/xmppconstants.h"
1372 diff -r libjingle-0.4.0/talk/xmpp/plainsaslhandler.h libjingle/files/talk/xmpp/plainsaslhandler.h
1374 < #include "talk/xmpp/saslhandler.h"
1378 > #include "talk/xmpp/saslhandler.h"
1381 > virtual bool GetTlsServerInfo(const talk_base::SocketAddress& server,
1382 > std::string* tls_server_hostname,
1383 > std::string* tls_server_domain) {
1386 diff -r libjingle-0.4.0/talk/xmpp/prexmppauth.h libjingle/files/talk/xmpp/prexmppauth.h
1388 < #include "talk/xmpp/saslhandler.h"
1390 < class PreXmppAuth : public SaslHandler {
1392 > class PreXmppAuth {
1393 diff -r libjingle-0.4.0/talk/xmpp/saslcookiemechanism.h libjingle/files/talk/xmpp/saslcookiemechanism.h
1395 < #include "talk/xmpp/constants.h"
1397 > #include "talk/xmpp/xmppconstants.h"
1399 < SaslCookieMechanism(const std::string & mechanism, const std::string & username, const std::string & cookie) :
1400 < mechanism_(mechanism), username_(username), cookie_(cookie) {}
1402 > SaslCookieMechanism(const std::string & mechanism,
1403 > const std::string & username,
1404 > const std::string & cookie,
1405 > const std::string & token_service)
1406 > : mechanism_(mechanism),
1407 > username_(username),
1409 > token_service_(token_service) {}
1411 > SaslCookieMechanism(const std::string & mechanism,
1412 > const std::string & username,
1413 > const std::string & cookie)
1414 > : mechanism_(mechanism),
1415 > username_(username),
1417 > token_service_("") {}
1419 > if (!token_service_.empty()) {
1421 > QName(true, "http://www.google.com/talk/protocol/auth", "service"),
1425 > std::string token_service_;
1426 diff -r libjingle-0.4.0/talk/xmpp/saslhandler.h libjingle/files/talk/xmpp/saslhandler.h
1430 > #include "talk/base/socketaddress.h"
1433 > // Fills in the tls server hostname/domain to use for the given
1434 > // server (and returns true). Return false if you want the defaults
1436 > virtual bool GetTlsServerInfo(const talk_base::SocketAddress& server,
1437 > std::string* tls_server_hostname,
1438 > std::string* tls_server_domain) = 0;
1439 diff -r libjingle-0.4.0/talk/xmpp/saslmechanism.cc libjingle/files/talk/xmpp/saslmechanism.cc
1441 < #include "talk/xmpp/constants.h"
1443 > #include "talk/xmpp/xmppconstants.h"
1444 diff -r libjingle-0.4.0/talk/xmpp/xmppclient.cc libjingle/files/talk/xmpp/xmppclient.cc
1446 < #include "talk/xmpp/constants.h"
1448 > #include "talk/xmpp/xmppconstants.h"
1450 > #include "talk/xmpp/saslhandler.h"
1452 > scoped_ptr<SaslHandler> sasl_handler_;
1454 < XmppClient::Connect(const XmppClientSettings & settings, const std::string & lang, AsyncSocket * socket, PreXmppAuth * pre_auth) {
1456 > XmppClient::Connect(const XmppClientSettings & settings,
1457 > const std::string & lang,
1458 > AsyncSocket * socket,
1459 > PreXmppAuth * pre_auth,
1460 > SaslHandler * sasl_handler) {
1463 < // The talk.google.com server expects you to use "gmail.com" in the
1464 < // stream, and expects the domain certificate to be "gmail.com" as well.
1465 < // For all other servers, we leave the strings empty, which causes
1466 < // the jid's domain to be used. "foo@example.com" -> stream to="example.com"
1467 < // tls certificate for "example.com"
1469 < // This is only true when using Gaia auth, so let's say if there's no preauth,
1470 < // we should use the actual server name
1471 < if ((settings.server().IPAsString() == buzz::STR_TALK_GOOGLE_COM ||
1472 < settings.server().IPAsString() == buzz::STR_TALKX_L_GOOGLE_COM) &&
1473 < pre_auth != NULL) {
1474 < d_->engine_->SetTlsServer(buzz::STR_GMAIL_COM, buzz::STR_GMAIL_COM);
1476 > if (sasl_handler) {
1477 > std::string tls_server_hostname, tls_server_domain;
1478 > if (sasl_handler->GetTlsServerInfo(settings.server(),
1479 > &tls_server_hostname,
1480 > &tls_server_domain)) {
1481 > d_->engine_->SetTlsServer(tls_server_hostname, tls_server_domain);
1484 > d_->sasl_handler_.reset(sasl_handler);
1486 > if (d_->sasl_handler_.get()) {
1487 > d_->engine_->SetSaslHandler(d_->sasl_handler_.release());
1490 > d_->engine_->SetSaslHandler(new PlainSaslHandler(
1491 > d_->engine_->GetUser(), d_->pass_, d_->allow_plain_));
1495 < d_->engine_->SetSaslHandler(new PlainSaslHandler(
1496 < d_->engine_->GetUser(), d_->pass_, d_->allow_plain_));
1498 < // transfer ownership of pre_auth_ to engine
1499 < d_->engine_->SetSaslHandler(d_->pre_auth_.release());
1501 > d_->pre_engine_error_ = XmppEngine::ERROR_SOCKET;
1502 > d_->pre_engine_subcode_ = d_->socket_->GetError();
1506 > //#if !defined(NDEBUG)
1510 > //#if !defined(NDEBUG)
1511 diff -r libjingle-0.4.0/talk/xmpp/xmppclient.h libjingle/files/talk/xmpp/xmppclient.h
1513 > class SaslHandler;
1515 < PreXmppAuth * preauth);
1517 > PreXmppAuth * preauth,
1518 > SaslHandler * sasl_handler);
1520 < std::string XmppClient::GetStateName(int state) const {
1522 > std::string GetStateName(int state) const {
1523 diff -r libjingle-0.4.0/talk/xmpp/xmppclientsettings.h libjingle/files/talk/xmpp/xmppclientsettings.h
1525 < #include "talk/p2p/base/port.h"
1527 > #include "talk/base/proxyinfo.h"
1529 > namespace cricket {
1531 > // This enum was taken from talk/p2p/base/port.h, which is the only
1532 > // thing we actually need from the p2p directory.
1533 > enum ProtocolType {
1537 > PROTO_LAST = PROTO_SSLTCP
1540 > } // namespace cricket
1542 > void set_token_service(const std::string & token_service) {
1543 > token_service_ = token_service;
1546 > const std::string & token_service() const { return token_service_; }
1548 > std::string token_service_;
1549 Only in libjingle/files/talk/xmpp: xmppconstants.cc
1550 Only in libjingle/files/talk/xmpp: xmppconstants.h
1551 diff -r libjingle-0.4.0/talk/xmpp/xmppengineimpl.cc libjingle/files/talk/xmpp/xmppengineimpl.cc
1553 < #include "talk/xmpp/constants.h"
1555 > #include "talk/xmpp/xmppconstants.h"
1556 diff -r libjingle-0.4.0/talk/xmpp/xmppengineimpl_iq.cc libjingle/files/talk/xmpp/xmppengineimpl_iq.cc
1558 < #include "talk/xmpp/constants.h"
1560 > #include "talk/xmpp/xmppconstants.h"
1561 diff -r libjingle-0.4.0/talk/xmpp/xmpplogintask.cc libjingle/files/talk/xmpp/xmpplogintask.cc
1563 < #include "talk/xmpp/constants.h"
1565 > #include "talk/xmpp/xmppconstants.h"
1569 > #if !defined(NDEBUG)
1573 > #endif // !defined(NDEBUG)
1577 > #if !defined(NDEBUG)
1581 > #endif // !defined(NDEBUG)
1583 > auth->SetAttr(QN_GOOGLE_ALLOW_GENERATED_JID_XMPP_LOGIN, "true");
1584 > auth->SetAttr(QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT, "true");
1586 diff -r libjingle-0.4.0/talk/xmpp/xmpplogintask.h libjingle/files/talk/xmpp/xmpplogintask.h
1590 > #if !defined(NDEBUG)
1594 > #endif // !defined(NDEBUG)
1595 diff -r libjingle-0.4.0/talk/xmpp/xmppstanzaparser.cc libjingle/files/talk/xmpp/xmppstanzaparser.cc
1597 < #include "talk/xmpp/constants.h"
1599 > #include "talk/xmpp/xmppconstants.h"
1600 diff -r libjingle-0.4.0/talk/xmpp/xmpptask.cc libjingle/files/talk/xmpp/xmpptask.cc
1602 < #include "talk/xmpp/constants.h"
1604 > #include "talk/xmpp/xmppconstants.h"
1608 > #if !defined(NDEBUG)
1612 > #if !defined(NDEBUG)
1615 \ No newline at end of file
1618 diff -r libjingle-0.4.0/talk/xmpp/xmpptask.h libjingle/files/talk/xmpp/xmpptask.h
1622 > #if !defined(NDEBUG)
1624 < XmlElement *MakeIqResult(const XmlElement* query);
1625 < XmlElement *MakeIq(const std::string& type,
1627 > static XmlElement *MakeIqResult(const XmlElement* query);
1628 > static XmlElement *MakeIq(const std::string& type,
1632 > #if !defined(NDEBUG)
1633 diff -r libjingle-0.4.0/talk/base/common.cc libjingle/files/talk/base/common.cc
1635 < } // namespace talk_base
1636 \ No newline at end of file
1638 > } // namespace talk_base
1639 diff -r libjingle-0.4.0/talk/base/httpbase.cc libjingle/files/talk/base/httpbase.cc
1641 < if (sscanf(value, "%d", &data_size_) != 1) {
1643 > if (sscanf(value, "%zu", &data_size_) != 1) {
1644 diff -r libjingle-0.4.0/talk/base/httpcommon.cc libjingle/files/talk/base/httpcommon.cc
1646 < &tval.tm_hour, &tval.tm_min, &tval.tm_sec, &zone)) {
1648 > &tval.tm_hour, &tval.tm_min, &tval.tm_sec, zone)) {
1650 < uint32 vmajor, vminor;
1652 > unsigned long vmajor, vminor;
1654 < uint32 vmajor, vminor;
1655 < if ((sscanf(line, "HTTP/%lu.%lu %lu%n", &vmajor, &vminor, &scode, &pos) != 3)
1657 > unsigned long vmajor, vminor;
1658 > if ((sscanf(line, "HTTP/%lu.%lu %lu%zu", &vmajor, &vminor, &scode, &pos) != 3)
1660 < sprintf(buffer, "%d", time(0));
1662 > sprintf(buffer, "%ld", time(0));
1663 diff -r libjingle-0.4.0/talk/base/httpcommon.h libjingle/files/talk/base/httpcommon.h
1667 > unsigned long scode;
1668 diff -r libjingle-0.4.0/talk/base/diskcache.cc libjingle/files/talk/base/diskcache.cc
1670 < if (1 != sscanf(pathname.extension().c_str(), ".%u", index))
1672 > if (1 != sscanf(pathname.extension().c_str(), ".%zu", index))
1673 diff -r libjingle-0.4.0/talk/base/logging.cc libjingle/files/talk/base/logging.cc
1675 < snprintf(buffer, sizeof(buffer), "0x%08lx", err);
1677 > snprintf(buffer, sizeof(buffer), "0x%08x", err);
1678 diff -r libjingle-0.4.0/talk/base/socketadapters.cc libjingle/files/talk/base/socketadapters.cc
1681 < if (sscanf(data, "HTTP/%*lu.%*lu %lu", &code) != 1) {
1683 > unsigned long code;
1684 > if (sscanf(data, "HTTP/%*u.%*u %lu", &code) != 1) {