iOS SDK API Reference

SKWRoom.h
Go to the documentation of this file.
1 // SKWRoom.h
3 // SkyWay SDK
5 #import <Foundation/Foundation.h>
6 
11 @class SKWMediaStream;
12 
16 typedef NS_ENUM(NSUInteger, SKWRoomEventEnum)
17 {
21  SKW_ROOM_EVENT_STREAM, // arg = added stream
31  SKW_ROOM_EVENT_REMOVE_STREAM __attribute__((deprecated("Use PEER_LEAVE event instead."))), // arg = removed stream
35  SKW_ROOM_EVENT_OPEN, // arg = room name
39  SKW_ROOM_EVENT_CLOSE, // arg = room name
55  SKW_ROOM_EVENT_DATA, // arg = msg
59  SKW_ROOM_EVENT_LOG, // arg = logs
60 };
61 
65 typedef void (^SKWRoomEventCallback)(NSObject* __nullable arg);
66 
70 @interface SKWRoom : NSObject
71 
75 @property (nonatomic, readonly) NSString* __nullable name;
76 
77 #ifndef DOXYGEN_SKIP_THIS
78 - (__nullable instancetype)init __attribute__((unavailable("init is not a supported initializer for this class.")));
79 #endif // !DOXYGEN_SKIP_THIS
80 
98 - (BOOL)send:(NSObject* __nonnull)data;
99 
159 - (void)on:(SKWRoomEventEnum)event callback:(SKWRoomEventCallback __nullable)callback;
160 
169 - (void)offAll;
170 
195 - (void)getLog;
196 
197 @end
SKW_ROOM_EVENT_PEER_LEAVE
@ SKW_ROOM_EVENT_PEER_LEAVE
A peer has left.
Definition: SKWRoom.h:47
-[SKWRoom offAll]
void offAll()
Cancels the set event callback block of SKWRoom.
-[SKWRoom getLog]
void getLog()
Start getting room's logs from signaling server.
SKWMediaStream
Media stream.
Definition: SKWMediaStream.h:18
SKWRoom
Room base class.
Definition: SKWRoom.h:70
SKW_ROOM_EVENT_DATA
@ SKW_ROOM_EVENT_DATA
Data received from peer.
Definition: SKWRoom.h:55
SKWRoomEventEnum
SKWRoomEventEnum
Room events.
Definition: SKWRoom.h:16
SKW_ROOM_EVENT_STREAM
@ SKW_ROOM_EVENT_STREAM
MediaStream received from peer in the room.
Definition: SKWRoom.h:21
SKWRoom::name
NSString *__nullable name
Room name.
Definition: SKWRoom.h:75
SKW_ROOM_EVENT_ERROR
@ SKW_ROOM_EVENT_ERROR
Error occured.
Definition: SKWRoom.h:51
SKW_ROOM_EVENT_OPEN
@ SKW_ROOM_EVENT_OPEN
Room is ready.
Definition: SKWRoom.h:35
SKW_ROOM_EVENT_REMOVE_STREAM
@ SKW_ROOM_EVENT_REMOVE_STREAM
MediaStream removed from peer in the room.
Definition: SKWRoom.h:31
SKW_ROOM_EVENT_CLOSE
@ SKW_ROOM_EVENT_CLOSE
Fired when the Peer left the room, or the connection with the SFU server was disconnected.
Definition: SKWRoom.h:39
SKWRoomEventCallback
void(^ SKWRoomEventCallback)(NSObject *__nullable arg)
Room Event Callback signature.
Definition: SKWRoom.h:65
SKW_ROOM_EVENT_PEER_JOIN
@ SKW_ROOM_EVENT_PEER_JOIN
New peer has joined.
Definition: SKWRoom.h:43
SKW_ROOM_EVENT_LOG
@ SKW_ROOM_EVENT_LOG
Room's log received.
Definition: SKWRoom.h:59