diff --git a/all.gyp b/all.gyp index 9ccfe251cc..40dbc135a6 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 5a36c80b35..0000000000 --- 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/objc/AppRTCDemo/ARDAppEngineClient.h b/talk/examples/objc/AppRTCDemo/ARDAppEngineClient.h deleted file mode 100644 index 1bcd126b86..0000000000 --- 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 -@end diff --git a/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.h b/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.h deleted file mode 100644 index f54cbb7c20..0000000000 --- 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 - -- (instancetype)initWithURL:(NSURL *)url; - -@end diff --git a/talk/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h b/talk/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h deleted file mode 100644 index 5f824141ac..0000000000 --- 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 8b12eb8f34..0000000000 --- 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 - -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 f34cd8ba60..0000000000 --- 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 b1e6938f4c..0000000000 --- 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 - -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 545880da53..0000000000 --- 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 68d92ab80a..0000000000 --- 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 - -@class ARDJoinResponse; -@class ARDMessageResponse; -@class ARDSignalingMessage; - -@protocol ARDRoomServerClient - -- (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 2f14e6dec0..0000000000 --- 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 - -@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 152abc859a..0000000000 --- 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 - -#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 - -- (void)channel:(id)channel - didChangeState:(ARDSignalingChannelState)state; - -- (void)channel:(id)channel - didReceiveMessage:(ARDSignalingMessage *)message; - -@end - -@protocol ARDSignalingChannel - -@property(nonatomic, readonly) NSString *roomId; -@property(nonatomic, readonly) NSString *clientId; -@property(nonatomic, readonly) ARDSignalingChannelState state; -@property(nonatomic, weak) id 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 c1d1600a5b..0000000000 --- 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 - -#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 5f14ffe23e..0000000000 --- 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 - -@protocol ARDTURNClient - -// 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 0885b72798..0000000000 --- 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 - -#import "ARDSignalingChannel.h" - -// Wraps a WebSocket connection to the AppRTC WebSocket server. -@interface ARDWebSocketChannel : NSObject - -- (instancetype)initWithURL:(NSURL *)url - restURL:(NSURL *)restURL - delegate:(id)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 00c94cdcf3..0000000000 --- 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 f7bb211158..0000000000 --- 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 9c4f83f519..0000000000 --- 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/RTCMediaConstraints+JSON.h b/talk/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h deleted file mode 100644 index e3c2c96541..0000000000 --- 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 d176435bdc..0000000000 --- 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 e540b466df..0000000000 --- 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 b212442818..0000000000 --- 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 b0594e826a..0000000000 --- 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 - -@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 edd8ab6ec2..0000000000 --- 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 - -// 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 -@end diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m b/talk/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m deleted file mode 100644 index 09e4374260..0000000000 --- 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 9d9f5ebcf0..0000000000 --- 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 - -@class ARDMainView; - -@protocol ARDMainViewDelegate - -- (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 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 ae15a9d207..0000000000 --- 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 - -@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 7c1decb1df..0000000000 --- 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 - -#import "RTCEAGLVideoView.h" - -@class ARDVideoCallView; -@protocol ARDVideoCallViewDelegate - -// 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 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 fbee3aa20b..0000000000 --- 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 - -@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 885f04a0ba..0000000000 --- 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 - -#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 -#import 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 5eccc7dde4..0000000000 --- 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 - -@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 f84c921ede..0000000000 --- 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 91d5630e4a..0000000000 --- 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 - -#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 d7f49e4013..0000000000 --- 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 - -@interface APPRTCAppDelegate : NSObject -@end diff --git a/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.h b/talk/examples/objc/AppRTCDemo/mac/APPRTCViewController.h deleted file mode 100644 index 204cb5e924..0000000000 --- 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 - -@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 7b6bd9d380..0000000000 --- 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 - -#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 490de2e8a8..0000000000 --- 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 -#include - -#ifdef WIN32 -#include -#else -#include -#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 845faa33a6..0000000000 --- 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 - -#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 0a1e330fff..0000000000 --- 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/server/utils.cc b/talk/examples/peerconnection/server/utils.cc deleted file mode 100644 index a9938c83f3..0000000000 --- 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 - -#include "webrtc/base/stringencode.h" - -using rtc::ToString; - -std::string int2str(int i) { - return ToString(i); -} - -std::string size_t2str(size_t i) { - return ToString(i); -} diff --git a/talk/examples/peerconnection/server/utils.h b/talk/examples/peerconnection/server/utils.h deleted file mode 100644 index dba5e85c6d..0000000000 --- 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 -#include - -#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/stunserver/stunserver_main.cc b/talk/examples/stunserver/stunserver_main.cc deleted file mode 100644 index 25cca16e28..0000000000 --- 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 -#endif // WEBRTC_POSIX - -#include - -#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 d08a23682c..159eefcbd5 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 9660cc59a3..961c512654 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 69% rename from talk/examples/android/src/org/appspot/apprtc/AppRTCClient.java rename to webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCClient.java index 30451bf867..195446ab5f 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 3d1a22ff7d..08d9691b0d 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 735f28e6cd..d46f9a3d59 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 d0b670da73..3d445d4f90 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 69aeda5cbd..7c007901c1 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 87% rename from talk/examples/android/src/org/appspot/apprtc/CpuMonitor.java rename to webrtc/examples/androidapp/src/org/appspot/apprtc/CpuMonitor.java index 89d21d4e25..1d54e5e165 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 c1f8fa2b85..cc7015b8a6 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 96% rename from talk/examples/android/src/org/appspot/apprtc/PeerConnectionClient.java rename to webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java index e3cdc99e23..51ef32ea53 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 b14d2d4f21..a751f92e6a 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 7746ef50d4..ce7d989bd6 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 0000000000..3fc5b5147e --- /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 5c34e57713..a9a136bf9e 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 7ba257586d..14b723178b 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 90% rename from talk/examples/android/src/org/appspot/apprtc/WebSocketRTCClient.java rename to webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java index 060477f135..ca319abde2 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/talk/examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java similarity index 55% rename from talk/examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java rename to webrtc/examples/androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java index cc6540b7cc..db5ef3d45e 100644 --- a/talk/examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/AppRTCUtils.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.util; 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 9cb0196bb2..a56d4ea947 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/talk/examples/android/src/org/appspot/apprtc/util/LooperExecutor.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java similarity index 59% rename from talk/examples/android/src/org/appspot/apprtc/util/LooperExecutor.java rename to webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java index a57030351f..1563e26ddb 100644 --- a/talk/examples/android/src/org/appspot/apprtc/util/LooperExecutor.java +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.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/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 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/talk/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java similarity index 55% rename from talk/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java rename to webrtc/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java index 04a0629cf8..29ccaefd05 100644 --- a/talk/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java +++ b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.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.test; 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 0312b6ef9a..00a8187f9a 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/talk/examples/objc/AppRTCDemo/ARDAppClient+Internal.h b/webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h similarity index 53% rename from talk/examples/objc/AppRTCDemo/ARDAppClient+Internal.h rename to webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h index 4d49239e6b..c4a3871b89 100644 --- a/talk/examples/objc/AppRTCDemo/ARDAppClient+Internal.h +++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h @@ -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.h" diff --git a/talk/examples/objc/AppRTCDemo/ARDAppClient.h b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.h similarity index 56% rename from talk/examples/objc/AppRTCDemo/ARDAppClient.h rename to webrtc/examples/objc/AppRTCDemo/ARDAppClient.h index b88b5702ef..04993e49b2 100644 --- a/talk/examples/objc/AppRTCDemo/ARDAppClient.h +++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.h @@ -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 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 e043da23b5..bcc746050a 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 0000000000..7514f3645c --- /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 +@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 de3f9f7046..4318e6bfc1 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 0000000000..9b136aa39c --- /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 + +- (instancetype)initWithURL:(NSURL *)url; + +@end diff --git a/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.m b/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.m similarity index 57% rename from talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.m rename to webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.m index f4196e4964..70f815a6a8 100644 --- a/talk/examples/objc/AppRTCDemo/ARDCEODTURNClient.m +++ b/webrtc/examples/objc/AppRTCDemo/ARDCEODTURNClient.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 "ARDCEODTURNClient.h" diff --git a/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h b/webrtc/examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h new file mode 100644 index 0000000000..b3202999d0 --- /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 0000000000..2911202af1 --- /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 + +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 5c15955c4a..b6c2be9d22 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 0000000000..66ee76172f --- /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 0000000000..65468cdf78 --- /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 + +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 0000000000..0f5383f6d6 --- /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 0000000000..a9ff825639 --- /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 + +@class ARDJoinResponse; +@class ARDMessageResponse; +@class ARDSignalingMessage; + +@protocol ARDRoomServerClient + +- (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 0000000000..18795afce2 --- /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 + +@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 67% rename from talk/examples/objc/AppRTCDemo/ARDSDPUtils.m rename to webrtc/examples/objc/AppRTCDemo/ARDSDPUtils.m index 25e8d4eaa6..498a001511 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 0000000000..70ba2ff4c9 --- /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 + +#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 + +- (void)channel:(id)channel + didChangeState:(ARDSignalingChannelState)state; + +- (void)channel:(id)channel + didReceiveMessage:(ARDSignalingMessage *)message; + +@end + +@protocol ARDSignalingChannel + +@property(nonatomic, readonly) NSString *roomId; +@property(nonatomic, readonly) NSString *clientId; +@property(nonatomic, readonly) ARDSignalingChannelState state; +@property(nonatomic, weak) id 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 0000000000..c33997fb46 --- /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 + +#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 4d49a2eada..6a8d37fbed 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 0000000000..8f2a817342 --- /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 + +@protocol ARDTURNClient + +// 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 0000000000..2bd6264aef --- /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 + +#import "ARDSignalingChannel.h" + +// Wraps a WebSocket connection to the AppRTC WebSocket server. +@interface ARDWebSocketChannel : NSObject + +- (instancetype)initWithURL:(NSURL *)url + restURL:(NSURL *)restURL + delegate:(id)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 a089ff8707..395a22bbd1 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 0000000000..8ef2748c67 --- /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 0000000000..cf70b73c07 --- /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 0000000000..10339e7a3d --- /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/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m similarity index 51% rename from talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.m rename to webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m index b9b95e330f..3ba85563d4 100644 --- a/talk/examples/objc/AppRTCDemo/RTCICEServer+JSON.m +++ b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.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 "RTCICEServer+JSON.h" diff --git a/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h b/webrtc/examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h new file mode 100644 index 0000000000..dd4813ae4b --- /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 0000000000..b03773e7db --- /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 0000000000..ee323a7d94 --- /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 0000000000..b5655e0e82 --- /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 0000000000..6f94ef7054 --- /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 + +@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 39010dafb0..257b6a6a5c 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 0000000000..c73e8f2e6d --- /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 + +// 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 +@end diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDAppDelegate.m new file mode 100644 index 0000000000..0f4165ebac --- /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 0000000000..f091ad05b2 --- /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 + +@class ARDMainView; + +@protocol ARDMainViewDelegate + +- (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 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 673bf7b7d9..295b59c554 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 0000000000..cc38170184 --- /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 + +@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 d6601fda1e..3721fe9519 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 0000000000..320892590b --- /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 + +#import "RTCEAGLVideoView.h" + +@class ARDVideoCallView; +@protocol ARDVideoCallViewDelegate + +// 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 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 47bfe8956f..45a69cf344 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 0000000000..9616da52af --- /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 + +@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 d919d75b11..36c0902981 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 0000000000..6a5c3757de --- /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 + +#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 +#import 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 0000000000..d56ba02c2e --- /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 + +@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 0000000000..1bbe8c342f --- /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 0000000000..00b83f7fd2 --- /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 + +#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 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 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 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 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 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 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 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 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 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 diff --git a/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h new file mode 100644 index 0000000000..95f3594268 --- /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 + +@interface APPRTCAppDelegate : NSObject +@end diff --git a/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m similarity index 52% rename from talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m rename to webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m index 514b241f27..16ccfc355d 100644 --- a/talk/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m +++ b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.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. */ #if !defined(__has_feature) || !__has_feature(objc_arc) diff --git a/webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.h b/webrtc/examples/objc/AppRTCDemo/mac/APPRTCViewController.h new file mode 100644 index 0000000000..b4c94a8eea --- /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 + +@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 6391d78014..96ad7c90c1 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 0000000000..23153e6dc7 --- /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 + +#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 47df526227..b131931a0f 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 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 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 91% rename from talk/examples/peerconnection/client/conductor.cc rename to webrtc/examples/peerconnection/client/conductor.cc index 72629cebfc..e3def9955f 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 #include #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 43303a34f0..f5f16a3d10 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 0000000000..b686cd7fa6 --- /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 +#include + +#ifdef WIN32 +#include +#else +#include +#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 0000000000..ab8276b7b9 --- /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 + +#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 0000000000..00e134d94a --- /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 3b39fccb92..cf88c36fbb 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 -#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 635d1e7868..02b6e32a17 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 #include #include -#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 bc13ec89f9..cfb237645f 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/talk/examples/peerconnection/client/main.cc b/webrtc/examples/peerconnection/client/main.cc similarity index 50% rename from talk/examples/peerconnection/client/main.cc rename to webrtc/examples/peerconnection/client/main.cc index 5be6257653..9aae684513 100644 --- a/talk/examples/peerconnection/client/main.cc +++ b/webrtc/examples/peerconnection/client/main.cc @@ -1,34 +1,17 @@ /* - * 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 "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/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" diff --git a/talk/examples/peerconnection/client/main_wnd.cc b/webrtc/examples/peerconnection/client/main_wnd.cc similarity index 92% rename from talk/examples/peerconnection/client/main_wnd.cc rename to webrtc/examples/peerconnection/client/main_wnd.cc index 122af679c6..fa356ff119 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 -#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 da9c6fa6ec..c11e94d30d 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 #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 85e5b56425..d49ce35060 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 9c7fc82412..5b5787bc14 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 03527418f3..60e40a68e6 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 #include @@ -35,7 +18,7 @@ #include #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 b3ca2c691a..454ad3978a 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 0d0b98e2bc..e69de9c64a 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 @@ -31,9 +14,9 @@ #include -#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 86% rename from talk/examples/peerconnection/server/peer_channel.cc rename to webrtc/examples/peerconnection/server/peer_channel.cc index d92e6343e4..150e5dec97 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 #include @@ -33,8 +16,8 @@ #include -#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 da7ddff658..263f17dfa8 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 0000000000..93a6d05342 --- /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 + +#include "webrtc/base/stringencode.h" + +using rtc::ToString; + +std::string int2str(int i) { + return ToString(i); +} + +std::string size_t2str(size_t i) { + return ToString(i); +} diff --git a/webrtc/examples/peerconnection/server/utils.h b/webrtc/examples/peerconnection/server/utils.h new file mode 100644 index 0000000000..e70968b875 --- /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 +#include + +#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/webrtc/examples/relayserver/relayserver_main.cc similarity index 51% rename from talk/examples/relayserver/relayserver_main.cc rename to webrtc/examples/relayserver/relayserver_main.cc index 817e73d3bc..31f43c4d15 100644 --- a/talk/examples/relayserver/relayserver_main.cc +++ b/webrtc/examples/relayserver/relayserver_main.cc @@ -1,28 +1,11 @@ /* - * libjingle - * Copyright 2004--2005 Google Inc. + * Copyright 2004 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 // NOLINT diff --git a/webrtc/examples/stunserver/stunserver_main.cc b/webrtc/examples/stunserver/stunserver_main.cc new file mode 100644 index 0000000000..9cbd6156da --- /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 +#endif // WEBRTC_POSIX + +#include + +#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 e5e2336405..e7b464f19c 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 // 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 cbd11d88ae..135932db62 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,