Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #import <Foundation/Foundation.h> |
hjon | 79858f8 | 2016-03-13 22:08:26 -0700 | [diff] [blame] | 12 | #import "webrtc/api/objc/RTCIceCandidate.h" |
| 13 | #import "webrtc/api/objc/RTCSessionDescription.h" |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 14 | |
| 15 | typedef enum { |
| 16 | kARDSignalingMessageTypeCandidate, |
| 17 | kARDSignalingMessageTypeOffer, |
| 18 | kARDSignalingMessageTypeAnswer, |
| 19 | kARDSignalingMessageTypeBye, |
| 20 | } ARDSignalingMessageType; |
| 21 | |
| 22 | @interface ARDSignalingMessage : NSObject |
| 23 | |
| 24 | @property(nonatomic, readonly) ARDSignalingMessageType type; |
| 25 | |
| 26 | + (ARDSignalingMessage *)messageFromJSONString:(NSString *)jsonString; |
| 27 | - (NSData *)JSONData; |
| 28 | |
| 29 | @end |
| 30 | |
| 31 | @interface ARDICECandidateMessage : ARDSignalingMessage |
| 32 | |
hjon | 79858f8 | 2016-03-13 22:08:26 -0700 | [diff] [blame] | 33 | @property(nonatomic, readonly) RTCIceCandidate *candidate; |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 34 | |
hjon | 79858f8 | 2016-03-13 22:08:26 -0700 | [diff] [blame] | 35 | - (instancetype)initWithCandidate:(RTCIceCandidate *)candidate; |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 36 | |
| 37 | @end |
| 38 | |
| 39 | @interface ARDSessionDescriptionMessage : ARDSignalingMessage |
| 40 | |
| 41 | @property(nonatomic, readonly) RTCSessionDescription *sessionDescription; |
| 42 | |
| 43 | - (instancetype)initWithDescription:(RTCSessionDescription *)description; |
| 44 | |
| 45 | @end |
| 46 | |
| 47 | @interface ARDByeMessage : ARDSignalingMessage |
| 48 | @end |