Move all the examples from the talk directory into the webrtc examples directory.

Significant changes:

- move the libjingle_examples.gyp file into webrtc directory.
- rename talk/examples/android to webrtc/examples/androidapp to avoid name conflicts.
- update paths in talk/libjingle_tests.gyp to point to webrtc directory for Objective-C test.

BUG=
R=pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1235563006 .

Cr-Commit-Position: refs/heads/master@{#9681}
diff --git a/all.gyp b/all.gyp
index 9ccfe25..40dbc13 100644
--- a/all.gyp
+++ b/all.gyp
@@ -24,7 +24,7 @@
       'conditions': [
         ['include_examples==1', {
           'dependencies': [
-            'talk/libjingle_examples.gyp:*',
+            'webrtc/libjingle_examples.gyp:*',
             'webrtc/webrtc_examples.gyp:*',
           ],
         }],
diff --git a/talk/examples/android/src/org/appspot/apprtc/SettingsFragment.java b/talk/examples/android/src/org/appspot/apprtc/SettingsFragment.java
deleted file mode 100644
index 5a36c80..0000000
--- a/talk/examples/android/src/org/appspot/apprtc/SettingsFragment.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.appspot.apprtc;
-
-import android.os.Bundle;
-import android.preference.PreferenceFragment;
-
-/**
- * Settings fragment for AppRTC.
- */
-public class SettingsFragment extends PreferenceFragment {
-
-  @Override
-  public void onCreate(Bundle savedInstanceState) {
-    super.onCreate(savedInstanceState);
-    // Load the preferences from an XML resource
-    addPreferencesFromResource(R.xml.preferences);
-  }
-}
diff --git a/talk/examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java b/talk/examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java
deleted file mode 100644
index cc6540b..0000000
--- a/talk/examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.appspot.apprtc.util;
-
-import android.os.Build;
-import android.util.Log;
-
-/**
- * AppRTCUtils provides helper functions for managing thread safety.
- */
-public final class AppRTCUtils {
-
-  private AppRTCUtils() {
-  }
-
-  /**
-   * NonThreadSafe is a helper class used to help verify that methods of a
-   * class are called from the same thread.
-   */
-  public static class NonThreadSafe {
-    private final Long threadId;
-
-    public NonThreadSafe() {
-      // Store thread ID of the creating thread.
-      threadId = Thread.currentThread().getId();
-    }
-
-   /** Checks if the method is called on the valid/creating thread. */
-    public boolean calledOnValidThread() {
-       return threadId.equals(Thread.currentThread().getId());
-    }
-  }
-
-  /** Helper method which throws an exception  when an assertion has failed. */
-  public static void assertIsTrue(boolean condition) {
-    if (!condition) {
-      throw new AssertionError("Expected condition to be true");
-    }
-  }
-
-  /** Helper method for building a string of thread information.*/
-  public static String getThreadInfo() {
-    return "@[name=" + Thread.currentThread().getName()
-        + ", id=" + Thread.currentThread().getId() + "]";
-  }
-
-  /** Information about the current build, taken from system properties. */
-  public static void logDeviceInfo(String tag) {
-    Log.d(tag, "Android SDK: " + Build.VERSION.SDK_INT + ", "
-        + "Release: " + Build.VERSION.RELEASE + ", "
-        + "Brand: " + Build.BRAND + ", "
-        + "Device: " + Build.DEVICE + ", "
-        + "Id: " + Build.ID + ", "
-        + "Hardware: " + Build.HARDWARE + ", "
-        + "Manufacturer: " + Build.MANUFACTURER + ", "
-        + "Model: " + Build.MODEL + ", "
-        + "Product: " + Build.PRODUCT);
-  }
-}
diff --git a/talk/examples/android/src/org/appspot/apprtc/util/LooperExecutor.java b/talk/examples/android/src/org/appspot/apprtc/util/LooperExecutor.java
deleted file mode 100644
index a570303..0000000
--- a/talk/examples/android/src/org/appspot/apprtc/util/LooperExecutor.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.appspot.apprtc.util;
-
-import android.os.Handler;
-import android.os.Looper;
-import android.util.Log;
-
-import java.util.concurrent.Executor;
-
-/**
- * Looper based executor class.
- */
-public class LooperExecutor extends Thread implements Executor {
-  private static final String TAG = "LooperExecutor";
-  // Object used to signal that looper thread has started and Handler instance
-  // associated with looper thread has been allocated.
-  private final Object looperStartedEvent = new Object();
-  private Handler handler = null;
-  private boolean running = false;
-  private long threadId;
-
-  @Override
-  public void run() {
-    Looper.prepare();
-    synchronized (looperStartedEvent) {
-      Log.d(TAG, "Looper thread started.");
-      handler = new Handler();
-      threadId = Thread.currentThread().getId();
-      looperStartedEvent.notify();
-    }
-    Looper.loop();
-  }
-
-  public synchronized void requestStart() {
-    if (running) {
-      return;
-    }
-    running = true;
-    handler = null;
-    start();
-    // Wait for Hander allocation.
-    synchronized (looperStartedEvent) {
-      while (handler == null) {
-        try {
-          looperStartedEvent.wait();
-        } catch (InterruptedException e) {
-          Log.e(TAG, "Can not start looper thread");
-          running = false;
-        }
-      }
-    }
-  }
-
-  public synchronized void requestStop() {
-    if (!running) {
-      return;
-    }
-    running = false;
-    handler.post(new Runnable() {
-      @Override
-      public void run() {
-        Looper.myLooper().quit();
-        Log.d(TAG, "Looper thread finished.");
-      }
-    });
-  }
-
-  // Checks if current thread is a looper thread.
-  public boolean checkOnLooperThread() {
-    return (Thread.currentThread().getId() == threadId);
-  }
-
-  @Override
-  public synchronized void execute(final Runnable runnable) {
-    if (!running) {
-      Log.w(TAG, "Running looper executor without calling requestStart()");
-      return;
-    }
-    if (Thread.currentThread().getId() == threadId) {
-      runnable.run();
-    } else {
-      handler.post(runnable);
-    }
-  }
-
-}
diff --git a/talk/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java b/talk/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java
deleted file mode 100644
index 04a0629..0000000
--- a/talk/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.appspot.apprtc.test;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.appspot.apprtc.util.LooperExecutor;
-
-import android.test.InstrumentationTestCase;
-import android.util.Log;
-
-public class LooperExecutorTest extends InstrumentationTestCase {
-  private static final String TAG = "LooperTest";
-  private static final int WAIT_TIMEOUT = 5000;
-
-  public void testLooperExecutor() throws InterruptedException {
-    Log.d(TAG, "testLooperExecutor");
-    final int counter[] = new int[1];
-    final int expectedCounter = 10;
-    final CountDownLatch looperDone = new CountDownLatch(1);
-
-    Runnable counterIncRunnable = new Runnable() {
-      @Override
-      public void run() {
-        counter[0]++;
-        Log.d(TAG, "Run " + counter[0]);
-      }
-    };
-    LooperExecutor executor = new LooperExecutor();
-
-    // Try to execute a counter increment task before starting an executor.
-    executor.execute(counterIncRunnable);
-
-    // Start the executor and run expected amount of counter increment task.
-    executor.requestStart();
-    for (int i = 0; i < expectedCounter; i++) {
-      executor.execute(counterIncRunnable);
-    }
-    executor.execute(new Runnable() {
-      @Override
-      public void run() {
-        looperDone.countDown();
-      }
-    });
-    executor.requestStop();
-
-    // Try to execute a task after stopping the executor.
-    executor.execute(counterIncRunnable);
-
-    // Wait for final looper task and make sure the counter increment task
-    // is executed expected amount of times.
-    looperDone.await(WAIT_TIMEOUT, TimeUnit.MILLISECONDS);
-    assertTrue (looperDone.getCount() == 0);
-    assertTrue (counter[0] == expectedCounter);
-
-    Log.d(TAG, "testLooperExecutor done");
-  }
-}
diff --git a/talk/examples/objc/AppRTCDemo/ARDAppClient+Internal.h b/talk/examples/objc/AppRTCDemo/ARDAppClient+Internal.h
deleted file mode 100644
index 4d49239..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDAppClient+Internal.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDAppClient.h"
-
-#import "ARDRoomServerClient.h"
-#import "ARDSignalingChannel.h"
-#import "ARDTURNClient.h"
-#import "RTCPeerConnection.h"
-#import "RTCPeerConnectionDelegate.h"
-#import "RTCPeerConnectionFactory.h"
-#import "RTCSessionDescriptionDelegate.h"
-
-@interface ARDAppClient () <ARDSignalingChannelDelegate,
-    RTCPeerConnectionDelegate, RTCSessionDescriptionDelegate>
-
-// All properties should only be mutated from the main queue.
-@property(nonatomic, strong) id<ARDRoomServerClient> roomServerClient;
-@property(nonatomic, strong) id<ARDSignalingChannel> channel;
-@property(nonatomic, strong) id<ARDTURNClient> turnClient;
-
-@property(nonatomic, strong) RTCPeerConnection *peerConnection;
-@property(nonatomic, strong) RTCPeerConnectionFactory *factory;
-@property(nonatomic, strong) NSMutableArray *messageQueue;
-
-@property(nonatomic, assign) BOOL isTurnComplete;
-@property(nonatomic, assign) BOOL hasReceivedSdp;
-@property(nonatomic, readonly) BOOL hasJoinedRoomServerRoom;
-
-@property(nonatomic, strong) NSString *roomId;
-@property(nonatomic, strong) NSString *clientId;
-@property(nonatomic, assign) BOOL isInitiator;
-@property(nonatomic, strong) NSMutableArray *iceServers;
-@property(nonatomic, strong) NSURL *webSocketURL;
-@property(nonatomic, strong) NSURL *webSocketRestURL;
-
-@property(nonatomic, strong)
-    RTCMediaConstraints *defaultPeerConnectionConstraints;
-
-- (instancetype)initWithRoomServerClient:(id<ARDRoomServerClient>)rsClient
-                        signalingChannel:(id<ARDSignalingChannel>)channel
-                              turnClient:(id<ARDTURNClient>)turnClient
-                                delegate:(id<ARDAppClientDelegate>)delegate;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDAppClient.h b/talk/examples/objc/AppRTCDemo/ARDAppClient.h
deleted file mode 100644
index b88b570..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDAppClient.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "RTCVideoTrack.h"
-
-typedef NS_ENUM(NSInteger, ARDAppClientState) {
-  // Disconnected from servers.
-  kARDAppClientStateDisconnected,
-  // Connecting to servers.
-  kARDAppClientStateConnecting,
-  // Connected to servers.
-  kARDAppClientStateConnected,
-};
-
-@class ARDAppClient;
-// The delegate is informed of pertinent events and will be called on the
-// main queue.
-@protocol ARDAppClientDelegate <NSObject>
-
-- (void)appClient:(ARDAppClient *)client
-    didChangeState:(ARDAppClientState)state;
-
-- (void)appClient:(ARDAppClient *)client
-    didChangeConnectionState:(RTCICEConnectionState)state;
-
-- (void)appClient:(ARDAppClient *)client
-    didReceiveLocalVideoTrack:(RTCVideoTrack *)localVideoTrack;
-
-- (void)appClient:(ARDAppClient *)client
-    didReceiveRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack;
-
-- (void)appClient:(ARDAppClient *)client
-         didError:(NSError *)error;
-
-@end
-
-// Handles connections to the AppRTC server for a given room. Methods on this
-// class should only be called from the main queue.
-@interface ARDAppClient : NSObject
-
-@property(nonatomic, readonly) ARDAppClientState state;
-@property(nonatomic, weak) id<ARDAppClientDelegate> delegate;
-
-// Convenience constructor since all expected use cases will need a delegate
-// in order to receive remote tracks.
-- (instancetype)initWithDelegate:(id<ARDAppClientDelegate>)delegate;
-
-// Establishes a connection with the AppRTC servers for the given room id.
-// TODO(tkchin): provide available keys/values for options. This will be used
-// for call configurations such as overriding server choice, specifying codecs
-// and so on.
-- (void)connectToRoomWithId:(NSString *)roomId
-                    options:(NSDictionary *)options;
-
-// Disconnects from the AppRTC servers and any connected clients.
-- (void)disconnect;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDAppEngineClient.h b/talk/examples/objc/AppRTCDemo/ARDAppEngineClient.h
deleted file mode 100644
index 1bcd126..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDAppEngineClient.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDRoomServerClient.h"
-
-@interface ARDAppEngineClient : NSObject <ARDRoomServerClient>
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.h b/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.h
deleted file mode 100644
index f54cbb7..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDTURNClient.h"
-
-// Requests TURN server urls from compute engine on demand.
-@interface ARDCEODTURNClient : NSObject <ARDTURNClient>
-
-- (instancetype)initWithURL:(NSURL *)url;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.m b/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.m
deleted file mode 100644
index f4196e4..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.m
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDCEODTURNClient.h"
-
-#import "ARDUtilities.h"
-#import "RTCICEServer+JSON.h"
-
-// TODO(tkchin): move this to a configuration object.
-static NSString *kTURNOriginURLString = @"https://apprtc.appspot.com";
-static NSString *kARDCEODTURNClientErrorDomain = @"ARDCEODTURNClient";
-static NSInteger kARDCEODTURNClientErrorBadResponse = -1;
-
-@implementation ARDCEODTURNClient {
-  NSURL *_url;
-}
-
-- (instancetype)initWithURL:(NSURL *)url {
-  NSParameterAssert([url absoluteString].length);
-  if (self = [super init]) {
-    _url = url;
-  }
-  return self;
-}
-
-- (void)requestServersWithCompletionHandler:
-    (void (^)(NSArray *turnServers,
-              NSError *error))completionHandler {
-  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:_url];
-  // We need to set origin because TURN provider whitelists requests based on
-  // origin.
-  [request addValue:@"Mozilla/5.0" forHTTPHeaderField:@"user-agent"];
-  [request addValue:kTURNOriginURLString forHTTPHeaderField:@"origin"];
-  [NSURLConnection sendAsyncRequest:request
-                  completionHandler:^(NSURLResponse *response,
-                                      NSData *data,
-                                      NSError *error) {
-    NSArray *turnServers = [NSArray array];
-    if (error) {
-      completionHandler(turnServers, error);
-      return;
-    }
-    NSDictionary *dict = [NSDictionary dictionaryWithJSONData:data];
-    turnServers = [RTCICEServer serversFromCEODJSONDictionary:dict];
-    if (!turnServers) {
-      NSError *responseError =
-          [[NSError alloc] initWithDomain:kARDCEODTURNClientErrorDomain
-                                     code:kARDCEODTURNClientErrorBadResponse
-                                 userInfo:@{
-            NSLocalizedDescriptionKey: @"Bad TURN response.",
-          }];
-      completionHandler(turnServers, responseError);
-      return;
-    }
-    completionHandler(turnServers, nil);
-  }];
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h b/talk/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h
deleted file mode 100644
index 5f82414..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDJoinResponse.h"
-
-@interface ARDJoinResponse ()
-
-@property(nonatomic, assign) ARDJoinResultType result;
-@property(nonatomic, assign) BOOL isInitiator;
-@property(nonatomic, strong) NSString *roomId;
-@property(nonatomic, strong) NSString *clientId;
-@property(nonatomic, strong) NSArray *messages;
-@property(nonatomic, strong) NSURL *webSocketURL;
-@property(nonatomic, strong) NSURL *webSocketRestURL;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDJoinResponse.h b/talk/examples/objc/AppRTCDemo/ARDJoinResponse.h
deleted file mode 100644
index 8b12eb8..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDJoinResponse.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-typedef NS_ENUM(NSInteger, ARDJoinResultType) {
-  kARDJoinResultTypeUnknown,
-  kARDJoinResultTypeSuccess,
-  kARDJoinResultTypeFull
-};
-
-// Result of joining a room on the room server.
-@interface ARDJoinResponse : NSObject
-
-@property(nonatomic, readonly) ARDJoinResultType result;
-@property(nonatomic, readonly) BOOL isInitiator;
-@property(nonatomic, readonly) NSString *roomId;
-@property(nonatomic, readonly) NSString *clientId;
-@property(nonatomic, readonly) NSArray *messages;
-@property(nonatomic, readonly) NSURL *webSocketURL;
-@property(nonatomic, readonly) NSURL *webSocketRestURL;
-
-+ (ARDJoinResponse *)responseFromJSONData:(NSData *)data;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h b/talk/examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h
deleted file mode 100644
index f34cd8b..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDMessageResponse.h"
-
-@interface ARDMessageResponse ()
-
-@property(nonatomic, assign) ARDMessageResultType result;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDMessageResponse.h b/talk/examples/objc/AppRTCDemo/ARDMessageResponse.h
deleted file mode 100644
index b1e6938..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDMessageResponse.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-typedef NS_ENUM(NSInteger, ARDMessageResultType) {
-  kARDMessageResultTypeUnknown,
-  kARDMessageResultTypeSuccess,
-  kARDMessageResultTypeInvalidRoom,
-  kARDMessageResultTypeInvalidClient
-};
-
-@interface ARDMessageResponse : NSObject
-
-@property(nonatomic, readonly) ARDMessageResultType result;
-
-+ (ARDMessageResponse *)responseFromJSONData:(NSData *)data;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDMessageResponse.m b/talk/examples/objc/AppRTCDemo/ARDMessageResponse.m
deleted file mode 100644
index 545880d..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDMessageResponse.m
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDMessageResponse+Internal.h"
-
-#import "ARDUtilities.h"
-
-static NSString const *kARDMessageResultKey = @"result";
-
-@implementation ARDMessageResponse
-
-@synthesize result = _result;
-
-+ (ARDMessageResponse *)responseFromJSONData:(NSData *)data {
-  NSDictionary *responseJSON = [NSDictionary dictionaryWithJSONData:data];
-  if (!responseJSON) {
-    return nil;
-  }
-  ARDMessageResponse *response = [[ARDMessageResponse alloc] init];
-  response.result =
-      [[self class] resultTypeFromString:responseJSON[kARDMessageResultKey]];
-  return response;
-}
-
-#pragma mark - Private
-
-+ (ARDMessageResultType)resultTypeFromString:(NSString *)resultString {
-  ARDMessageResultType result = kARDMessageResultTypeUnknown;
-  if ([resultString isEqualToString:@"SUCCESS"]) {
-    result = kARDMessageResultTypeSuccess;
-  } else if ([resultString isEqualToString:@"INVALID_CLIENT"]) {
-    result = kARDMessageResultTypeInvalidClient;
-  } else if ([resultString isEqualToString:@"INVALID_ROOM"]) {
-    result = kARDMessageResultTypeInvalidRoom;
-  }
-  return result;
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDRoomServerClient.h b/talk/examples/objc/AppRTCDemo/ARDRoomServerClient.h
deleted file mode 100644
index 68d92ab..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDRoomServerClient.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-@class ARDJoinResponse;
-@class ARDMessageResponse;
-@class ARDSignalingMessage;
-
-@protocol ARDRoomServerClient <NSObject>
-
-- (void)joinRoomWithRoomId:(NSString *)roomId
-         completionHandler:(void (^)(ARDJoinResponse *response,
-                                     NSError *error))completionHandler;
-
-- (void)sendMessage:(ARDSignalingMessage *)message
-            forRoomId:(NSString *)roomId
-             clientId:(NSString *)clientId
-    completionHandler:(void (^)(ARDMessageResponse *response,
-                                NSError *error))completionHandler;
-
-- (void)leaveRoomWithRoomId:(NSString *)roomId
-                   clientId:(NSString *)clientId
-          completionHandler:(void (^)(NSError *error))completionHandler;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDSDPUtils.h b/talk/examples/objc/AppRTCDemo/ARDSDPUtils.h
deleted file mode 100644
index 2f14e6d..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDSDPUtils.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-@class RTCSessionDescription;
-
-@interface ARDSDPUtils : NSObject
-
-// Updates the original SDP description to instead prefer the specified video
-// codec. We do this by placing the specified codec at the beginning of the
-// codec list if it exists in the sdp.
-+ (RTCSessionDescription *)
-    descriptionForDescription:(RTCSessionDescription *)description
-          preferredVideoCodec:(NSString *)codec;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDSignalingChannel.h b/talk/examples/objc/AppRTCDemo/ARDSignalingChannel.h
deleted file mode 100644
index 152abc8..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDSignalingChannel.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "ARDSignalingMessage.h"
-
-typedef NS_ENUM(NSInteger, ARDSignalingChannelState) {
-  // State when disconnected.
-  kARDSignalingChannelStateClosed,
-  // State when connection is established but not ready for use.
-  kARDSignalingChannelStateOpen,
-  // State when connection is established and registered.
-  kARDSignalingChannelStateRegistered,
-  // State when connection encounters a fatal error.
-  kARDSignalingChannelStateError
-};
-
-@protocol ARDSignalingChannel;
-@protocol ARDSignalingChannelDelegate <NSObject>
-
-- (void)channel:(id<ARDSignalingChannel>)channel
-    didChangeState:(ARDSignalingChannelState)state;
-
-- (void)channel:(id<ARDSignalingChannel>)channel
-    didReceiveMessage:(ARDSignalingMessage *)message;
-
-@end
-
-@protocol ARDSignalingChannel <NSObject>
-
-@property(nonatomic, readonly) NSString *roomId;
-@property(nonatomic, readonly) NSString *clientId;
-@property(nonatomic, readonly) ARDSignalingChannelState state;
-@property(nonatomic, weak) id<ARDSignalingChannelDelegate> delegate;
-
-// Registers the channel for the given room and client id.
-- (void)registerForRoomId:(NSString *)roomId
-                 clientId:(NSString *)clientId;
-
-// Sends signaling message over the channel.
-- (void)sendMessage:(ARDSignalingMessage *)message;
-
-@end
-
diff --git a/talk/examples/objc/AppRTCDemo/ARDSignalingMessage.h b/talk/examples/objc/AppRTCDemo/ARDSignalingMessage.h
deleted file mode 100644
index c1d1600..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDSignalingMessage.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "RTCICECandidate.h"
-#import "RTCSessionDescription.h"
-
-typedef enum {
-  kARDSignalingMessageTypeCandidate,
-  kARDSignalingMessageTypeOffer,
-  kARDSignalingMessageTypeAnswer,
-  kARDSignalingMessageTypeBye,
-} ARDSignalingMessageType;
-
-@interface ARDSignalingMessage : NSObject
-
-@property(nonatomic, readonly) ARDSignalingMessageType type;
-
-+ (ARDSignalingMessage *)messageFromJSONString:(NSString *)jsonString;
-- (NSData *)JSONData;
-
-@end
-
-@interface ARDICECandidateMessage : ARDSignalingMessage
-
-@property(nonatomic, readonly) RTCICECandidate *candidate;
-
-- (instancetype)initWithCandidate:(RTCICECandidate *)candidate;
-
-@end
-
-@interface ARDSessionDescriptionMessage : ARDSignalingMessage
-
-@property(nonatomic, readonly) RTCSessionDescription *sessionDescription;
-
-- (instancetype)initWithDescription:(RTCSessionDescription *)description;
-
-@end
-
-@interface ARDByeMessage : ARDSignalingMessage
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDTURNClient.h b/talk/examples/objc/AppRTCDemo/ARDTURNClient.h
deleted file mode 100644
index 5f14ffe..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDTURNClient.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-@protocol ARDTURNClient <NSObject>
-
-// Returns TURN server urls if successful.
-- (void)requestServersWithCompletionHandler:
-    (void (^)(NSArray *turnServers,
-              NSError *error))completionHandler;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDWebSocketChannel.h b/talk/examples/objc/AppRTCDemo/ARDWebSocketChannel.h
deleted file mode 100644
index 0885b72..0000000
--- a/talk/examples/objc/AppRTCDemo/ARDWebSocketChannel.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "ARDSignalingChannel.h"
-
-// Wraps a WebSocket connection to the AppRTC WebSocket server.
-@interface ARDWebSocketChannel : NSObject <ARDSignalingChannel>
-
-- (instancetype)initWithURL:(NSURL *)url
-                    restURL:(NSURL *)restURL
-                   delegate:(id<ARDSignalingChannelDelegate>)delegate;
-
-// Registers with the WebSocket server for the given room and client id once
-// the web socket connection is open.
-- (void)registerForRoomId:(NSString *)roomId
-                 clientId:(NSString *)clientId;
-
-// Sends message over the WebSocket connection if registered, otherwise POSTs to
-// the web socket server instead.
-- (void)sendMessage:(ARDSignalingMessage *)message;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/RTCICECandidate+JSON.h b/talk/examples/objc/AppRTCDemo/RTCICECandidate+JSON.h
deleted file mode 100644
index 00c94cd..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCICECandidate+JSON.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCICECandidate.h"
-
-@interface RTCICECandidate (JSON)
-
-+ (RTCICECandidate *)candidateFromJSONDictionary:(NSDictionary *)dictionary;
-- (NSData *)JSONData;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/RTCICECandidate+JSON.m b/talk/examples/objc/AppRTCDemo/RTCICECandidate+JSON.m
deleted file mode 100644
index f7bb211..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCICECandidate+JSON.m
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCICECandidate+JSON.h"
-
-#import "RTCLogging.h"
-
-static NSString const *kRTCICECandidateTypeKey = @"type";
-static NSString const *kRTCICECandidateTypeValue = @"candidate";
-static NSString const *kRTCICECandidateMidKey = @"id";
-static NSString const *kRTCICECandidateMLineIndexKey = @"label";
-static NSString const *kRTCICECandidateSdpKey = @"candidate";
-
-@implementation RTCICECandidate (JSON)
-
-+ (RTCICECandidate *)candidateFromJSONDictionary:(NSDictionary *)dictionary {
-  NSString *mid = dictionary[kRTCICECandidateMidKey];
-  NSString *sdp = dictionary[kRTCICECandidateSdpKey];
-  NSNumber *num = dictionary[kRTCICECandidateMLineIndexKey];
-  NSInteger mLineIndex = [num integerValue];
-  return [[RTCICECandidate alloc] initWithMid:mid index:mLineIndex sdp:sdp];
-}
-
-- (NSData *)JSONData {
-  NSDictionary *json = @{
-    kRTCICECandidateTypeKey : kRTCICECandidateTypeValue,
-    kRTCICECandidateMLineIndexKey : @(self.sdpMLineIndex),
-    kRTCICECandidateMidKey : self.sdpMid,
-    kRTCICECandidateSdpKey : self.sdp
-  };
-  NSError *error = nil;
-  NSData *data =
-      [NSJSONSerialization dataWithJSONObject:json
-                                      options:NSJSONWritingPrettyPrinted
-                                        error:&error];
-  if (error) {
-    RTCLogError(@"Error serializing JSON: %@", error);
-    return nil;
-  }
-  return data;
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.h b/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.h
deleted file mode 100644
index 9c4f83f..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCICEServer.h"
-
-@interface RTCICEServer (JSON)
-
-+ (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary;
-// CEOD provides different JSON, and this parses that.
-+ (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.m b/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
deleted file mode 100644
index b9b95e3..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCICEServer+JSON.h"
-
-static NSString const *kRTCICEServerUsernameKey = @"username";
-static NSString const *kRTCICEServerPasswordKey = @"password";
-static NSString const *kRTCICEServerUrisKey = @"uris";
-static NSString const *kRTCICEServerUrlKey = @"urls";
-static NSString const *kRTCICEServerCredentialKey = @"credential";
-
-@implementation RTCICEServer (JSON)
-
-+ (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary {
-  NSString *url = dictionary[kRTCICEServerUrlKey];
-  NSString *username = dictionary[kRTCICEServerUsernameKey];
-  NSString *credential = dictionary[kRTCICEServerCredentialKey];
-  username = username ? username : @"";
-  credential = credential ? credential : @"";
-  return [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:url]
-                                  username:username
-                                  password:credential];
-}
-
-+ (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary {
-  NSString *username = dictionary[kRTCICEServerUsernameKey];
-  NSString *password = dictionary[kRTCICEServerPasswordKey];
-  NSArray *uris = dictionary[kRTCICEServerUrisKey];
-  NSMutableArray *servers = [NSMutableArray arrayWithCapacity:uris.count];
-  for (NSString *uri in uris) {
-    RTCICEServer *server =
-        [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:uri]
-                                 username:username
-                                 password:password];
-    [servers addObject:server];
-  }
-  return servers;
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h b/talk/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h
deleted file mode 100644
index e3c2c96..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCMediaConstraints.h"
-
-@interface RTCMediaConstraints (JSON)
-
-+ (RTCMediaConstraints *)constraintsFromJSONDictionary:
-    (NSDictionary *)dictionary;
-
-@end
-
diff --git a/talk/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m b/talk/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
deleted file mode 100644
index d176435..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCMediaConstraints+JSON.h"
-
-#import "RTCPair.h"
-
-static NSString const *kRTCMediaConstraintsMandatoryKey = @"mandatory";
-
-@implementation RTCMediaConstraints (JSON)
-
-+ (RTCMediaConstraints *)constraintsFromJSONDictionary:
-    (NSDictionary *)dictionary {
-  NSDictionary *mandatory = dictionary[kRTCMediaConstraintsMandatoryKey];
-  NSMutableArray *mandatoryContraints =
-      [NSMutableArray arrayWithCapacity:[mandatory count]];
-  [mandatory enumerateKeysAndObjectsUsingBlock:^(
-      id key, id obj, BOOL *stop) {
-    [mandatoryContraints addObject:[[RTCPair alloc] initWithKey:key
-                                                          value:obj]];
-  }];
-  // TODO(tkchin): figure out json formats for optional constraints.
-  RTCMediaConstraints *constraints =
-      [[RTCMediaConstraints alloc]
-          initWithMandatoryConstraints:mandatoryContraints
-                   optionalConstraints:nil];
-  return constraints;
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h b/talk/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h
deleted file mode 100644
index e540b46..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCSessionDescription.h"
-
-@interface RTCSessionDescription (JSON)
-
-+ (RTCSessionDescription *)descriptionFromJSONDictionary:
-    (NSDictionary *)dictionary;
-- (NSData *)JSONData;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m b/talk/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
deleted file mode 100644
index b212442..0000000
--- a/talk/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "RTCSessionDescription+JSON.h"
-
-static NSString const *kRTCSessionDescriptionTypeKey = @"type";
-static NSString const *kRTCSessionDescriptionSdpKey = @"sdp";
-
-@implementation RTCSessionDescription (JSON)
-
-+ (RTCSessionDescription *)descriptionFromJSONDictionary:
-    (NSDictionary *)dictionary {
-  NSString *type = dictionary[kRTCSessionDescriptionTypeKey];
-  NSString *sdp = dictionary[kRTCSessionDescriptionSdpKey];
-  return [[RTCSessionDescription alloc] initWithType:type sdp:sdp];
-}
-
-- (NSData *)JSONData {
-  NSDictionary *json = @{
-    kRTCSessionDescriptionTypeKey : self.type,
-    kRTCSessionDescriptionSdpKey : self.description
-  };
-  return [NSJSONSerialization dataWithJSONObject:json options:0 error:nil];
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/common/ARDUtilities.h b/talk/examples/objc/AppRTCDemo/common/ARDUtilities.h
deleted file mode 100644
index b0594e8..0000000
--- a/talk/examples/objc/AppRTCDemo/common/ARDUtilities.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface NSDictionary (ARDUtilites)
-
-// Creates a dictionary with the keys and values in the JSON object.
-+ (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
-+ (NSDictionary *)dictionaryWithJSONData:(NSData *)jsonData;
-
-@end
-
-@interface NSURLConnection (ARDUtilities)
-
-// Issues an asynchronous request that calls back on main queue.
-+ (void)sendAsyncRequest:(NSURLRequest *)request
-       completionHandler:(void (^)(NSURLResponse *response,
-                                   NSData *data,
-                                   NSError *error))completionHandler;
-
-// Posts data to the specified URL.
-+ (void)sendAsyncPostToURL:(NSURL *)url
-                  withData:(NSData *)data
-         completionHandler:(void (^)(BOOL succeeded,
-                                     NSData *data))completionHandler;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.h b/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.h
deleted file mode 100644
index edd8ab6..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * libjingle
- * Copyright 2013 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <UIKit/UIKit.h>
-
-// The main application class of the AppRTCDemo iOS app demonstrating
-// interoperability between the Objective C implementation of PeerConnection
-// and the apprtc.appspot.com demo webapp.
-@interface ARDAppDelegate : NSObject <UIApplicationDelegate>
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m b/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m
deleted file mode 100644
index 09e4374..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * libjingle
- * Copyright 2013 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "ARDAppDelegate.h"
-
-#import "RTCLogging.h"
-#import "RTCPeerConnectionFactory.h"
-
-#import "ARDMainViewController.h"
-
-@implementation ARDAppDelegate {
-  UIWindow *_window;
-}
-
-#pragma mark - UIApplicationDelegate methods
-
-- (BOOL)application:(UIApplication *)application
-    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-  [RTCPeerConnectionFactory initializeSSL];
-  _window =  [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
-  [_window makeKeyAndVisible];
-  ARDMainViewController *viewController = [[ARDMainViewController alloc] init];
-  _window.rootViewController = viewController;
-
-#ifndef _DEBUG
-  // In debug builds the default level is LS_INFO and in non-debug builds it is
-  // disabled. Continue to log to console in non-debug builds, but only
-  // warnings and errors.
-  RTCSetMinDebugLogLevel(kRTCLoggingSeverityWarning);
-#endif
-
-  return YES;
-}
-
-- (void)applicationWillResignActive:(UIApplication *)application {
-  ARDMainViewController *viewController =
-      (ARDMainViewController *)_window.rootViewController;
-  [viewController applicationWillResignActive:application];
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application {
-  [RTCPeerConnectionFactory deinitializeSSL];
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDMainView.h b/talk/examples/objc/AppRTCDemo/ios/ARDMainView.h
deleted file mode 100644
index 9d9f5eb..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/ARDMainView.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <UIKit/UIKit.h>
-
-@class ARDMainView;
-
-@protocol ARDMainViewDelegate <NSObject>
-
-- (void)mainView:(ARDMainView *)mainView didInputRoom:(NSString *)room;
-
-@end
-
-// The main view of AppRTCDemo. It contains an input field for entering a room
-// name on apprtc to connect to.
-@interface ARDMainView : UIView
-
-@property(nonatomic, weak) id<ARDMainViewDelegate> delegate;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDMainViewController.h b/talk/examples/objc/AppRTCDemo/ios/ARDMainViewController.h
deleted file mode 100644
index ae15a9d..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/ARDMainViewController.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <UIKit/UIKit.h>
-
-@interface ARDMainViewController : UIViewController
-
-- (void)applicationWillResignActive:(UIApplication *)application;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallView.h b/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallView.h
deleted file mode 100644
index 7c1decb..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallView.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <UIKit/UIKit.h>
-
-#import "RTCEAGLVideoView.h"
-
-@class ARDVideoCallView;
-@protocol ARDVideoCallViewDelegate <NSObject>
-
-// Called when the camera switch button is pressed.
-- (void)videoCallViewDidSwitchCamera:(ARDVideoCallView *)view;
-
-// Called when the hangup button is pressed.
-- (void)videoCallViewDidHangup:(ARDVideoCallView *)view;
-
-@end
-
-// Video call view that shows local and remote video, provides a label to
-// display status, and also a hangup button.
-@interface ARDVideoCallView : UIView
-
-@property(nonatomic, readonly) UILabel *statusLabel;
-@property(nonatomic, readonly) RTCEAGLVideoView *localVideoView;
-@property(nonatomic, readonly) RTCEAGLVideoView *remoteVideoView;
-@property(nonatomic, weak) id<ARDVideoCallViewDelegate> delegate;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h b/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h
deleted file mode 100644
index fbee3aa..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <UIKit/UIKit.h>
-
-@interface ARDVideoCallViewController : UIViewController
-
-- (instancetype)initForRoom:(NSString *)room;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch b/talk/examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch
deleted file mode 100644
index 885f04a..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * libjingle
- * Copyright 2013 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-//
-// Prefix header for all source files of the 'AppRTCDemo' target in the
-// 'AppRTCDemo' project
-//
-
-#import <Availability.h>
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0
-#warning "This project uses features only available in iOS SDK 6.0 and later."
-#endif
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
diff --git a/talk/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h b/talk/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h
deleted file mode 100644
index 5eccc7d..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <UIKit/UIKit.h>
-
-@interface UIImage (ARDUtilities)
-
-// Returns an color tinted version for the given image resource.
-+ (UIImage *)imageForName:(NSString *)name color:(UIColor *)color;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m b/talk/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m
deleted file mode 100644
index f84c921..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * libjingle
- * Copyright 2015 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "UIImage+ARDUtilities.h"
-
-@implementation UIImage (ARDUtilities)
-
-+ (UIImage *)imageForName:(NSString *)name color:(UIColor *)color {
-  UIImage *image = [UIImage imageNamed:name];
-  if (!image) {
-    return nil;
-  }
-  UIGraphicsBeginImageContextWithOptions(image.size, NO, 0.0f);
-  [color setFill];
-  CGRect bounds = CGRectMake(0, 0, image.size.width, image.size.height);
-  UIRectFill(bounds);
-  [image drawInRect:bounds blendMode:kCGBlendModeDestinationIn alpha:1.0f];
-  UIImage *coloredImage = UIGraphicsGetImageFromCurrentImageContext();
-  UIGraphicsEndImageContext();
-
-  return coloredImage;
-}
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/main.m b/talk/examples/objc/AppRTCDemo/ios/main.m
deleted file mode 100644
index 91d5630..0000000
--- a/talk/examples/objc/AppRTCDemo/ios/main.m
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * libjingle
- * Copyright 2013 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <UIKit/UIKit.h>
-
-#import "ARDAppDelegate.h"
-
-int main(int argc, char* argv[]) {
-  @autoreleasepool {
-    return UIApplicationMain(
-        argc, argv, nil, NSStringFromClass([ARDAppDelegate class]));
-  }
-}
diff --git a/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h b/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h
deleted file mode 100644
index d7f49e4..0000000
--- a/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
-@interface APPRTCAppDelegate : NSObject<NSApplicationDelegate>
-@end
diff --git a/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m b/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m
deleted file mode 100644
index 514b241..0000000
--- a/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-#import "APPRTCAppDelegate.h"
-
-#import "APPRTCViewController.h"
-#import "RTCPeerConnectionFactory.h"
-
-@interface APPRTCAppDelegate () <NSWindowDelegate>
-@end
-
-@implementation APPRTCAppDelegate {
-  APPRTCViewController* _viewController;
-  NSWindow* _window;
-}
-
-#pragma mark - NSApplicationDelegate
-
-- (void)applicationDidFinishLaunching:(NSNotification*)notification {
-  [RTCPeerConnectionFactory initializeSSL];
-  NSScreen* screen = [NSScreen mainScreen];
-  NSRect visibleRect = [screen visibleFrame];
-  NSRect windowRect = NSMakeRect(NSMidX(visibleRect),
-                                 NSMidY(visibleRect),
-                                 1320,
-                                 1140);
-  NSUInteger styleMask = NSTitledWindowMask | NSClosableWindowMask;
-  _window = [[NSWindow alloc] initWithContentRect:windowRect
-                                        styleMask:styleMask
-                                          backing:NSBackingStoreBuffered
-                                            defer:NO];
-  _window.delegate = self;
-  [_window makeKeyAndOrderFront:self];
-  [_window makeMainWindow];
-  _viewController = [[APPRTCViewController alloc] initWithNibName:nil
-                                                           bundle:nil];
-  [_window setContentView:[_viewController view]];
-}
-
-#pragma mark - NSWindow
-
-- (void)windowWillClose:(NSNotification*)notification {
-  [_viewController windowWillClose:notification];
-  [RTCPeerConnectionFactory deinitializeSSL];
-  [NSApp terminate:self];
-}
-
-@end
-
diff --git a/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.h b/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.h
deleted file mode 100644
index 204cb5e..0000000
--- a/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
-@interface APPRTCViewController : NSViewController
-
-- (void)windowWillClose:(NSNotification*)notification;
-
-@end
diff --git a/talk/examples/objc/AppRTCDemo/mac/main.m b/talk/examples/objc/AppRTCDemo/mac/main.m
deleted file mode 100644
index 7b6bd9d..0000000
--- a/talk/examples/objc/AppRTCDemo/mac/main.m
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * libjingle
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
-#import "APPRTCAppDelegate.h"
-
-int main(int argc, char* argv[]) {
-  @autoreleasepool {
-    [NSApplication sharedApplication];
-    APPRTCAppDelegate* delegate = [[APPRTCAppDelegate alloc] init];
-    [NSApp setDelegate:delegate];
-    [NSApp run];
-  }
-}
diff --git a/talk/examples/peerconnection/client/defaults.cc b/talk/examples/peerconnection/client/defaults.cc
deleted file mode 100644
index 490de2e..0000000
--- a/talk/examples/peerconnection/client/defaults.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * libjingle
- * Copyright 2012 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/examples/peerconnection/client/defaults.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef WIN32
-#include <winsock2.h>
-#else
-#include <unistd.h>
-#endif
-
-#include "webrtc/base/common.h"
-
-const char kAudioLabel[] = "audio_label";
-const char kVideoLabel[] = "video_label";
-const char kStreamLabel[] = "stream_label";
-const uint16 kDefaultServerPort = 8888;
-
-std::string GetEnvVarOrDefault(const char* env_var_name,
-                               const char* default_value) {
-  std::string value;
-  const char* env_var = getenv(env_var_name);
-  if (env_var)
-    value = env_var;
-
-  if (value.empty())
-    value = default_value;
-
-  return value;
-}
-
-std::string GetPeerConnectionString() {
-  return GetEnvVarOrDefault("WEBRTC_CONNECT", "stun:stun.l.google.com:19302");
-}
-
-std::string GetDefaultServerName() {
-  return GetEnvVarOrDefault("WEBRTC_SERVER", "localhost");
-}
-
-std::string GetPeerName() {
-  char computer_name[256];
-  if (gethostname(computer_name, ARRAY_SIZE(computer_name)) != 0)
-    strcpy(computer_name, "host");
-  std::string ret(GetEnvVarOrDefault("USERNAME", "user"));
-  ret += '@';
-  ret += computer_name;
-  return ret;
-}
diff --git a/talk/examples/peerconnection/client/defaults.h b/talk/examples/peerconnection/client/defaults.h
deleted file mode 100644
index 845faa3..0000000
--- a/talk/examples/peerconnection/client/defaults.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * libjingle
- * Copyright 2011 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PEERCONNECTION_SAMPLES_CLIENT_DEFAULTS_H_
-#define PEERCONNECTION_SAMPLES_CLIENT_DEFAULTS_H_
-#pragma once
-
-#include <string>
-
-#include "webrtc/base/basictypes.h"
-
-extern const char kAudioLabel[];
-extern const char kVideoLabel[];
-extern const char kStreamLabel[];
-extern const uint16 kDefaultServerPort;
-
-std::string GetEnvVarOrDefault(const char* env_var_name,
-                               const char* default_value);
-std::string GetPeerConnectionString();
-std::string GetDefaultServerName();
-std::string GetPeerName();
-
-#endif  // PEERCONNECTION_SAMPLES_CLIENT_DEFAULTS_H_
diff --git a/talk/examples/peerconnection/client/flagdefs.h b/talk/examples/peerconnection/client/flagdefs.h
deleted file mode 100644
index 0a1e330..0000000
--- a/talk/examples/peerconnection/client/flagdefs.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * libjingle
- * Copyright 2012 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_EXAMPLES_PEERCONNECTION_CLIENT_FLAGDEFS_H_
-#define TALK_EXAMPLES_PEERCONNECTION_CLIENT_FLAGDEFS_H_
-#pragma once
-
-#include "webrtc/base/flags.h"
-
-extern const uint16 kDefaultServerPort;  // From defaults.[h|cc]
-
-// Define flags for the peerconnect_client testing tool, in a separate
-// header file so that they can be shared across the different main.cc's
-// for each platform.
-
-DEFINE_bool(help, false, "Prints this message");
-DEFINE_bool(autoconnect, false, "Connect to the server without user "
-                                "intervention.");
-DEFINE_string(server, "localhost", "The server to connect to.");
-DEFINE_int(port, kDefaultServerPort,
-           "The port on which the server is listening.");
-DEFINE_bool(autocall, false, "Call the first available other client on "
-  "the server without user intervention.  Note: this flag should only be set "
-  "to true on one of the two clients.");
-
-#endif  // TALK_EXAMPLES_PEERCONNECTION_CLIENT_FLAGDEFS_H_
diff --git a/talk/examples/peerconnection/client/main.cc b/talk/examples/peerconnection/client/main.cc
deleted file mode 100644
index 5be6257..0000000
--- a/talk/examples/peerconnection/client/main.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * libjingle
- * Copyright 2012 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/examples/peerconnection/client/conductor.h"
-#include "talk/examples/peerconnection/client/flagdefs.h"
-#include "talk/examples/peerconnection/client/main_wnd.h"
-#include "talk/examples/peerconnection/client/peer_connection_client.h"
-#include "webrtc/base/ssladapter.h"
-#include "webrtc/base/win32socketinit.h"
-#include "webrtc/base/win32socketserver.h"
-
-
-int PASCAL wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
-                    wchar_t* cmd_line, int cmd_show) {
-  rtc::EnsureWinsockInit();
-  rtc::Win32Thread w32_thread;
-  rtc::ThreadManager::Instance()->SetCurrentThread(&w32_thread);
-
-  rtc::WindowsCommandLineArguments win_args;
-  int argc = win_args.argc();
-  char **argv = win_args.argv();
-
-  rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
-  if (FLAG_help) {
-    rtc::FlagList::Print(NULL, false);
-    return 0;
-  }
-
-  // Abort if the user specifies a port that is outside the allowed
-  // range [1, 65535].
-  if ((FLAG_port < 1) || (FLAG_port > 65535)) {
-    printf("Error: %i is not a valid port.\n", FLAG_port);
-    return -1;
-  }
-
-  MainWnd wnd(FLAG_server, FLAG_port, FLAG_autoconnect, FLAG_autocall);
-  if (!wnd.Create()) {
-    ASSERT(false);
-    return -1;
-  }
-
-  rtc::InitializeSSL();
-  PeerConnectionClient client;
-  rtc::scoped_refptr<Conductor> conductor(
-        new rtc::RefCountedObject<Conductor>(&client, &wnd));
-
-  // Main loop.
-  MSG msg;
-  BOOL gm;
-  while ((gm = ::GetMessage(&msg, NULL, 0, 0)) != 0 && gm != -1) {
-    if (!wnd.PreTranslateMessage(&msg)) {
-      ::TranslateMessage(&msg);
-      ::DispatchMessage(&msg);
-    }
-  }
-
-  if (conductor->connection_active() || client.is_connected()) {
-    while ((conductor->connection_active() || client.is_connected()) &&
-           (gm = ::GetMessage(&msg, NULL, 0, 0)) != 0 && gm != -1) {
-      if (!wnd.PreTranslateMessage(&msg)) {
-        ::TranslateMessage(&msg);
-        ::DispatchMessage(&msg);
-      }
-    }
-  }
-
-  rtc::CleanupSSL();
-  return 0;
-}
diff --git a/talk/examples/peerconnection/server/utils.cc b/talk/examples/peerconnection/server/utils.cc
deleted file mode 100644
index a9938c8..0000000
--- a/talk/examples/peerconnection/server/utils.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * libjingle
- * Copyright 2011 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/examples/peerconnection/server/utils.h"
-
-#include <stdio.h>
-
-#include "webrtc/base/stringencode.h"
-
-using rtc::ToString;
-
-std::string int2str(int i) {
-  return ToString<int>(i);
-}
-
-std::string size_t2str(size_t i) {
-  return ToString<size_t>(i);
-}
diff --git a/talk/examples/peerconnection/server/utils.h b/talk/examples/peerconnection/server/utils.h
deleted file mode 100644
index dba5e85..0000000
--- a/talk/examples/peerconnection/server/utils.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * libjingle
- * Copyright 2011 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
-#define TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
-#pragma once
-
-#include <assert.h>
-#include <string>
-
-#ifndef ARRAYSIZE
-#define ARRAYSIZE(x) (sizeof(x) / sizeof(x[0]))
-#endif
-
-std::string int2str(int i);
-std::string size_t2str(size_t i);
-
-#endif  // TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
diff --git a/talk/examples/relayserver/relayserver_main.cc b/talk/examples/relayserver/relayserver_main.cc
deleted file mode 100644
index 817e73d..0000000
--- a/talk/examples/relayserver/relayserver_main.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <iostream>  // NOLINT
-
-#include "webrtc/p2p/base/relayserver.h"
-#include "webrtc/base/scoped_ptr.h"
-#include "webrtc/base/thread.h"
-
-int main(int argc, char **argv) {
-  if (argc != 3) {
-    std::cerr << "usage: relayserver internal-address external-address"
-              << std::endl;
-    return 1;
-  }
-
-  rtc::SocketAddress int_addr;
-  if (!int_addr.FromString(argv[1])) {
-    std::cerr << "Unable to parse IP address: " << argv[1];
-    return 1;
-  }
-
-  rtc::SocketAddress ext_addr;
-  if (!ext_addr.FromString(argv[2])) {
-    std::cerr << "Unable to parse IP address: " << argv[2];
-    return 1;
-  }
-
-  rtc::Thread *pthMain = rtc::Thread::Current();
-
-  rtc::scoped_ptr<rtc::AsyncUDPSocket> int_socket(
-      rtc::AsyncUDPSocket::Create(pthMain->socketserver(), int_addr));
-  if (!int_socket) {
-    std::cerr << "Failed to create a UDP socket bound at"
-              << int_addr.ToString() << std::endl;
-    return 1;
-  }
-
-  rtc::scoped_ptr<rtc::AsyncUDPSocket> ext_socket(
-      rtc::AsyncUDPSocket::Create(pthMain->socketserver(), ext_addr));
-  if (!ext_socket) {
-    std::cerr << "Failed to create a UDP socket bound at"
-              << ext_addr.ToString() << std::endl;
-    return 1;
-  }
-
-  cricket::RelayServer server(pthMain);
-  server.AddInternalSocket(int_socket.get());
-  server.AddExternalSocket(ext_socket.get());
-
-  std::cout << "Listening internally at " << int_addr.ToString() << std::endl;
-  std::cout << "Listening externally at " << ext_addr.ToString() << std::endl;
-
-  pthMain->Run();
-  return 0;
-}
diff --git a/talk/examples/stunserver/stunserver_main.cc b/talk/examples/stunserver/stunserver_main.cc
deleted file mode 100644
index 25cca16..0000000
--- a/talk/examples/stunserver/stunserver_main.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if defined(WEBRTC_POSIX)
-#include <errno.h>
-#endif  // WEBRTC_POSIX
-
-#include <iostream>
-
-#include "webrtc/p2p/base/stunserver.h"
-#include "webrtc/base/thread.h"
-
-using namespace cricket;
-
-int main(int argc, char* argv[]) {
-  if (argc != 2) {
-    std::cerr << "usage: stunserver address" << std::endl;
-    return 1;
-  }
-
-  rtc::SocketAddress server_addr;
-  if (!server_addr.FromString(argv[1])) {
-    std::cerr << "Unable to parse IP address: " << argv[1];
-    return 1;
-  }
-
-  rtc::Thread *pthMain = rtc::Thread::Current();
-
-  rtc::AsyncUDPSocket* server_socket =
-      rtc::AsyncUDPSocket::Create(pthMain->socketserver(), server_addr);
-  if (!server_socket) {
-    std::cerr << "Failed to create a UDP socket" << std::endl;
-    return 1;
-  }
-
-  StunServer* server = new StunServer(server_socket);
-
-  std::cout << "Listening at " << server_addr.ToString() << std::endl;
-
-  pthMain->Run();
-
-  delete server;
-  return 0;
-}
diff --git a/talk/libjingle_tests.gyp b/talk/libjingle_tests.gyp
index d08a236..159eefc 100755
--- a/talk/libjingle_tests.gyp
+++ b/talk/libjingle_tests.gyp
@@ -380,11 +380,11 @@
           'dependencies': [
             '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
             '<(DEPTH)/third_party/ocmock/ocmock.gyp:ocmock',
-            'libjingle_examples.gyp:apprtc_signaling',
+            '<(webrtc_root)/libjingle_examples.gyp:apprtc_signaling',
           ],
           'sources': [
             'app/webrtc/objctests/mac/main.mm',
-            'examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm',
+            '<(webrtc_root)/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm',
           ],
           'conditions': [
             ['OS=="mac"', {
diff --git a/talk/examples/OWNERS b/webrtc/examples/OWNERS
similarity index 100%
rename from talk/examples/OWNERS
rename to webrtc/examples/OWNERS
diff --git a/talk/examples/android/AndroidManifest.xml b/webrtc/examples/androidapp/AndroidManifest.xml
similarity index 100%
rename from talk/examples/android/AndroidManifest.xml
rename to webrtc/examples/androidapp/AndroidManifest.xml
diff --git a/talk/examples/android/README b/webrtc/examples/androidapp/README
similarity index 100%
rename from talk/examples/android/README
rename to webrtc/examples/androidapp/README
diff --git a/talk/examples/android/ant.properties b/webrtc/examples/androidapp/ant.properties
similarity index 100%
rename from talk/examples/android/ant.properties
rename to webrtc/examples/androidapp/ant.properties
diff --git a/talk/examples/android/build.xml b/webrtc/examples/androidapp/build.xml
similarity index 100%
rename from talk/examples/android/build.xml
rename to webrtc/examples/androidapp/build.xml
diff --git a/talk/examples/android/project.properties b/webrtc/examples/androidapp/project.properties
similarity index 100%
rename from talk/examples/android/project.properties
rename to webrtc/examples/androidapp/project.properties
diff --git a/talk/examples/android/res/drawable-hdpi/disconnect.png b/webrtc/examples/androidapp/res/drawable-hdpi/disconnect.png
similarity index 100%
rename from talk/examples/android/res/drawable-hdpi/disconnect.png
rename to webrtc/examples/androidapp/res/drawable-hdpi/disconnect.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-hdpi/ic_action_full_screen.png b/webrtc/examples/androidapp/res/drawable-hdpi/ic_action_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-hdpi/ic_action_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-hdpi/ic_action_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-hdpi/ic_action_return_from_full_screen.png b/webrtc/examples/androidapp/res/drawable-hdpi/ic_action_return_from_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-hdpi/ic_action_return_from_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-hdpi/ic_action_return_from_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-hdpi/ic_launcher.png b/webrtc/examples/androidapp/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from talk/examples/android/res/drawable-hdpi/ic_launcher.png
rename to webrtc/examples/androidapp/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-hdpi/ic_loopback_call.png b/webrtc/examples/androidapp/res/drawable-hdpi/ic_loopback_call.png
similarity index 100%
rename from talk/examples/android/res/drawable-hdpi/ic_loopback_call.png
rename to webrtc/examples/androidapp/res/drawable-hdpi/ic_loopback_call.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-ldpi/disconnect.png b/webrtc/examples/androidapp/res/drawable-ldpi/disconnect.png
similarity index 100%
rename from talk/examples/android/res/drawable-ldpi/disconnect.png
rename to webrtc/examples/androidapp/res/drawable-ldpi/disconnect.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-ldpi/ic_action_full_screen.png b/webrtc/examples/androidapp/res/drawable-ldpi/ic_action_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-ldpi/ic_action_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-ldpi/ic_action_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-ldpi/ic_action_return_from_full_screen.png b/webrtc/examples/androidapp/res/drawable-ldpi/ic_action_return_from_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-ldpi/ic_action_return_from_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-ldpi/ic_action_return_from_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-ldpi/ic_launcher.png b/webrtc/examples/androidapp/res/drawable-ldpi/ic_launcher.png
similarity index 100%
rename from talk/examples/android/res/drawable-ldpi/ic_launcher.png
rename to webrtc/examples/androidapp/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-ldpi/ic_loopback_call.png b/webrtc/examples/androidapp/res/drawable-ldpi/ic_loopback_call.png
similarity index 100%
rename from talk/examples/android/res/drawable-ldpi/ic_loopback_call.png
rename to webrtc/examples/androidapp/res/drawable-ldpi/ic_loopback_call.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-mdpi/disconnect.png b/webrtc/examples/androidapp/res/drawable-mdpi/disconnect.png
similarity index 100%
rename from talk/examples/android/res/drawable-mdpi/disconnect.png
rename to webrtc/examples/androidapp/res/drawable-mdpi/disconnect.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-mdpi/ic_action_full_screen.png b/webrtc/examples/androidapp/res/drawable-mdpi/ic_action_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-mdpi/ic_action_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-mdpi/ic_action_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-mdpi/ic_action_return_from_full_screen.png b/webrtc/examples/androidapp/res/drawable-mdpi/ic_action_return_from_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-mdpi/ic_action_return_from_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-mdpi/ic_action_return_from_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-mdpi/ic_launcher.png b/webrtc/examples/androidapp/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from talk/examples/android/res/drawable-mdpi/ic_launcher.png
rename to webrtc/examples/androidapp/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-mdpi/ic_loopback_call.png b/webrtc/examples/androidapp/res/drawable-mdpi/ic_loopback_call.png
similarity index 100%
rename from talk/examples/android/res/drawable-mdpi/ic_loopback_call.png
rename to webrtc/examples/androidapp/res/drawable-mdpi/ic_loopback_call.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-xhdpi/disconnect.png b/webrtc/examples/androidapp/res/drawable-xhdpi/disconnect.png
similarity index 100%
rename from talk/examples/android/res/drawable-xhdpi/disconnect.png
rename to webrtc/examples/androidapp/res/drawable-xhdpi/disconnect.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-xhdpi/ic_action_full_screen.png b/webrtc/examples/androidapp/res/drawable-xhdpi/ic_action_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-xhdpi/ic_action_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-xhdpi/ic_action_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-xhdpi/ic_action_return_from_full_screen.png b/webrtc/examples/androidapp/res/drawable-xhdpi/ic_action_return_from_full_screen.png
similarity index 100%
rename from talk/examples/android/res/drawable-xhdpi/ic_action_return_from_full_screen.png
rename to webrtc/examples/androidapp/res/drawable-xhdpi/ic_action_return_from_full_screen.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-xhdpi/ic_launcher.png b/webrtc/examples/androidapp/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from talk/examples/android/res/drawable-xhdpi/ic_launcher.png
rename to webrtc/examples/androidapp/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/talk/examples/android/res/drawable-xhdpi/ic_loopback_call.png b/webrtc/examples/androidapp/res/drawable-xhdpi/ic_loopback_call.png
similarity index 100%
rename from talk/examples/android/res/drawable-xhdpi/ic_loopback_call.png
rename to webrtc/examples/androidapp/res/drawable-xhdpi/ic_loopback_call.png
Binary files differ
diff --git a/talk/examples/android/res/layout/activity_call.xml b/webrtc/examples/androidapp/res/layout/activity_call.xml
similarity index 100%
rename from talk/examples/android/res/layout/activity_call.xml
rename to webrtc/examples/androidapp/res/layout/activity_call.xml
diff --git a/talk/examples/android/res/layout/activity_connect.xml b/webrtc/examples/androidapp/res/layout/activity_connect.xml
similarity index 100%
rename from talk/examples/android/res/layout/activity_connect.xml
rename to webrtc/examples/androidapp/res/layout/activity_connect.xml
diff --git a/talk/examples/android/res/layout/fragment_call.xml b/webrtc/examples/androidapp/res/layout/fragment_call.xml
similarity index 100%
rename from talk/examples/android/res/layout/fragment_call.xml
rename to webrtc/examples/androidapp/res/layout/fragment_call.xml
diff --git a/talk/examples/android/res/layout/fragment_hud.xml b/webrtc/examples/androidapp/res/layout/fragment_hud.xml
similarity index 100%
rename from talk/examples/android/res/layout/fragment_hud.xml
rename to webrtc/examples/androidapp/res/layout/fragment_hud.xml
diff --git a/talk/examples/android/res/menu/connect_menu.xml b/webrtc/examples/androidapp/res/menu/connect_menu.xml
similarity index 100%
rename from talk/examples/android/res/menu/connect_menu.xml
rename to webrtc/examples/androidapp/res/menu/connect_menu.xml
diff --git a/talk/examples/android/res/values-v17/styles.xml b/webrtc/examples/androidapp/res/values-v17/styles.xml
similarity index 100%
rename from talk/examples/android/res/values-v17/styles.xml
rename to webrtc/examples/androidapp/res/values-v17/styles.xml
diff --git a/talk/examples/android/res/values-v21/styles.xml b/webrtc/examples/androidapp/res/values-v21/styles.xml
similarity index 100%
rename from talk/examples/android/res/values-v21/styles.xml
rename to webrtc/examples/androidapp/res/values-v21/styles.xml
diff --git a/talk/examples/android/res/values/arrays.xml b/webrtc/examples/androidapp/res/values/arrays.xml
similarity index 100%
rename from talk/examples/android/res/values/arrays.xml
rename to webrtc/examples/androidapp/res/values/arrays.xml
diff --git a/talk/examples/android/res/values/strings.xml b/webrtc/examples/androidapp/res/values/strings.xml
similarity index 100%
rename from talk/examples/android/res/values/strings.xml
rename to webrtc/examples/androidapp/res/values/strings.xml
diff --git a/talk/examples/android/res/xml/preferences.xml b/webrtc/examples/androidapp/res/xml/preferences.xml
similarity index 100%
rename from talk/examples/android/res/xml/preferences.xml
rename to webrtc/examples/androidapp/res/xml/preferences.xml
diff --git a/talk/examples/android/src/org/appspot/apprtc/AppRTCAudioManager.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java
similarity index 89%
rename from talk/examples/android/src/org/appspot/apprtc/AppRTCAudioManager.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java
index 9660cc5..961c512 100644
--- a/talk/examples/android/src/org/appspot/apprtc/AppRTCAudioManager.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/AppRTCClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCClient.java
similarity index 68%
rename from talk/examples/android/src/org/appspot/apprtc/AppRTCClient.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCClient.java
index 30451bf..195446a 100644
--- a/talk/examples/android/src/org/appspot/apprtc/AppRTCClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCClient.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2013 Google Inc.
+ *  Copyright 2013 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/AppRTCProximitySensor.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java
similarity index 81%
rename from talk/examples/android/src/org/appspot/apprtc/AppRTCProximitySensor.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java
index 3d1a22f..08d9691 100644
--- a/talk/examples/android/src/org/appspot/apprtc/AppRTCProximitySensor.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/CallActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
similarity index 93%
rename from talk/examples/android/src/org/appspot/apprtc/CallActivity.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
index 735f28e..d46f9a3 100644
--- a/talk/examples/android/src/org/appspot/apprtc/CallActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/CallFragment.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java
similarity index 68%
rename from talk/examples/android/src/org/appspot/apprtc/CallFragment.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java
index d0b670d..3d445d4 100644
--- a/talk/examples/android/src/org/appspot/apprtc/CallFragment.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/ConnectActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java
similarity index 90%
rename from talk/examples/android/src/org/appspot/apprtc/ConnectActivity.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java
index 69aeda5..7c00790 100644
--- a/talk/examples/android/src/org/appspot/apprtc/ConnectActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/CpuMonitor.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CpuMonitor.java
similarity index 86%
rename from talk/examples/android/src/org/appspot/apprtc/CpuMonitor.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/CpuMonitor.java
index 89d21d4..1d54e5e 100644
--- a/talk/examples/android/src/org/appspot/apprtc/CpuMonitor.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CpuMonitor.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/HudFragment.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/HudFragment.java
similarity index 83%
rename from talk/examples/android/src/org/appspot/apprtc/HudFragment.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/HudFragment.java
index c1f8fa2..cc7015b 100644
--- a/talk/examples/android/src/org/appspot/apprtc/HudFragment.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/HudFragment.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
similarity index 95%
rename from talk/examples/android/src/org/appspot/apprtc/PeerConnectionClient.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
index e3cdc99..51ef32e 100644
--- a/talk/examples/android/src/org/appspot/apprtc/PeerConnectionClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/RoomParametersFetcher.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java
similarity index 84%
rename from talk/examples/android/src/org/appspot/apprtc/RoomParametersFetcher.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java
index b14d2d4..a751f92 100644
--- a/talk/examples/android/src/org/appspot/apprtc/RoomParametersFetcher.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/SettingsActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java
similarity index 82%
rename from talk/examples/android/src/org/appspot/apprtc/SettingsActivity.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java
index 7746ef5..ce7d989 100644
--- a/talk/examples/android/src/org/appspot/apprtc/SettingsActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsFragment.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsFragment.java
new file mode 100644
index 0000000..3fc5b51
--- /dev/null
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsFragment.java
@@ -0,0 +1,27 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+package org.appspot.apprtc;
+
+import android.os.Bundle;
+import android.preference.PreferenceFragment;
+
+/**
+ * Settings fragment for AppRTC.
+ */
+public class SettingsFragment extends PreferenceFragment {
+
+  @Override
+  public void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+    // Load the preferences from an XML resource
+    addPreferencesFromResource(R.xml.preferences);
+  }
+}
diff --git a/talk/examples/android/src/org/appspot/apprtc/UnhandledExceptionHandler.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java
similarity index 65%
rename from talk/examples/android/src/org/appspot/apprtc/UnhandledExceptionHandler.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java
index 5c34e57..a9a136b 100644
--- a/talk/examples/android/src/org/appspot/apprtc/UnhandledExceptionHandler.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2013 Google Inc.
+ *  Copyright 2013 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/WebSocketChannelClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java
similarity index 86%
rename from talk/examples/android/src/org/appspot/apprtc/WebSocketChannelClient.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java
index 7ba2575..14b7231 100644
--- a/talk/examples/android/src/org/appspot/apprtc/WebSocketChannelClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/talk/examples/android/src/org/appspot/apprtc/WebSocketRTCClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java
similarity index 89%
rename from talk/examples/android/src/org/appspot/apprtc/WebSocketRTCClient.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java
index 060477f..ca319ab 100644
--- a/talk/examples/android/src/org/appspot/apprtc/WebSocketRTCClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc;
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java
new file mode 100644
index 0000000..db5ef3d
--- /dev/null
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java
@@ -0,0 +1,67 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+package org.appspot.apprtc.util;
+
+import android.os.Build;
+import android.util.Log;
+
+/**
+ * AppRTCUtils provides helper functions for managing thread safety.
+ */
+public final class AppRTCUtils {
+
+  private AppRTCUtils() {
+  }
+
+  /**
+   * NonThreadSafe is a helper class used to help verify that methods of a
+   * class are called from the same thread.
+   */
+  public static class NonThreadSafe {
+    private final Long threadId;
+
+    public NonThreadSafe() {
+      // Store thread ID of the creating thread.
+      threadId = Thread.currentThread().getId();
+    }
+
+   /** Checks if the method is called on the valid/creating thread. */
+    public boolean calledOnValidThread() {
+       return threadId.equals(Thread.currentThread().getId());
+    }
+  }
+
+  /** Helper method which throws an exception  when an assertion has failed. */
+  public static void assertIsTrue(boolean condition) {
+    if (!condition) {
+      throw new AssertionError("Expected condition to be true");
+    }
+  }
+
+  /** Helper method for building a string of thread information.*/
+  public static String getThreadInfo() {
+    return "@[name=" + Thread.currentThread().getName()
+        + ", id=" + Thread.currentThread().getId() + "]";
+  }
+
+  /** Information about the current build, taken from system properties. */
+  public static void logDeviceInfo(String tag) {
+    Log.d(tag, "Android SDK: " + Build.VERSION.SDK_INT + ", "
+        + "Release: " + Build.VERSION.RELEASE + ", "
+        + "Brand: " + Build.BRAND + ", "
+        + "Device: " + Build.DEVICE + ", "
+        + "Id: " + Build.ID + ", "
+        + "Hardware: " + Build.HARDWARE + ", "
+        + "Manufacturer: " + Build.MANUFACTURER + ", "
+        + "Model: " + Build.MODEL + ", "
+        + "Product: " + Build.PRODUCT);
+  }
+}
diff --git a/talk/examples/android/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java
similarity index 70%
rename from talk/examples/android/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java
rename to webrtc/examples/androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java
index 9cb0196..a56d4ea 100644
--- a/talk/examples/android/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc.util;
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java
new file mode 100644
index 0000000..1563e26
--- /dev/null
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java
@@ -0,0 +1,95 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+package org.appspot.apprtc.util;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.util.Log;
+
+import java.util.concurrent.Executor;
+
+/**
+ * Looper based executor class.
+ */
+public class LooperExecutor extends Thread implements Executor {
+  private static final String TAG = "LooperExecutor";
+  // Object used to signal that looper thread has started and Handler instance
+  // associated with looper thread has been allocated.
+  private final Object looperStartedEvent = new Object();
+  private Handler handler = null;
+  private boolean running = false;
+  private long threadId;
+
+  @Override
+  public void run() {
+    Looper.prepare();
+    synchronized (looperStartedEvent) {
+      Log.d(TAG, "Looper thread started.");
+      handler = new Handler();
+      threadId = Thread.currentThread().getId();
+      looperStartedEvent.notify();
+    }
+    Looper.loop();
+  }
+
+  public synchronized void requestStart() {
+    if (running) {
+      return;
+    }
+    running = true;
+    handler = null;
+    start();
+    // Wait for Hander allocation.
+    synchronized (looperStartedEvent) {
+      while (handler == null) {
+        try {
+          looperStartedEvent.wait();
+        } catch (InterruptedException e) {
+          Log.e(TAG, "Can not start looper thread");
+          running = false;
+        }
+      }
+    }
+  }
+
+  public synchronized void requestStop() {
+    if (!running) {
+      return;
+    }
+    running = false;
+    handler.post(new Runnable() {
+      @Override
+      public void run() {
+        Looper.myLooper().quit();
+        Log.d(TAG, "Looper thread finished.");
+      }
+    });
+  }
+
+  // Checks if current thread is a looper thread.
+  public boolean checkOnLooperThread() {
+    return (Thread.currentThread().getId() == threadId);
+  }
+
+  @Override
+  public synchronized void execute(final Runnable runnable) {
+    if (!running) {
+      Log.w(TAG, "Running looper executor without calling requestStart()");
+      return;
+    }
+    if (Thread.currentThread().getId() == threadId) {
+      runnable.run();
+    } else {
+      handler.post(runnable);
+    }
+  }
+
+}
diff --git a/talk/examples/android/third_party/autobanh/LICENSE b/webrtc/examples/androidapp/third_party/autobanh/LICENSE
similarity index 100%
rename from talk/examples/android/third_party/autobanh/LICENSE
rename to webrtc/examples/androidapp/third_party/autobanh/LICENSE
diff --git a/talk/examples/android/third_party/autobanh/LICENSE.md b/webrtc/examples/androidapp/third_party/autobanh/LICENSE.md
similarity index 100%
rename from talk/examples/android/third_party/autobanh/LICENSE.md
rename to webrtc/examples/androidapp/third_party/autobanh/LICENSE.md
diff --git a/talk/examples/android/third_party/autobanh/NOTICE b/webrtc/examples/androidapp/third_party/autobanh/NOTICE
similarity index 100%
rename from talk/examples/android/third_party/autobanh/NOTICE
rename to webrtc/examples/androidapp/third_party/autobanh/NOTICE
diff --git a/talk/examples/android/third_party/autobanh/autobanh.jar b/webrtc/examples/androidapp/third_party/autobanh/autobanh.jar
similarity index 100%
rename from talk/examples/android/third_party/autobanh/autobanh.jar
rename to webrtc/examples/androidapp/third_party/autobanh/autobanh.jar
Binary files differ
diff --git a/talk/examples/androidtests/AndroidManifest.xml b/webrtc/examples/androidtests/AndroidManifest.xml
similarity index 100%
rename from talk/examples/androidtests/AndroidManifest.xml
rename to webrtc/examples/androidtests/AndroidManifest.xml
diff --git a/talk/examples/androidtests/README b/webrtc/examples/androidtests/README
similarity index 100%
rename from talk/examples/androidtests/README
rename to webrtc/examples/androidtests/README
diff --git a/talk/examples/androidtests/ant.properties b/webrtc/examples/androidtests/ant.properties
similarity index 100%
rename from talk/examples/androidtests/ant.properties
rename to webrtc/examples/androidtests/ant.properties
diff --git a/talk/examples/androidtests/build.xml b/webrtc/examples/androidtests/build.xml
similarity index 100%
rename from talk/examples/androidtests/build.xml
rename to webrtc/examples/androidtests/build.xml
diff --git a/talk/examples/androidtests/project.properties b/webrtc/examples/androidtests/project.properties
similarity index 100%
rename from talk/examples/androidtests/project.properties
rename to webrtc/examples/androidtests/project.properties
diff --git a/webrtc/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java
new file mode 100644
index 0000000..29ccaef
--- /dev/null
+++ b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java
@@ -0,0 +1,67 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+package org.appspot.apprtc.test;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.appspot.apprtc.util.LooperExecutor;
+
+import android.test.InstrumentationTestCase;
+import android.util.Log;
+
+public class LooperExecutorTest extends InstrumentationTestCase {
+  private static final String TAG = "LooperTest";
+  private static final int WAIT_TIMEOUT = 5000;
+
+  public void testLooperExecutor() throws InterruptedException {
+    Log.d(TAG, "testLooperExecutor");
+    final int counter[] = new int[1];
+    final int expectedCounter = 10;
+    final CountDownLatch looperDone = new CountDownLatch(1);
+
+    Runnable counterIncRunnable = new Runnable() {
+      @Override
+      public void run() {
+        counter[0]++;
+        Log.d(TAG, "Run " + counter[0]);
+      }
+    };
+    LooperExecutor executor = new LooperExecutor();
+
+    // Try to execute a counter increment task before starting an executor.
+    executor.execute(counterIncRunnable);
+
+    // Start the executor and run expected amount of counter increment task.
+    executor.requestStart();
+    for (int i = 0; i < expectedCounter; i++) {
+      executor.execute(counterIncRunnable);
+    }
+    executor.execute(new Runnable() {
+      @Override
+      public void run() {
+        looperDone.countDown();
+      }
+    });
+    executor.requestStop();
+
+    // Try to execute a task after stopping the executor.
+    executor.execute(counterIncRunnable);
+
+    // Wait for final looper task and make sure the counter increment task
+    // is executed expected amount of times.
+    looperDone.await(WAIT_TIMEOUT, TimeUnit.MILLISECONDS);
+    assertTrue (looperDone.getCount() == 0);
+    assertTrue (counter[0] == expectedCounter);
+
+    Log.d(TAG, "testLooperExecutor done");
+  }
+}
diff --git a/talk/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
similarity index 91%
rename from talk/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
rename to webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
index 0312b6e..00a8187 100644
--- a/talk/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
+++ b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 package org.appspot.apprtc.test;
diff --git a/talk/examples/objc/.clang-format b/webrtc/examples/objc/.clang-format
similarity index 100%
rename from talk/examples/objc/.clang-format
rename to webrtc/examples/objc/.clang-format
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h b/webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h
new file mode 100644
index 0000000..c4a3871
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h
@@ -0,0 +1,52 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDAppClient.h"
+
+#import "ARDRoomServerClient.h"
+#import "ARDSignalingChannel.h"
+#import "ARDTURNClient.h"
+#import "RTCPeerConnection.h"
+#import "RTCPeerConnectionDelegate.h"
+#import "RTCPeerConnectionFactory.h"
+#import "RTCSessionDescriptionDelegate.h"
+
+@interface ARDAppClient () <ARDSignalingChannelDelegate,
+    RTCPeerConnectionDelegate, RTCSessionDescriptionDelegate>
+
+// All properties should only be mutated from the main queue.
+@property(nonatomic, strong) id<ARDRoomServerClient> roomServerClient;
+@property(nonatomic, strong) id<ARDSignalingChannel> channel;
+@property(nonatomic, strong) id<ARDTURNClient> turnClient;
+
+@property(nonatomic, strong) RTCPeerConnection *peerConnection;
+@property(nonatomic, strong) RTCPeerConnectionFactory *factory;
+@property(nonatomic, strong) NSMutableArray *messageQueue;
+
+@property(nonatomic, assign) BOOL isTurnComplete;
+@property(nonatomic, assign) BOOL hasReceivedSdp;
+@property(nonatomic, readonly) BOOL hasJoinedRoomServerRoom;
+
+@property(nonatomic, strong) NSString *roomId;
+@property(nonatomic, strong) NSString *clientId;
+@property(nonatomic, assign) BOOL isInitiator;
+@property(nonatomic, strong) NSMutableArray *iceServers;
+@property(nonatomic, strong) NSURL *webSocketURL;
+@property(nonatomic, strong) NSURL *webSocketRestURL;
+
+@property(nonatomic, strong)
+    RTCMediaConstraints *defaultPeerConnectionConstraints;
+
+- (instancetype)initWithRoomServerClient:(id<ARDRoomServerClient>)rsClient
+                        signalingChannel:(id<ARDSignalingChannel>)channel
+                              turnClient:(id<ARDTURNClient>)turnClient
+                                delegate:(id<ARDAppClientDelegate>)delegate;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.h b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.h
new file mode 100644
index 0000000..04993e4
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.h
@@ -0,0 +1,67 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+#import "RTCVideoTrack.h"
+
+typedef NS_ENUM(NSInteger, ARDAppClientState) {
+  // Disconnected from servers.
+  kARDAppClientStateDisconnected,
+  // Connecting to servers.
+  kARDAppClientStateConnecting,
+  // Connected to servers.
+  kARDAppClientStateConnected,
+};
+
+@class ARDAppClient;
+// The delegate is informed of pertinent events and will be called on the
+// main queue.
+@protocol ARDAppClientDelegate <NSObject>
+
+- (void)appClient:(ARDAppClient *)client
+    didChangeState:(ARDAppClientState)state;
+
+- (void)appClient:(ARDAppClient *)client
+    didChangeConnectionState:(RTCICEConnectionState)state;
+
+- (void)appClient:(ARDAppClient *)client
+    didReceiveLocalVideoTrack:(RTCVideoTrack *)localVideoTrack;
+
+- (void)appClient:(ARDAppClient *)client
+    didReceiveRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack;
+
+- (void)appClient:(ARDAppClient *)client
+         didError:(NSError *)error;
+
+@end
+
+// Handles connections to the AppRTC server for a given room. Methods on this
+// class should only be called from the main queue.
+@interface ARDAppClient : NSObject
+
+@property(nonatomic, readonly) ARDAppClientState state;
+@property(nonatomic, weak) id<ARDAppClientDelegate> delegate;
+
+// Convenience constructor since all expected use cases will need a delegate
+// in order to receive remote tracks.
+- (instancetype)initWithDelegate:(id<ARDAppClientDelegate>)delegate;
+
+// Establishes a connection with the AppRTC servers for the given room id.
+// TODO(tkchin): provide available keys/values for options. This will be used
+// for call configurations such as overriding server choice, specifying codecs
+// and so on.
+- (void)connectToRoomWithId:(NSString *)roomId
+                    options:(NSDictionary *)options;
+
+// Disconnects from the AppRTC servers and any connected clients.
+- (void)disconnect;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDAppClient.m b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
similarity index 93%
rename from talk/examples/objc/AppRTCDemo/ARDAppClient.m
rename to webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
index e043da2..bcc7460 100644
--- a/talk/examples/objc/AppRTCDemo/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDAppClient+Internal.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.h b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.h
new file mode 100644
index 0000000..7514f36
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.h
@@ -0,0 +1,14 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDRoomServerClient.h"
+
+@interface ARDAppEngineClient : NSObject <ARDRoomServerClient>
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDAppEngineClient.m b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
similarity index 78%
rename from talk/examples/objc/AppRTCDemo/ARDAppEngineClient.m
rename to webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
index de3f9f7..4318e6b 100644
--- a/talk/examples/objc/AppRTCDemo/ARDAppEngineClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDAppEngineClient.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.h b/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.h
new file mode 100644
index 0000000..9b136aa
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.h
@@ -0,0 +1,18 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDTURNClient.h"
+
+// Requests TURN server urls from compute engine on demand.
+@interface ARDCEODTURNClient : NSObject <ARDTURNClient>
+
+- (instancetype)initWithURL:(NSURL *)url;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.m b/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.m
new file mode 100644
index 0000000..70f815a
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.m
@@ -0,0 +1,66 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDCEODTURNClient.h"
+
+#import "ARDUtilities.h"
+#import "RTCICEServer+JSON.h"
+
+// TODO(tkchin): move this to a configuration object.
+static NSString *kTURNOriginURLString = @"https://apprtc.appspot.com";
+static NSString *kARDCEODTURNClientErrorDomain = @"ARDCEODTURNClient";
+static NSInteger kARDCEODTURNClientErrorBadResponse = -1;
+
+@implementation ARDCEODTURNClient {
+  NSURL *_url;
+}
+
+- (instancetype)initWithURL:(NSURL *)url {
+  NSParameterAssert([url absoluteString].length);
+  if (self = [super init]) {
+    _url = url;
+  }
+  return self;
+}
+
+- (void)requestServersWithCompletionHandler:
+    (void (^)(NSArray *turnServers,
+              NSError *error))completionHandler {
+  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:_url];
+  // We need to set origin because TURN provider whitelists requests based on
+  // origin.
+  [request addValue:@"Mozilla/5.0" forHTTPHeaderField:@"user-agent"];
+  [request addValue:kTURNOriginURLString forHTTPHeaderField:@"origin"];
+  [NSURLConnection sendAsyncRequest:request
+                  completionHandler:^(NSURLResponse *response,
+                                      NSData *data,
+                                      NSError *error) {
+    NSArray *turnServers = [NSArray array];
+    if (error) {
+      completionHandler(turnServers, error);
+      return;
+    }
+    NSDictionary *dict = [NSDictionary dictionaryWithJSONData:data];
+    turnServers = [RTCICEServer serversFromCEODJSONDictionary:dict];
+    if (!turnServers) {
+      NSError *responseError =
+          [[NSError alloc] initWithDomain:kARDCEODTURNClientErrorDomain
+                                     code:kARDCEODTURNClientErrorBadResponse
+                                 userInfo:@{
+            NSLocalizedDescriptionKey: @"Bad TURN response.",
+          }];
+      completionHandler(turnServers, responseError);
+      return;
+    }
+    completionHandler(turnServers, nil);
+  }];
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h b/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h
new file mode 100644
index 0000000..b320299
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h
@@ -0,0 +1,23 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDJoinResponse.h"
+
+@interface ARDJoinResponse ()
+
+@property(nonatomic, assign) ARDJoinResultType result;
+@property(nonatomic, assign) BOOL isInitiator;
+@property(nonatomic, strong) NSString *roomId;
+@property(nonatomic, strong) NSString *clientId;
+@property(nonatomic, strong) NSArray *messages;
+@property(nonatomic, strong) NSURL *webSocketURL;
+@property(nonatomic, strong) NSURL *webSocketRestURL;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse.h b/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse.h
new file mode 100644
index 0000000..2911202
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse.h
@@ -0,0 +1,32 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+typedef NS_ENUM(NSInteger, ARDJoinResultType) {
+  kARDJoinResultTypeUnknown,
+  kARDJoinResultTypeSuccess,
+  kARDJoinResultTypeFull
+};
+
+// Result of joining a room on the room server.
+@interface ARDJoinResponse : NSObject
+
+@property(nonatomic, readonly) ARDJoinResultType result;
+@property(nonatomic, readonly) BOOL isInitiator;
+@property(nonatomic, readonly) NSString *roomId;
+@property(nonatomic, readonly) NSString *clientId;
+@property(nonatomic, readonly) NSArray *messages;
+@property(nonatomic, readonly) NSURL *webSocketURL;
+@property(nonatomic, readonly) NSURL *webSocketRestURL;
+
++ (ARDJoinResponse *)responseFromJSONData:(NSData *)data;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDJoinResponse.m b/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse.m
similarity index 64%
rename from talk/examples/objc/AppRTCDemo/ARDJoinResponse.m
rename to webrtc/examples/objc/AppRTCDemo/ARDJoinResponse.m
index 5c15955..b6c2be9 100644
--- a/talk/examples/objc/AppRTCDemo/ARDJoinResponse.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDJoinResponse+Internal.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h b/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h
new file mode 100644
index 0000000..66ee761
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h
@@ -0,0 +1,17 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDMessageResponse.h"
+
+@interface ARDMessageResponse ()
+
+@property(nonatomic, assign) ARDMessageResultType result;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse.h b/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse.h
new file mode 100644
index 0000000..65468cd
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse.h
@@ -0,0 +1,26 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+typedef NS_ENUM(NSInteger, ARDMessageResultType) {
+  kARDMessageResultTypeUnknown,
+  kARDMessageResultTypeSuccess,
+  kARDMessageResultTypeInvalidRoom,
+  kARDMessageResultTypeInvalidClient
+};
+
+@interface ARDMessageResponse : NSObject
+
+@property(nonatomic, readonly) ARDMessageResultType result;
+
++ (ARDMessageResponse *)responseFromJSONData:(NSData *)data;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse.m b/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse.m
new file mode 100644
index 0000000..0f5383f
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDMessageResponse.m
@@ -0,0 +1,46 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDMessageResponse+Internal.h"
+
+#import "ARDUtilities.h"
+
+static NSString const *kARDMessageResultKey = @"result";
+
+@implementation ARDMessageResponse
+
+@synthesize result = _result;
+
++ (ARDMessageResponse *)responseFromJSONData:(NSData *)data {
+  NSDictionary *responseJSON = [NSDictionary dictionaryWithJSONData:data];
+  if (!responseJSON) {
+    return nil;
+  }
+  ARDMessageResponse *response = [[ARDMessageResponse alloc] init];
+  response.result =
+      [[self class] resultTypeFromString:responseJSON[kARDMessageResultKey]];
+  return response;
+}
+
+#pragma mark - Private
+
++ (ARDMessageResultType)resultTypeFromString:(NSString *)resultString {
+  ARDMessageResultType result = kARDMessageResultTypeUnknown;
+  if ([resultString isEqualToString:@"SUCCESS"]) {
+    result = kARDMessageResultTypeSuccess;
+  } else if ([resultString isEqualToString:@"INVALID_CLIENT"]) {
+    result = kARDMessageResultTypeInvalidClient;
+  } else if ([resultString isEqualToString:@"INVALID_ROOM"]) {
+    result = kARDMessageResultTypeInvalidRoom;
+  }
+  return result;
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDRoomServerClient.h b/webrtc/examples/objc/AppRTCDemo/ARDRoomServerClient.h
new file mode 100644
index 0000000..a9ff825
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDRoomServerClient.h
@@ -0,0 +1,33 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class ARDJoinResponse;
+@class ARDMessageResponse;
+@class ARDSignalingMessage;
+
+@protocol ARDRoomServerClient <NSObject>
+
+- (void)joinRoomWithRoomId:(NSString *)roomId
+         completionHandler:(void (^)(ARDJoinResponse *response,
+                                     NSError *error))completionHandler;
+
+- (void)sendMessage:(ARDSignalingMessage *)message
+            forRoomId:(NSString *)roomId
+             clientId:(NSString *)clientId
+    completionHandler:(void (^)(ARDMessageResponse *response,
+                                NSError *error))completionHandler;
+
+- (void)leaveRoomWithRoomId:(NSString *)roomId
+                   clientId:(NSString *)clientId
+          completionHandler:(void (^)(NSError *error))completionHandler;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDSDPUtils.h b/webrtc/examples/objc/AppRTCDemo/ARDSDPUtils.h
new file mode 100644
index 0000000..18795af
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDSDPUtils.h
@@ -0,0 +1,24 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class RTCSessionDescription;
+
+@interface ARDSDPUtils : NSObject
+
+// Updates the original SDP description to instead prefer the specified video
+// codec. We do this by placing the specified codec at the beginning of the
+// codec list if it exists in the sdp.
++ (RTCSessionDescription *)
+    descriptionForDescription:(RTCSessionDescription *)description
+          preferredVideoCodec:(NSString *)codec;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDSDPUtils.m b/webrtc/examples/objc/AppRTCDemo/ARDSDPUtils.m
similarity index 68%
rename from talk/examples/objc/AppRTCDemo/ARDSDPUtils.m
rename to webrtc/examples/objc/AppRTCDemo/ARDSDPUtils.m
index 25e8d4e..498a001 100644
--- a/talk/examples/objc/AppRTCDemo/ARDSDPUtils.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDSDPUtils.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDSDPUtils.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDSignalingChannel.h b/webrtc/examples/objc/AppRTCDemo/ARDSignalingChannel.h
new file mode 100644
index 0000000..70ba2ff
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDSignalingChannel.h
@@ -0,0 +1,52 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+#import "ARDSignalingMessage.h"
+
+typedef NS_ENUM(NSInteger, ARDSignalingChannelState) {
+  // State when disconnected.
+  kARDSignalingChannelStateClosed,
+  // State when connection is established but not ready for use.
+  kARDSignalingChannelStateOpen,
+  // State when connection is established and registered.
+  kARDSignalingChannelStateRegistered,
+  // State when connection encounters a fatal error.
+  kARDSignalingChannelStateError
+};
+
+@protocol ARDSignalingChannel;
+@protocol ARDSignalingChannelDelegate <NSObject>
+
+- (void)channel:(id<ARDSignalingChannel>)channel
+    didChangeState:(ARDSignalingChannelState)state;
+
+- (void)channel:(id<ARDSignalingChannel>)channel
+    didReceiveMessage:(ARDSignalingMessage *)message;
+
+@end
+
+@protocol ARDSignalingChannel <NSObject>
+
+@property(nonatomic, readonly) NSString *roomId;
+@property(nonatomic, readonly) NSString *clientId;
+@property(nonatomic, readonly) ARDSignalingChannelState state;
+@property(nonatomic, weak) id<ARDSignalingChannelDelegate> delegate;
+
+// Registers the channel for the given room and client id.
+- (void)registerForRoomId:(NSString *)roomId
+                 clientId:(NSString *)clientId;
+
+// Sends signaling message over the channel.
+- (void)sendMessage:(ARDSignalingMessage *)message;
+
+@end
+
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.h b/webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.h
new file mode 100644
index 0000000..c33997f
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.h
@@ -0,0 +1,49 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+#import "RTCICECandidate.h"
+#import "RTCSessionDescription.h"
+
+typedef enum {
+  kARDSignalingMessageTypeCandidate,
+  kARDSignalingMessageTypeOffer,
+  kARDSignalingMessageTypeAnswer,
+  kARDSignalingMessageTypeBye,
+} ARDSignalingMessageType;
+
+@interface ARDSignalingMessage : NSObject
+
+@property(nonatomic, readonly) ARDSignalingMessageType type;
+
++ (ARDSignalingMessage *)messageFromJSONString:(NSString *)jsonString;
+- (NSData *)JSONData;
+
+@end
+
+@interface ARDICECandidateMessage : ARDSignalingMessage
+
+@property(nonatomic, readonly) RTCICECandidate *candidate;
+
+- (instancetype)initWithCandidate:(RTCICECandidate *)candidate;
+
+@end
+
+@interface ARDSessionDescriptionMessage : ARDSignalingMessage
+
+@property(nonatomic, readonly) RTCSessionDescription *sessionDescription;
+
+- (instancetype)initWithDescription:(RTCSessionDescription *)description;
+
+@end
+
+@interface ARDByeMessage : ARDSignalingMessage
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDSignalingMessage.m b/webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.m
similarity index 68%
rename from talk/examples/objc/AppRTCDemo/ARDSignalingMessage.m
rename to webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.m
index 4d49a2e..6a8d37f 100644
--- a/talk/examples/objc/AppRTCDemo/ARDSignalingMessage.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDSignalingMessage.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDSignalingMessage.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDTURNClient.h b/webrtc/examples/objc/AppRTCDemo/ARDTURNClient.h
new file mode 100644
index 0000000..8f2a817
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDTURNClient.h
@@ -0,0 +1,20 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+@protocol ARDTURNClient <NSObject>
+
+// Returns TURN server urls if successful.
+- (void)requestServersWithCompletionHandler:
+    (void (^)(NSArray *turnServers,
+              NSError *error))completionHandler;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDWebSocketChannel.h b/webrtc/examples/objc/AppRTCDemo/ARDWebSocketChannel.h
new file mode 100644
index 0000000..2bd6264
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDWebSocketChannel.h
@@ -0,0 +1,31 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+#import "ARDSignalingChannel.h"
+
+// Wraps a WebSocket connection to the AppRTC WebSocket server.
+@interface ARDWebSocketChannel : NSObject <ARDSignalingChannel>
+
+- (instancetype)initWithURL:(NSURL *)url
+                    restURL:(NSURL *)restURL
+                   delegate:(id<ARDSignalingChannelDelegate>)delegate;
+
+// Registers with the WebSocket server for the given room and client id once
+// the web socket connection is open.
+- (void)registerForRoomId:(NSString *)roomId
+                 clientId:(NSString *)clientId;
+
+// Sends message over the WebSocket connection if registered, otherwise POSTs to
+// the web socket server instead.
+- (void)sendMessage:(ARDSignalingMessage *)message;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ARDWebSocketChannel.m b/webrtc/examples/objc/AppRTCDemo/ARDWebSocketChannel.m
similarity index 80%
rename from talk/examples/objc/AppRTCDemo/ARDWebSocketChannel.m
rename to webrtc/examples/objc/AppRTCDemo/ARDWebSocketChannel.m
index a089ff8..395a22b 100644
--- a/talk/examples/objc/AppRTCDemo/ARDWebSocketChannel.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDWebSocketChannel.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDWebSocketChannel.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCICECandidate+JSON.h b/webrtc/examples/objc/AppRTCDemo/RTCICECandidate+JSON.h
new file mode 100644
index 0000000..8ef2748
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCICECandidate+JSON.h
@@ -0,0 +1,18 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCICECandidate.h"
+
+@interface RTCICECandidate (JSON)
+
++ (RTCICECandidate *)candidateFromJSONDictionary:(NSDictionary *)dictionary;
+- (NSData *)JSONData;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCICECandidate+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCICECandidate+JSON.m
new file mode 100644
index 0000000..cf70b73
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCICECandidate+JSON.m
@@ -0,0 +1,50 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCICECandidate+JSON.h"
+
+#import "RTCLogging.h"
+
+static NSString const *kRTCICECandidateTypeKey = @"type";
+static NSString const *kRTCICECandidateTypeValue = @"candidate";
+static NSString const *kRTCICECandidateMidKey = @"id";
+static NSString const *kRTCICECandidateMLineIndexKey = @"label";
+static NSString const *kRTCICECandidateSdpKey = @"candidate";
+
+@implementation RTCICECandidate (JSON)
+
++ (RTCICECandidate *)candidateFromJSONDictionary:(NSDictionary *)dictionary {
+  NSString *mid = dictionary[kRTCICECandidateMidKey];
+  NSString *sdp = dictionary[kRTCICECandidateSdpKey];
+  NSNumber *num = dictionary[kRTCICECandidateMLineIndexKey];
+  NSInteger mLineIndex = [num integerValue];
+  return [[RTCICECandidate alloc] initWithMid:mid index:mLineIndex sdp:sdp];
+}
+
+- (NSData *)JSONData {
+  NSDictionary *json = @{
+    kRTCICECandidateTypeKey : kRTCICECandidateTypeValue,
+    kRTCICECandidateMLineIndexKey : @(self.sdpMLineIndex),
+    kRTCICECandidateMidKey : self.sdpMid,
+    kRTCICECandidateSdpKey : self.sdp
+  };
+  NSError *error = nil;
+  NSData *data =
+      [NSJSONSerialization dataWithJSONObject:json
+                                      options:NSJSONWritingPrettyPrinted
+                                        error:&error];
+  if (error) {
+    RTCLogError(@"Error serializing JSON: %@", error);
+    return nil;
+  }
+  return data;
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.h b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.h
new file mode 100644
index 0000000..10339e7
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.h
@@ -0,0 +1,19 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCICEServer.h"
+
+@interface RTCICEServer (JSON)
+
++ (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary;
+// CEOD provides different JSON, and this parses that.
++ (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
new file mode 100644
index 0000000..3ba8556
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
@@ -0,0 +1,47 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCICEServer+JSON.h"
+
+static NSString const *kRTCICEServerUsernameKey = @"username";
+static NSString const *kRTCICEServerPasswordKey = @"password";
+static NSString const *kRTCICEServerUrisKey = @"uris";
+static NSString const *kRTCICEServerUrlKey = @"urls";
+static NSString const *kRTCICEServerCredentialKey = @"credential";
+
+@implementation RTCICEServer (JSON)
+
++ (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary {
+  NSString *url = dictionary[kRTCICEServerUrlKey];
+  NSString *username = dictionary[kRTCICEServerUsernameKey];
+  NSString *credential = dictionary[kRTCICEServerCredentialKey];
+  username = username ? username : @"";
+  credential = credential ? credential : @"";
+  return [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:url]
+                                  username:username
+                                  password:credential];
+}
+
++ (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary {
+  NSString *username = dictionary[kRTCICEServerUsernameKey];
+  NSString *password = dictionary[kRTCICEServerPasswordKey];
+  NSArray *uris = dictionary[kRTCICEServerUrisKey];
+  NSMutableArray *servers = [NSMutableArray arrayWithCapacity:uris.count];
+  for (NSString *uri in uris) {
+    RTCICEServer *server =
+        [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:uri]
+                                 username:username
+                                 password:password];
+    [servers addObject:server];
+  }
+  return servers;
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h b/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h
new file mode 100644
index 0000000..dd4813a
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h
@@ -0,0 +1,19 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCMediaConstraints.h"
+
+@interface RTCMediaConstraints (JSON)
+
++ (RTCMediaConstraints *)constraintsFromJSONDictionary:
+    (NSDictionary *)dictionary;
+
+@end
+
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
new file mode 100644
index 0000000..b03773e
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m
@@ -0,0 +1,37 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCMediaConstraints+JSON.h"
+
+#import "RTCPair.h"
+
+static NSString const *kRTCMediaConstraintsMandatoryKey = @"mandatory";
+
+@implementation RTCMediaConstraints (JSON)
+
++ (RTCMediaConstraints *)constraintsFromJSONDictionary:
+    (NSDictionary *)dictionary {
+  NSDictionary *mandatory = dictionary[kRTCMediaConstraintsMandatoryKey];
+  NSMutableArray *mandatoryContraints =
+      [NSMutableArray arrayWithCapacity:[mandatory count]];
+  [mandatory enumerateKeysAndObjectsUsingBlock:^(
+      id key, id obj, BOOL *stop) {
+    [mandatoryContraints addObject:[[RTCPair alloc] initWithKey:key
+                                                          value:obj]];
+  }];
+  // TODO(tkchin): figure out json formats for optional constraints.
+  RTCMediaConstraints *constraints =
+      [[RTCMediaConstraints alloc]
+          initWithMandatoryConstraints:mandatoryContraints
+                   optionalConstraints:nil];
+  return constraints;
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h b/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h
new file mode 100644
index 0000000..ee323a7
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h
@@ -0,0 +1,19 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCSessionDescription.h"
+
+@interface RTCSessionDescription (JSON)
+
++ (RTCSessionDescription *)descriptionFromJSONDictionary:
+    (NSDictionary *)dictionary;
+- (NSData *)JSONData;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
new file mode 100644
index 0000000..b5655e0
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m
@@ -0,0 +1,33 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCSessionDescription+JSON.h"
+
+static NSString const *kRTCSessionDescriptionTypeKey = @"type";
+static NSString const *kRTCSessionDescriptionSdpKey = @"sdp";
+
+@implementation RTCSessionDescription (JSON)
+
++ (RTCSessionDescription *)descriptionFromJSONDictionary:
+    (NSDictionary *)dictionary {
+  NSString *type = dictionary[kRTCSessionDescriptionTypeKey];
+  NSString *sdp = dictionary[kRTCSessionDescriptionSdpKey];
+  return [[RTCSessionDescription alloc] initWithType:type sdp:sdp];
+}
+
+- (NSData *)JSONData {
+  NSDictionary *json = @{
+    kRTCSessionDescriptionTypeKey : self.type,
+    kRTCSessionDescriptionSdpKey : self.description
+  };
+  return [NSJSONSerialization dataWithJSONObject:json options:0 error:nil];
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/common/ARDUtilities.h b/webrtc/examples/objc/AppRTCDemo/common/ARDUtilities.h
new file mode 100644
index 0000000..6f94ef7
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/common/ARDUtilities.h
@@ -0,0 +1,35 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface NSDictionary (ARDUtilites)
+
+// Creates a dictionary with the keys and values in the JSON object.
++ (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
++ (NSDictionary *)dictionaryWithJSONData:(NSData *)jsonData;
+
+@end
+
+@interface NSURLConnection (ARDUtilities)
+
+// Issues an asynchronous request that calls back on main queue.
++ (void)sendAsyncRequest:(NSURLRequest *)request
+       completionHandler:(void (^)(NSURLResponse *response,
+                                   NSData *data,
+                                   NSError *error))completionHandler;
+
+// Posts data to the specified URL.
++ (void)sendAsyncPostToURL:(NSURL *)url
+                  withData:(NSData *)data
+         completionHandler:(void (^)(BOOL succeeded,
+                                     NSData *data))completionHandler;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/common/ARDUtilities.m b/webrtc/examples/objc/AppRTCDemo/common/ARDUtilities.m
similarity index 66%
rename from talk/examples/objc/AppRTCDemo/common/ARDUtilities.m
rename to webrtc/examples/objc/AppRTCDemo/common/ARDUtilities.m
index 39010da..257b6a6 100644
--- a/talk/examples/objc/AppRTCDemo/common/ARDUtilities.m
+++ b/webrtc/examples/objc/AppRTCDemo/common/ARDUtilities.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDUtilities.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.h b/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.h
new file mode 100644
index 0000000..c73e8f2
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.h
@@ -0,0 +1,17 @@
+/*
+ *  Copyright 2013 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+// The main application class of the AppRTCDemo iOS app demonstrating
+// interoperability between the Objective C implementation of PeerConnection
+// and the apprtc.appspot.com demo webapp.
+@interface ARDAppDelegate : NSObject <UIApplicationDelegate>
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m
new file mode 100644
index 0000000..0f4165e
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m
@@ -0,0 +1,52 @@
+/*
+ *  Copyright 2013 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "ARDAppDelegate.h"
+
+#import "RTCLogging.h"
+#import "RTCPeerConnectionFactory.h"
+
+#import "ARDMainViewController.h"
+
+@implementation ARDAppDelegate {
+  UIWindow *_window;
+}
+
+#pragma mark - UIApplicationDelegate methods
+
+- (BOOL)application:(UIApplication *)application
+    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+  [RTCPeerConnectionFactory initializeSSL];
+  _window =  [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+  [_window makeKeyAndVisible];
+  ARDMainViewController *viewController = [[ARDMainViewController alloc] init];
+  _window.rootViewController = viewController;
+
+#ifndef _DEBUG
+  // In debug builds the default level is LS_INFO and in non-debug builds it is
+  // disabled. Continue to log to console in non-debug builds, but only
+  // warnings and errors.
+  RTCSetMinDebugLogLevel(kRTCLoggingSeverityWarning);
+#endif
+
+  return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+  ARDMainViewController *viewController =
+      (ARDMainViewController *)_window.rootViewController;
+  [viewController applicationWillResignActive:application];
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+  [RTCPeerConnectionFactory deinitializeSSL];
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDMainView.h b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainView.h
new file mode 100644
index 0000000..f091ad0
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainView.h
@@ -0,0 +1,27 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+@class ARDMainView;
+
+@protocol ARDMainViewDelegate <NSObject>
+
+- (void)mainView:(ARDMainView *)mainView didInputRoom:(NSString *)room;
+
+@end
+
+// The main view of AppRTCDemo. It contains an input field for entering a room
+// name on apprtc to connect to.
+@interface ARDMainView : UIView
+
+@property(nonatomic, weak) id<ARDMainViewDelegate> delegate;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDMainView.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainView.m
similarity index 77%
rename from talk/examples/objc/AppRTCDemo/ios/ARDMainView.m
rename to webrtc/examples/objc/AppRTCDemo/ios/ARDMainView.m
index 673bf7b..295b59c 100644
--- a/talk/examples/objc/AppRTCDemo/ios/ARDMainView.m
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainView.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDMainView.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDMainViewController.h b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainViewController.h
new file mode 100644
index 0000000..cc38170
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainViewController.h
@@ -0,0 +1,17 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+@interface ARDMainViewController : UIViewController
+
+- (void)applicationWillResignActive:(UIApplication *)application;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDMainViewController.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainViewController.m
similarity index 63%
rename from talk/examples/objc/AppRTCDemo/ios/ARDMainViewController.m
rename to webrtc/examples/objc/AppRTCDemo/ios/ARDMainViewController.m
index d6601fd..3721fe9 100644
--- a/talk/examples/objc/AppRTCDemo/ios/ARDMainViewController.m
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDMainViewController.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDMainViewController.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallView.h b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallView.h
new file mode 100644
index 0000000..3208925
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallView.h
@@ -0,0 +1,35 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+#import "RTCEAGLVideoView.h"
+
+@class ARDVideoCallView;
+@protocol ARDVideoCallViewDelegate <NSObject>
+
+// Called when the camera switch button is pressed.
+- (void)videoCallViewDidSwitchCamera:(ARDVideoCallView *)view;
+
+// Called when the hangup button is pressed.
+- (void)videoCallViewDidHangup:(ARDVideoCallView *)view;
+
+@end
+
+// Video call view that shows local and remote video, provides a label to
+// display status, and also a hangup button.
+@interface ARDVideoCallView : UIView
+
+@property(nonatomic, readonly) UILabel *statusLabel;
+@property(nonatomic, readonly) RTCEAGLVideoView *localVideoView;
+@property(nonatomic, readonly) RTCEAGLVideoView *remoteVideoView;
+@property(nonatomic, weak) id<ARDVideoCallViewDelegate> delegate;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m
similarity index 78%
rename from talk/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m
rename to webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m
index 47bfe89..45a69cf 100644
--- a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDVideoCallView.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h
new file mode 100644
index 0000000..9616da5
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h
@@ -0,0 +1,17 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+@interface ARDVideoCallViewController : UIViewController
+
+- (instancetype)initForRoom:(NSString *)room;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
similarity index 77%
rename from talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
rename to webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
index d919d75..36c0902 100644
--- a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2015 Google Inc.
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "ARDVideoCallViewController.h"
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch b/webrtc/examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch
new file mode 100644
index 0000000..6a5c375
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch
@@ -0,0 +1,23 @@
+/*
+ *  Copyright 2013 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+//
+// Prefix header for all source files of the 'AppRTCDemo' target in the
+// 'AppRTCDemo' project
+//
+
+#import <Availability.h>
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0
+#warning "This project uses features only available in iOS SDK 6.0 and later."
+#endif
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
diff --git a/talk/examples/objc/AppRTCDemo/ios/Info.plist b/webrtc/examples/objc/AppRTCDemo/ios/Info.plist
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/Info.plist
rename to webrtc/examples/objc/AppRTCDemo/ios/Info.plist
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h b/webrtc/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h
new file mode 100644
index 0000000..d56ba02
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h
@@ -0,0 +1,18 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+@interface UIImage (ARDUtilities)
+
+// Returns an color tinted version for the given image resource.
++ (UIImage *)imageForName:(NSString *)name color:(UIColor *)color;
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m b/webrtc/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m
new file mode 100644
index 0000000..1bbe8c3
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m
@@ -0,0 +1,31 @@
+/*
+ *  Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "UIImage+ARDUtilities.h"
+
+@implementation UIImage (ARDUtilities)
+
++ (UIImage *)imageForName:(NSString *)name color:(UIColor *)color {
+  UIImage *image = [UIImage imageNamed:name];
+  if (!image) {
+    return nil;
+  }
+  UIGraphicsBeginImageContextWithOptions(image.size, NO, 0.0f);
+  [color setFill];
+  CGRect bounds = CGRectMake(0, 0, image.size.width, image.size.height);
+  UIRectFill(bounds);
+  [image drawInRect:bounds blendMode:kCGBlendModeDestinationIn alpha:1.0f];
+  UIImage *coloredImage = UIGraphicsGetImageFromCurrentImageContext();
+  UIGraphicsEndImageContext();
+
+  return coloredImage;
+}
+
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/main.m b/webrtc/examples/objc/AppRTCDemo/ios/main.m
new file mode 100644
index 0000000..00b83f7
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ios/main.m
@@ -0,0 +1,20 @@
+/*
+ *  Copyright 2013 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+#import "ARDAppDelegate.h"
+
+int main(int argc, char* argv[]) {
+  @autoreleasepool {
+    return UIApplicationMain(
+        argc, argv, nil, NSStringFromClass([ARDAppDelegate class]));
+  }
+}
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf b/webrtc/examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png
Binary files differ
diff --git a/talk/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png b/webrtc/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png
rename to webrtc/examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png
Binary files differ
diff --git a/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h
new file mode 100644
index 0000000..95f3594
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h
@@ -0,0 +1,14 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface APPRTCAppDelegate : NSObject<NSApplicationDelegate>
+@end
diff --git a/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m
new file mode 100644
index 0000000..16ccfc3
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m
@@ -0,0 +1,60 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+#import "APPRTCAppDelegate.h"
+
+#import "APPRTCViewController.h"
+#import "RTCPeerConnectionFactory.h"
+
+@interface APPRTCAppDelegate () <NSWindowDelegate>
+@end
+
+@implementation APPRTCAppDelegate {
+  APPRTCViewController* _viewController;
+  NSWindow* _window;
+}
+
+#pragma mark - NSApplicationDelegate
+
+- (void)applicationDidFinishLaunching:(NSNotification*)notification {
+  [RTCPeerConnectionFactory initializeSSL];
+  NSScreen* screen = [NSScreen mainScreen];
+  NSRect visibleRect = [screen visibleFrame];
+  NSRect windowRect = NSMakeRect(NSMidX(visibleRect),
+                                 NSMidY(visibleRect),
+                                 1320,
+                                 1140);
+  NSUInteger styleMask = NSTitledWindowMask | NSClosableWindowMask;
+  _window = [[NSWindow alloc] initWithContentRect:windowRect
+                                        styleMask:styleMask
+                                          backing:NSBackingStoreBuffered
+                                            defer:NO];
+  _window.delegate = self;
+  [_window makeKeyAndOrderFront:self];
+  [_window makeMainWindow];
+  _viewController = [[APPRTCViewController alloc] initWithNibName:nil
+                                                           bundle:nil];
+  [_window setContentView:[_viewController view]];
+}
+
+#pragma mark - NSWindow
+
+- (void)windowWillClose:(NSNotification*)notification {
+  [_viewController windowWillClose:notification];
+  [RTCPeerConnectionFactory deinitializeSSL];
+  [NSApp terminate:self];
+}
+
+@end
+
diff --git a/webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.h b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.h
new file mode 100644
index 0000000..b4c94a8
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.h
@@ -0,0 +1,17 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface APPRTCViewController : NSViewController
+
+- (void)windowWillClose:(NSNotification*)notification;
+
+@end
diff --git a/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.m b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.m
similarity index 85%
rename from talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.m
rename to webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.m
index 6391d78..96ad7c9 100644
--- a/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.m
+++ b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.m
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import "APPRTCViewController.h"
diff --git a/talk/examples/objc/AppRTCDemo/mac/Info.plist b/webrtc/examples/objc/AppRTCDemo/mac/Info.plist
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/mac/Info.plist
rename to webrtc/examples/objc/AppRTCDemo/mac/Info.plist
diff --git a/webrtc/examples/objc/AppRTCDemo/mac/main.m b/webrtc/examples/objc/AppRTCDemo/mac/main.m
new file mode 100644
index 0000000..23153e6
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/mac/main.m
@@ -0,0 +1,22 @@
+/*
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#import "APPRTCAppDelegate.h"
+
+int main(int argc, char* argv[]) {
+  @autoreleasepool {
+    [NSApplication sharedApplication];
+    APPRTCAppDelegate* delegate = [[APPRTCAppDelegate alloc] init];
+    [NSApp setDelegate:delegate];
+    [NSApp run];
+  }
+}
diff --git a/talk/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm b/webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm
similarity index 88%
rename from talk/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm
rename to webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm
index 47df526..b131931 100644
--- a/talk/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm
+++ b/webrtc/examples/objc/AppRTCDemo/tests/ARDAppClientTest.mm
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2014 Google Inc.
+ *  Copyright 2014 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #import <Foundation/Foundation.h>
diff --git a/talk/examples/objc/AppRTCDemo/third_party/SocketRocket/LICENSE b/webrtc/examples/objc/AppRTCDemo/third_party/SocketRocket/LICENSE
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/third_party/SocketRocket/LICENSE
rename to webrtc/examples/objc/AppRTCDemo/third_party/SocketRocket/LICENSE
diff --git a/talk/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h b/webrtc/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h
rename to webrtc/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h
diff --git a/talk/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m b/webrtc/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m
similarity index 100%
rename from talk/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m
rename to webrtc/examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m
diff --git a/talk/examples/objc/Icon.png b/webrtc/examples/objc/Icon.png
similarity index 100%
rename from talk/examples/objc/Icon.png
rename to webrtc/examples/objc/Icon.png
Binary files differ
diff --git a/talk/examples/objc/README b/webrtc/examples/objc/README
similarity index 100%
rename from talk/examples/objc/README
rename to webrtc/examples/objc/README
diff --git a/talk/examples/peerconnection/client/conductor.cc b/webrtc/examples/peerconnection/client/conductor.cc
similarity index 90%
rename from talk/examples/peerconnection/client/conductor.cc
rename to webrtc/examples/peerconnection/client/conductor.cc
index 72629ce..e3def99 100644
--- a/talk/examples/peerconnection/client/conductor.cc
+++ b/webrtc/examples/peerconnection/client/conductor.cc
@@ -1,37 +1,20 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "talk/examples/peerconnection/client/conductor.h"
+#include "webrtc/examples/peerconnection/client/conductor.h"
 
 #include <utility>
 #include <vector>
 
 #include "talk/app/webrtc/videosourceinterface.h"
-#include "talk/examples/peerconnection/client/defaults.h"
+#include "webrtc/examples/peerconnection/client/defaults.h"
 #include "talk/media/devices/devicemanager.h"
 #include "talk/app/webrtc/test/fakeconstraints.h"
 #include "webrtc/base/common.h"
diff --git a/talk/examples/peerconnection/client/conductor.h b/webrtc/examples/peerconnection/client/conductor.h
similarity index 67%
rename from talk/examples/peerconnection/client/conductor.h
rename to webrtc/examples/peerconnection/client/conductor.h
index 43303a3..f5f16a3 100644
--- a/talk/examples/peerconnection/client/conductor.h
+++ b/webrtc/examples/peerconnection/client/conductor.h
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #ifndef TALK_EXAMPLES_PEERCONNECTION_CLIENT_CONDUCTOR_H_
@@ -36,8 +19,8 @@
 
 #include "talk/app/webrtc/mediastreaminterface.h"
 #include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/examples/peerconnection/client/main_wnd.h"
-#include "talk/examples/peerconnection/client/peer_connection_client.h"
+#include "webrtc/examples/peerconnection/client/main_wnd.h"
+#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
 #include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
diff --git a/webrtc/examples/peerconnection/client/defaults.cc b/webrtc/examples/peerconnection/client/defaults.cc
new file mode 100644
index 0000000..b686cd7
--- /dev/null
+++ b/webrtc/examples/peerconnection/client/defaults.cc
@@ -0,0 +1,58 @@
+/*
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/examples/peerconnection/client/defaults.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef WIN32
+#include <winsock2.h>
+#else
+#include <unistd.h>
+#endif
+
+#include "webrtc/base/common.h"
+
+const char kAudioLabel[] = "audio_label";
+const char kVideoLabel[] = "video_label";
+const char kStreamLabel[] = "stream_label";
+const uint16 kDefaultServerPort = 8888;
+
+std::string GetEnvVarOrDefault(const char* env_var_name,
+                               const char* default_value) {
+  std::string value;
+  const char* env_var = getenv(env_var_name);
+  if (env_var)
+    value = env_var;
+
+  if (value.empty())
+    value = default_value;
+
+  return value;
+}
+
+std::string GetPeerConnectionString() {
+  return GetEnvVarOrDefault("WEBRTC_CONNECT", "stun:stun.l.google.com:19302");
+}
+
+std::string GetDefaultServerName() {
+  return GetEnvVarOrDefault("WEBRTC_SERVER", "localhost");
+}
+
+std::string GetPeerName() {
+  char computer_name[256];
+  if (gethostname(computer_name, ARRAY_SIZE(computer_name)) != 0)
+    strcpy(computer_name, "host");
+  std::string ret(GetEnvVarOrDefault("USERNAME", "user"));
+  ret += '@';
+  ret += computer_name;
+  return ret;
+}
diff --git a/webrtc/examples/peerconnection/client/defaults.h b/webrtc/examples/peerconnection/client/defaults.h
new file mode 100644
index 0000000..ab8276b
--- /dev/null
+++ b/webrtc/examples/peerconnection/client/defaults.h
@@ -0,0 +1,30 @@
+/*
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef PEERCONNECTION_SAMPLES_CLIENT_DEFAULTS_H_
+#define PEERCONNECTION_SAMPLES_CLIENT_DEFAULTS_H_
+#pragma once
+
+#include <string>
+
+#include "webrtc/base/basictypes.h"
+
+extern const char kAudioLabel[];
+extern const char kVideoLabel[];
+extern const char kStreamLabel[];
+extern const uint16 kDefaultServerPort;
+
+std::string GetEnvVarOrDefault(const char* env_var_name,
+                               const char* default_value);
+std::string GetPeerConnectionString();
+std::string GetDefaultServerName();
+std::string GetPeerName();
+
+#endif  // PEERCONNECTION_SAMPLES_CLIENT_DEFAULTS_H_
diff --git a/webrtc/examples/peerconnection/client/flagdefs.h b/webrtc/examples/peerconnection/client/flagdefs.h
new file mode 100644
index 0000000..00e134d
--- /dev/null
+++ b/webrtc/examples/peerconnection/client/flagdefs.h
@@ -0,0 +1,33 @@
+/*
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef TALK_EXAMPLES_PEERCONNECTION_CLIENT_FLAGDEFS_H_
+#define TALK_EXAMPLES_PEERCONNECTION_CLIENT_FLAGDEFS_H_
+#pragma once
+
+#include "webrtc/base/flags.h"
+
+extern const uint16 kDefaultServerPort;  // From defaults.[h|cc]
+
+// Define flags for the peerconnect_client testing tool, in a separate
+// header file so that they can be shared across the different main.cc's
+// for each platform.
+
+DEFINE_bool(help, false, "Prints this message");
+DEFINE_bool(autoconnect, false, "Connect to the server without user "
+                                "intervention.");
+DEFINE_string(server, "localhost", "The server to connect to.");
+DEFINE_int(port, kDefaultServerPort,
+           "The port on which the server is listening.");
+DEFINE_bool(autocall, false, "Call the first available other client on "
+  "the server without user intervention.  Note: this flag should only be set "
+  "to true on one of the two clients.");
+
+#endif  // TALK_EXAMPLES_PEERCONNECTION_CLIENT_FLAGDEFS_H_
diff --git a/talk/examples/peerconnection/client/linux/main.cc b/webrtc/examples/peerconnection/client/linux/main.cc
similarity index 62%
rename from talk/examples/peerconnection/client/linux/main.cc
rename to webrtc/examples/peerconnection/client/linux/main.cc
index 3b39fcc..cf88c36 100644
--- a/talk/examples/peerconnection/client/linux/main.cc
+++ b/webrtc/examples/peerconnection/client/linux/main.cc
@@ -1,36 +1,19 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #include <gtk/gtk.h>
 
-#include "talk/examples/peerconnection/client/conductor.h"
-#include "talk/examples/peerconnection/client/flagdefs.h"
-#include "talk/examples/peerconnection/client/linux/main_wnd.h"
-#include "talk/examples/peerconnection/client/peer_connection_client.h"
+#include "webrtc/examples/peerconnection/client/conductor.h"
+#include "webrtc/examples/peerconnection/client/flagdefs.h"
+#include "webrtc/examples/peerconnection/client/linux/main_wnd.h"
+#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
 
 #include "webrtc/base/ssladapter.h"
 #include "webrtc/base/thread.h"
diff --git a/talk/examples/peerconnection/client/linux/main_wnd.cc b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
similarity index 90%
rename from talk/examples/peerconnection/client/linux/main_wnd.cc
rename to webrtc/examples/peerconnection/client/linux/main_wnd.cc
index 635d1e7..02b6e32 100644
--- a/talk/examples/peerconnection/client/linux/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
@@ -1,37 +1,20 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "talk/examples/peerconnection/client/linux/main_wnd.h"
+#include "webrtc/examples/peerconnection/client/linux/main_wnd.h"
 
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <stddef.h>
 
-#include "talk/examples/peerconnection/client/defaults.h"
+#include "webrtc/examples/peerconnection/client/defaults.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/stringutils.h"
diff --git a/talk/examples/peerconnection/client/linux/main_wnd.h b/webrtc/examples/peerconnection/client/linux/main_wnd.h
similarity index 68%
rename from talk/examples/peerconnection/client/linux/main_wnd.h
rename to webrtc/examples/peerconnection/client/linux/main_wnd.h
index bc13ec8..cfb2376 100644
--- a/talk/examples/peerconnection/client/linux/main_wnd.h
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.h
@@ -1,35 +1,18 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #ifndef PEERCONNECTION_SAMPLES_CLIENT_LINUX_MAIN_WND_H_
 #define PEERCONNECTION_SAMPLES_CLIENT_LINUX_MAIN_WND_H_
 
-#include "talk/examples/peerconnection/client/main_wnd.h"
-#include "talk/examples/peerconnection/client/peer_connection_client.h"
+#include "webrtc/examples/peerconnection/client/main_wnd.h"
+#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
 
 // Forward declarations.
 typedef struct _GtkWidget GtkWidget;
diff --git a/webrtc/examples/peerconnection/client/main.cc b/webrtc/examples/peerconnection/client/main.cc
new file mode 100644
index 0000000..9aae684
--- /dev/null
+++ b/webrtc/examples/peerconnection/client/main.cc
@@ -0,0 +1,76 @@
+/*
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/examples/peerconnection/client/conductor.h"
+#include "webrtc/examples/peerconnection/client/flagdefs.h"
+#include "webrtc/examples/peerconnection/client/main_wnd.h"
+#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
+#include "webrtc/base/ssladapter.h"
+#include "webrtc/base/win32socketinit.h"
+#include "webrtc/base/win32socketserver.h"
+
+
+int PASCAL wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
+                    wchar_t* cmd_line, int cmd_show) {
+  rtc::EnsureWinsockInit();
+  rtc::Win32Thread w32_thread;
+  rtc::ThreadManager::Instance()->SetCurrentThread(&w32_thread);
+
+  rtc::WindowsCommandLineArguments win_args;
+  int argc = win_args.argc();
+  char **argv = win_args.argv();
+
+  rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
+  if (FLAG_help) {
+    rtc::FlagList::Print(NULL, false);
+    return 0;
+  }
+
+  // Abort if the user specifies a port that is outside the allowed
+  // range [1, 65535].
+  if ((FLAG_port < 1) || (FLAG_port > 65535)) {
+    printf("Error: %i is not a valid port.\n", FLAG_port);
+    return -1;
+  }
+
+  MainWnd wnd(FLAG_server, FLAG_port, FLAG_autoconnect, FLAG_autocall);
+  if (!wnd.Create()) {
+    ASSERT(false);
+    return -1;
+  }
+
+  rtc::InitializeSSL();
+  PeerConnectionClient client;
+  rtc::scoped_refptr<Conductor> conductor(
+        new rtc::RefCountedObject<Conductor>(&client, &wnd));
+
+  // Main loop.
+  MSG msg;
+  BOOL gm;
+  while ((gm = ::GetMessage(&msg, NULL, 0, 0)) != 0 && gm != -1) {
+    if (!wnd.PreTranslateMessage(&msg)) {
+      ::TranslateMessage(&msg);
+      ::DispatchMessage(&msg);
+    }
+  }
+
+  if (conductor->connection_active() || client.is_connected()) {
+    while ((conductor->connection_active() || client.is_connected()) &&
+           (gm = ::GetMessage(&msg, NULL, 0, 0)) != 0 && gm != -1) {
+      if (!wnd.PreTranslateMessage(&msg)) {
+        ::TranslateMessage(&msg);
+        ::DispatchMessage(&msg);
+      }
+    }
+  }
+
+  rtc::CleanupSSL();
+  return 0;
+}
diff --git a/talk/examples/peerconnection/client/main_wnd.cc b/webrtc/examples/peerconnection/client/main_wnd.cc
similarity index 91%
rename from talk/examples/peerconnection/client/main_wnd.cc
rename to webrtc/examples/peerconnection/client/main_wnd.cc
index 122af67..fa356ff 100644
--- a/talk/examples/peerconnection/client/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/main_wnd.cc
@@ -1,35 +1,18 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "talk/examples/peerconnection/client/main_wnd.h"
+#include "webrtc/examples/peerconnection/client/main_wnd.h"
 
 #include <math.h>
 
-#include "talk/examples/peerconnection/client/defaults.h"
+#include "webrtc/examples/peerconnection/client/defaults.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/logging.h"
 
diff --git a/talk/examples/peerconnection/client/main_wnd.h b/webrtc/examples/peerconnection/client/main_wnd.h
similarity index 76%
rename from talk/examples/peerconnection/client/main_wnd.h
rename to webrtc/examples/peerconnection/client/main_wnd.h
index da9c6fa..c11e94d 100644
--- a/talk/examples/peerconnection/client/main_wnd.h
+++ b/webrtc/examples/peerconnection/client/main_wnd.h
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #ifndef PEERCONNECTION_SAMPLES_CLIENT_MAIN_WND_H_
@@ -33,7 +16,7 @@
 #include <string>
 
 #include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/examples/peerconnection/client/peer_connection_client.h"
+#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
 #include "talk/media/base/mediachannel.h"
 #include "talk/media/base/videocommon.h"
 #include "talk/media/base/videoframe.h"
diff --git a/talk/examples/peerconnection/client/peer_connection_client.cc b/webrtc/examples/peerconnection/client/peer_connection_client.cc
similarity index 90%
rename from talk/examples/peerconnection/client/peer_connection_client.cc
rename to webrtc/examples/peerconnection/client/peer_connection_client.cc
index 85e5b56..d49ce35 100644
--- a/talk/examples/peerconnection/client/peer_connection_client.cc
+++ b/webrtc/examples/peerconnection/client/peer_connection_client.cc
@@ -1,33 +1,16 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "talk/examples/peerconnection/client/peer_connection_client.h"
+#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
 
-#include "talk/examples/peerconnection/client/defaults.h"
+#include "webrtc/examples/peerconnection/client/defaults.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/nethelpers.h"
diff --git a/talk/examples/peerconnection/client/peer_connection_client.h b/webrtc/examples/peerconnection/client/peer_connection_client.h
similarity index 70%
rename from talk/examples/peerconnection/client/peer_connection_client.h
rename to webrtc/examples/peerconnection/client/peer_connection_client.h
index 9c7fc82..5b5787b 100644
--- a/talk/examples/peerconnection/client/peer_connection_client.h
+++ b/webrtc/examples/peerconnection/client/peer_connection_client.h
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2011 Google Inc.
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #ifndef PEERCONNECTION_SAMPLES_CLIENT_PEER_CONNECTION_CLIENT_H_
diff --git a/talk/examples/peerconnection/server/data_socket.cc b/webrtc/examples/peerconnection/server/data_socket.cc
similarity index 82%
rename from talk/examples/peerconnection/server/data_socket.cc
rename to webrtc/examples/peerconnection/server/data_socket.cc
index 0352741..60e40a6 100644
--- a/talk/examples/peerconnection/server/data_socket.cc
+++ b/webrtc/examples/peerconnection/server/data_socket.cc
@@ -1,31 +1,14 @@
 /*
- * libjingle
- * Copyright 2011 Google Inc.
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "talk/examples/peerconnection/server/data_socket.h"
+#include "webrtc/examples/peerconnection/server/data_socket.h"
 
 #include <ctype.h>
 #include <stdio.h>
@@ -35,7 +18,7 @@
 #include <unistd.h>
 #endif
 
-#include "talk/examples/peerconnection/server/utils.h"
+#include "webrtc/examples/peerconnection/server/utils.h"
 
 static const char kHeaderTerminator[] = "\r\n\r\n";
 static const int kHeaderTerminatorLength = sizeof(kHeaderTerminator) - 1;
diff --git a/talk/examples/peerconnection/server/data_socket.h b/webrtc/examples/peerconnection/server/data_socket.h
similarity index 73%
rename from talk/examples/peerconnection/server/data_socket.h
rename to webrtc/examples/peerconnection/server/data_socket.h
index b3ca2c6..454ad39 100644
--- a/talk/examples/peerconnection/server/data_socket.h
+++ b/webrtc/examples/peerconnection/server/data_socket.h
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2011 Google Inc.
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_DATA_SOCKET_H_
diff --git a/talk/examples/peerconnection/server/main.cc b/webrtc/examples/peerconnection/server/main.cc
similarity index 75%
rename from talk/examples/peerconnection/server/main.cc
rename to webrtc/examples/peerconnection/server/main.cc
index 0d0b98e..e69de9c 100644
--- a/talk/examples/peerconnection/server/main.cc
+++ b/webrtc/examples/peerconnection/server/main.cc
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2011 Google Inc.
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #include <stdio.h>
@@ -31,9 +14,9 @@
 
 #include <vector>
 
-#include "talk/examples/peerconnection/server/data_socket.h"
-#include "talk/examples/peerconnection/server/peer_channel.h"
-#include "talk/examples/peerconnection/server/utils.h"
+#include "webrtc/examples/peerconnection/server/data_socket.h"
+#include "webrtc/examples/peerconnection/server/peer_channel.h"
+#include "webrtc/examples/peerconnection/server/utils.h"
 #include "webrtc/base/flags.h"
 
 DEFINE_bool(help, false, "Prints this message");
diff --git a/talk/examples/peerconnection/server/peer_channel.cc b/webrtc/examples/peerconnection/server/peer_channel.cc
similarity index 85%
rename from talk/examples/peerconnection/server/peer_channel.cc
rename to webrtc/examples/peerconnection/server/peer_channel.cc
index d92e634..150e5de 100644
--- a/talk/examples/peerconnection/server/peer_channel.cc
+++ b/webrtc/examples/peerconnection/server/peer_channel.cc
@@ -1,31 +1,14 @@
 /*
- * libjingle
- * Copyright 2011 Google Inc.
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "talk/examples/peerconnection/server/peer_channel.h"
+#include "webrtc/examples/peerconnection/server/peer_channel.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -33,8 +16,8 @@
 
 #include <algorithm>
 
-#include "talk/examples/peerconnection/server/data_socket.h"
-#include "talk/examples/peerconnection/server/utils.h"
+#include "webrtc/examples/peerconnection/server/data_socket.h"
+#include "webrtc/examples/peerconnection/server/utils.h"
 #include "webrtc/base/stringutils.h"
 
 using rtc::sprintfn;
diff --git a/talk/examples/peerconnection/server/peer_channel.h b/webrtc/examples/peerconnection/server/peer_channel.h
similarity index 67%
rename from talk/examples/peerconnection/server/peer_channel.h
rename to webrtc/examples/peerconnection/server/peer_channel.h
index da7ddff..263f17d 100644
--- a/talk/examples/peerconnection/server/peer_channel.h
+++ b/webrtc/examples/peerconnection/server/peer_channel.h
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2011 Google Inc.
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_PEER_CHANNEL_H_
diff --git a/talk/examples/peerconnection/server/server_test.html b/webrtc/examples/peerconnection/server/server_test.html
similarity index 100%
rename from talk/examples/peerconnection/server/server_test.html
rename to webrtc/examples/peerconnection/server/server_test.html
diff --git a/webrtc/examples/peerconnection/server/utils.cc b/webrtc/examples/peerconnection/server/utils.cc
new file mode 100644
index 0000000..93a6d05
--- /dev/null
+++ b/webrtc/examples/peerconnection/server/utils.cc
@@ -0,0 +1,25 @@
+/*
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/examples/peerconnection/server/utils.h"
+
+#include <stdio.h>
+
+#include "webrtc/base/stringencode.h"
+
+using rtc::ToString;
+
+std::string int2str(int i) {
+  return ToString<int>(i);
+}
+
+std::string size_t2str(size_t i) {
+  return ToString<size_t>(i);
+}
diff --git a/webrtc/examples/peerconnection/server/utils.h b/webrtc/examples/peerconnection/server/utils.h
new file mode 100644
index 0000000..e70968b
--- /dev/null
+++ b/webrtc/examples/peerconnection/server/utils.h
@@ -0,0 +1,25 @@
+/*
+ *  Copyright 2011 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
+#define TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
+#pragma once
+
+#include <assert.h>
+#include <string>
+
+#ifndef ARRAYSIZE
+#define ARRAYSIZE(x) (sizeof(x) / sizeof(x[0]))
+#endif
+
+std::string int2str(int i);
+std::string size_t2str(size_t i);
+
+#endif  // TALK_EXAMPLES_PEERCONNECTION_SERVER_UTILS_H_
diff --git a/webrtc/examples/relayserver/relayserver_main.cc b/webrtc/examples/relayserver/relayserver_main.cc
new file mode 100644
index 0000000..31f43c4
--- /dev/null
+++ b/webrtc/examples/relayserver/relayserver_main.cc
@@ -0,0 +1,63 @@
+/*
+ *  Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <iostream>  // NOLINT
+
+#include "webrtc/p2p/base/relayserver.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/thread.h"
+
+int main(int argc, char **argv) {
+  if (argc != 3) {
+    std::cerr << "usage: relayserver internal-address external-address"
+              << std::endl;
+    return 1;
+  }
+
+  rtc::SocketAddress int_addr;
+  if (!int_addr.FromString(argv[1])) {
+    std::cerr << "Unable to parse IP address: " << argv[1];
+    return 1;
+  }
+
+  rtc::SocketAddress ext_addr;
+  if (!ext_addr.FromString(argv[2])) {
+    std::cerr << "Unable to parse IP address: " << argv[2];
+    return 1;
+  }
+
+  rtc::Thread *pthMain = rtc::Thread::Current();
+
+  rtc::scoped_ptr<rtc::AsyncUDPSocket> int_socket(
+      rtc::AsyncUDPSocket::Create(pthMain->socketserver(), int_addr));
+  if (!int_socket) {
+    std::cerr << "Failed to create a UDP socket bound at"
+              << int_addr.ToString() << std::endl;
+    return 1;
+  }
+
+  rtc::scoped_ptr<rtc::AsyncUDPSocket> ext_socket(
+      rtc::AsyncUDPSocket::Create(pthMain->socketserver(), ext_addr));
+  if (!ext_socket) {
+    std::cerr << "Failed to create a UDP socket bound at"
+              << ext_addr.ToString() << std::endl;
+    return 1;
+  }
+
+  cricket::RelayServer server(pthMain);
+  server.AddInternalSocket(int_socket.get());
+  server.AddExternalSocket(ext_socket.get());
+
+  std::cout << "Listening internally at " << int_addr.ToString() << std::endl;
+  std::cout << "Listening externally at " << ext_addr.ToString() << std::endl;
+
+  pthMain->Run();
+  return 0;
+}
diff --git a/webrtc/examples/stunserver/stunserver_main.cc b/webrtc/examples/stunserver/stunserver_main.cc
new file mode 100644
index 0000000..9cbd615
--- /dev/null
+++ b/webrtc/examples/stunserver/stunserver_main.cc
@@ -0,0 +1,51 @@
+/*
+ *  Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#if defined(WEBRTC_POSIX)
+#include <errno.h>
+#endif  // WEBRTC_POSIX
+
+#include <iostream>
+
+#include "webrtc/p2p/base/stunserver.h"
+#include "webrtc/base/thread.h"
+
+using namespace cricket;
+
+int main(int argc, char* argv[]) {
+  if (argc != 2) {
+    std::cerr << "usage: stunserver address" << std::endl;
+    return 1;
+  }
+
+  rtc::SocketAddress server_addr;
+  if (!server_addr.FromString(argv[1])) {
+    std::cerr << "Unable to parse IP address: " << argv[1];
+    return 1;
+  }
+
+  rtc::Thread *pthMain = rtc::Thread::Current();
+
+  rtc::AsyncUDPSocket* server_socket =
+      rtc::AsyncUDPSocket::Create(pthMain->socketserver(), server_addr);
+  if (!server_socket) {
+    std::cerr << "Failed to create a UDP socket" << std::endl;
+    return 1;
+  }
+
+  StunServer* server = new StunServer(server_socket);
+
+  std::cout << "Listening at " << server_addr.ToString() << std::endl;
+
+  pthMain->Run();
+
+  delete server;
+  return 0;
+}
diff --git a/talk/examples/turnserver/turnserver_main.cc b/webrtc/examples/turnserver/turnserver_main.cc
similarity index 61%
rename from talk/examples/turnserver/turnserver_main.cc
rename to webrtc/examples/turnserver/turnserver_main.cc
index e5e2336..e7b464f 100644
--- a/talk/examples/turnserver/turnserver_main.cc
+++ b/webrtc/examples/turnserver/turnserver_main.cc
@@ -1,28 +1,11 @@
 /*
- * libjingle
- * Copyright 2012 Google Inc.
+ *  Copyright 2012 The WebRTC Project Authors. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 #include <iostream>  // NOLINT
diff --git a/talk/libjingle_examples.gyp b/webrtc/libjingle_examples.gyp
similarity index 86%
rename from talk/libjingle_examples.gyp
rename to webrtc/libjingle_examples.gyp
index cbd11d8..135932d 100755
--- a/talk/libjingle_examples.gyp
+++ b/webrtc/libjingle_examples.gyp
@@ -1,40 +1,23 @@
 #
-# libjingle
-# Copyright 2012 Google Inc.
+# Copyright 2012 The WebRTC Project Authors. All rights reserved.
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-#  1. Redistributions of source code must retain the above copyright notice,
-#     this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright notice,
-#     this list of conditions and the following disclaimer in the documentation
-#     and/or other materials provided with the distribution.
-#  3. The name of the author may not be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS.  All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
 
 {
   'includes': [
-    'build/common.gypi',
+    '../talk/build/common.gypi',
   ],
   'targets': [
     {
       'target_name': 'relayserver',
       'type': 'executable',
       'dependencies': [
-        'libjingle.gyp:libjingle',
-        'libjingle.gyp:libjingle_p2p',
+        '../talk/libjingle.gyp:libjingle',
+        '../talk/libjingle.gyp:libjingle_p2p',
       ],
       'sources': [
         'examples/relayserver/relayserver_main.cc',
@@ -44,8 +27,8 @@
       'target_name': 'stunserver',
       'type': 'executable',
       'dependencies': [
-        'libjingle.gyp:libjingle',
-        'libjingle.gyp:libjingle_p2p',
+        '../talk/libjingle.gyp:libjingle',
+        '../talk/libjingle.gyp:libjingle_p2p',
       ],
       'sources': [
         'examples/stunserver/stunserver_main.cc',
@@ -55,8 +38,8 @@
       'target_name': 'turnserver',
       'type': 'executable',
       'dependencies': [
-        'libjingle.gyp:libjingle',
-        'libjingle.gyp:libjingle_p2p',
+        '../talk/libjingle.gyp:libjingle',
+        '../talk/libjingle.gyp:libjingle_p2p',
       ],
       'sources': [
         'examples/turnserver/turnserver_main.cc',
@@ -76,7 +59,7 @@
       ],
       'dependencies': [
         '<(webrtc_root)/common.gyp:webrtc_common',
-        'libjingle.gyp:libjingle',
+        '../talk/libjingle.gyp:libjingle',
       ],
       # TODO(ronghuawu): crbug.com/167187 fix size_t to int truncations.
       'msvs_disabled_warnings': [ 4309, ],
@@ -97,7 +80,7 @@
             'examples/peerconnection/client/peer_connection_client.h',
           ],
           'dependencies': [
-            'libjingle.gyp:libjingle_peerconnection',
+            '../talk/libjingle.gyp:libjingle_peerconnection',
             '<@(libjingle_tests_additional_deps)',
           ],
           'conditions': [
@@ -156,7 +139,7 @@
           'target_name': 'apprtc_common',
           'type': 'static_library',
           'dependencies': [
-            'libjingle.gyp:libjingle_peerconnection_objc',
+            '../talk/libjingle.gyp:libjingle_peerconnection_objc',
           ],
           'sources': [
             'examples/objc/AppRTCDemo/common/ARDUtilities.h',
@@ -183,7 +166,7 @@
           'type': 'static_library',
           'dependencies': [
             'apprtc_common',
-            'libjingle.gyp:libjingle_peerconnection_objc',
+            '../talk/libjingle.gyp:libjingle_peerconnection_objc',
             'socketrocket',
           ],
           'sources': [
@@ -227,7 +210,7 @@
             ],
           },
           'export_dependent_settings': [
-            'libjingle.gyp:libjingle_peerconnection_objc',
+            '../talk/libjingle.gyp:libjingle_peerconnection_objc',
           ],
           'conditions': [
             ['OS=="mac"', {
@@ -358,20 +341,20 @@
           'target_name': 'AppRTCDemo',
           'type': 'none',
           'dependencies': [
-            'libjingle.gyp:libjingle_peerconnection_java',
+            '../talk/libjingle.gyp:libjingle_peerconnection_java',
           ],
           'variables': {
             'apk_name': 'AppRTCDemo',
-            'java_in_dir': 'examples/android',
+            'java_in_dir': 'examples/androidapp',
             'has_java_resources': 1,
-            'resource_dir': 'examples/android/res',
+            'resource_dir': 'examples/androidapp/res',
             'R_package': 'org.appspot.apprtc',
             'R_package_relpath': 'org/appspot/apprtc',
             'input_jars_paths': [
-              'examples/android/third_party/autobanh/autobanh.jar',
+              'examples/androidapp/third_party/autobanh/autobanh.jar',
              ],
             'library_dexed_jars_paths': [
-              'examples/android/third_party/autobanh/autobanh.jar',
+              'examples/androidapp/third_party/autobanh/autobanh.jar',
              ],
             'native_lib_target': 'libjingle_peerconnection_so',
             'add_to_dependents_classpaths':1,