OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2013 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 package org.appspot.apprtc; | 11 package org.appspot.apprtc; |
12 | 12 |
13 import org.webrtc.IceCandidate; | 13 import org.webrtc.IceCandidate; |
14 import org.webrtc.PeerConnection; | 14 import org.webrtc.PeerConnection; |
15 import org.webrtc.SessionDescription; | 15 import org.webrtc.SessionDescription; |
16 | 16 |
17 import java.util.List; | 17 import java.util.List; |
18 | 18 |
19 /** | 19 /** |
20 * AppRTCClient is the interface representing an AppRTC client. | 20 * AppRTCClient is the interface representing an AppRTC client. |
21 */ | 21 */ |
22 public interface AppRTCClient { | 22 public interface AppRTCClient { |
23 /** | 23 /** |
24 * Struct holding the connection parameters of an AppRTC room. | 24 * Struct holding the connection parameters of an AppRTC room. |
25 */ | 25 */ |
26 class RoomConnectionParameters { | 26 class RoomConnectionParameters { |
27 public final String roomUrl; | 27 public final String roomUrl; |
28 public final String roomId; | 28 public final String roomId; |
29 public final boolean loopback; | 29 public final boolean loopback; |
30 public RoomConnectionParameters(String roomUrl, String roomId, boolean loopb
ack) { | 30 public final String colliderUrl; |
| 31 public RoomConnectionParameters( |
| 32 String roomUrl, String roomId, boolean loopback, String colliderUrl) { |
31 this.roomUrl = roomUrl; | 33 this.roomUrl = roomUrl; |
32 this.roomId = roomId; | 34 this.roomId = roomId; |
33 this.loopback = loopback; | 35 this.loopback = loopback; |
| 36 this.colliderUrl = colliderUrl; |
| 37 } |
| 38 public RoomConnectionParameters(String roomUrl, String roomId, boolean loopb
ack) { |
| 39 this(roomUrl, roomId, loopback, null); |
34 } | 40 } |
35 } | 41 } |
36 | 42 |
37 /** | 43 /** |
38 * Asynchronously connect to an AppRTC room URL using supplied connection | 44 * Asynchronously connect to an AppRTC room URL using supplied connection |
39 * parameters. Once connection is established onConnectedToRoom() | 45 * parameters. Once connection is established onConnectedToRoom() |
40 * callback with room parameters is invoked. | 46 * callback with room parameters is invoked. |
41 */ | 47 */ |
42 void connectToRoom(RoomConnectionParameters connectionParameters); | 48 void connectToRoom(RoomConnectionParameters connectionParameters); |
43 | 49 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 * Callback fired once channel is closed. | 128 * Callback fired once channel is closed. |
123 */ | 129 */ |
124 void onChannelClose(); | 130 void onChannelClose(); |
125 | 131 |
126 /** | 132 /** |
127 * Callback fired once channel error happened. | 133 * Callback fired once channel error happened. |
128 */ | 134 */ |
129 void onChannelError(final String description); | 135 void onChannelError(final String description); |
130 } | 136 } |
131 } | 137 } |
OLD | NEW |