• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>
12 
13 #import <WebRTC/RTCIceCandidate.h>
14 #import <WebRTC/RTCSessionDescription.h>
15 
16 typedef enum {
17   kARDSignalingMessageTypeCandidate,
18   kARDSignalingMessageTypeCandidateRemoval,
19   kARDSignalingMessageTypeOffer,
20   kARDSignalingMessageTypeAnswer,
21   kARDSignalingMessageTypeBye,
22 } ARDSignalingMessageType;
23 
24 @interface ARDSignalingMessage : NSObject
25 
26 @property(nonatomic, readonly) ARDSignalingMessageType type;
27 
28 + (ARDSignalingMessage *)messageFromJSONString:(NSString *)jsonString;
29 - (NSData *)JSONData;
30 
31 @end
32 
33 @interface ARDICECandidateMessage : ARDSignalingMessage
34 
35 @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCIceCandidate) * candidate;
36 
37 - (instancetype)initWithCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate;
38 
39 @end
40 
41 @interface ARDICECandidateRemovalMessage : ARDSignalingMessage
42 
43 @property(nonatomic, readonly) NSArray<RTC_OBJC_TYPE(RTCIceCandidate) *> *candidates;
44 
45 - (instancetype)initWithRemovedCandidates:(NSArray<RTC_OBJC_TYPE(RTCIceCandidate) *> *)candidates;
46 
47 @end
48 
49 @interface ARDSessionDescriptionMessage : ARDSignalingMessage
50 
51 @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCSessionDescription) * sessionDescription;
52 
53 - (instancetype)initWithDescription:(RTC_OBJC_TYPE(RTCSessionDescription) *)description;
54 
55 @end
56 
57 @interface ARDByeMessage : ARDSignalingMessage
58 @end
59