OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #import "ARDMainViewController.h" | 11 #import "ARDMainViewController.h" |
12 | 12 |
13 #import "ARDAppClient.h" | 13 #import "ARDAppClient.h" |
14 #import "ARDMainView.h" | 14 #import "ARDMainView.h" |
15 #import "ARDVideoCallViewController.h" | 15 #import "ARDVideoCallViewController.h" |
16 | 16 |
17 @interface ARDMainViewController () <ARDMainViewDelegate> | 17 @interface ARDMainViewController () <ARDMainViewDelegate> |
18 @end | 18 @end |
19 | 19 |
20 @implementation ARDMainViewController | 20 @implementation ARDMainViewController |
21 | 21 |
22 - (void)loadView { | 22 - (void)loadView { |
23 ARDMainView *mainView = [[ARDMainView alloc] initWithFrame:CGRectZero]; | 23 ARDMainView *mainView = [[ARDMainView alloc] initWithFrame:CGRectZero]; |
24 mainView.delegate = self; | 24 mainView.delegate = self; |
25 self.view = mainView; | 25 self.view = mainView; |
26 } | 26 } |
27 | 27 |
28 - (void)applicationWillResignActive:(UIApplication *)application { | 28 - (void)applicationWillResignActive:(UIApplication *)application { |
29 // Terminate any calls when we aren't active. | 29 // Terminate any calls when we aren't active. |
30 [self dismissViewControllerAnimated:NO completion:nil]; | 30 // [self showAlertWithMessage:@"We are inactive!"]; |
henrika_webrtc
2015/10/13 14:32:56
Only for testing. Will not be checked in.
| |
31 // [self dismissViewControllerAnimated:NO completion:nil]; | |
31 } | 32 } |
32 | 33 |
33 #pragma mark - ARDMainViewDelegate | 34 #pragma mark - ARDMainViewDelegate |
34 | 35 |
35 - (void)mainView:(ARDMainView *)mainView | 36 - (void)mainView:(ARDMainView *)mainView |
36 didInputRoom:(NSString *)room | 37 didInputRoom:(NSString *)room |
37 isLoopback:(BOOL)isLoopback | 38 isLoopback:(BOOL)isLoopback |
38 isAudioOnly:(BOOL)isAudioOnly { | 39 isAudioOnly:(BOOL)isAudioOnly { |
39 if (!room.length) { | 40 if (!room.length) { |
40 [self showAlertWithMessage:@"Missing room name."]; | 41 [self showAlertWithMessage:@"Missing room name."]; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 - (void)showAlertWithMessage:(NSString*)message { | 83 - (void)showAlertWithMessage:(NSString*)message { |
83 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil | 84 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil |
84 message:message | 85 message:message |
85 delegate:nil | 86 delegate:nil |
86 cancelButtonTitle:@"OK" | 87 cancelButtonTitle:@"OK" |
87 otherButtonTitles:nil]; | 88 otherButtonTitles:nil]; |
88 [alertView show]; | 89 [alertView show]; |
89 } | 90 } |
90 | 91 |
91 @end | 92 @end |
OLD | NEW |