-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace string enum usage with dart enums (#479)
* replace usage of direction as a string with an CallDirection enum * convert more string enums to actual enums --------- Co-authored-by: Victor Uvarov <[email protected]>
- Loading branch information
1 parent
3d34f90
commit e9fdea4
Showing
27 changed files
with
314 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/// Defines the direction of a communication, | ||
/// indicating whether it is outgoing or incoming. | ||
/// | ||
/// Used to specify the flow of calls or messages. | ||
enum Direction { | ||
/// Represents an outgoing call or message. | ||
outgoing, | ||
|
||
/// Represents an incoming call or message. | ||
incoming | ||
} | ||
|
||
/// Identifies the originator of a communication, | ||
/// specifying whether the initiator is local or remote. | ||
/// | ||
/// This is useful for determining who started the call or message. | ||
enum Originator { | ||
/// Represents the user of this device initiated the communication. | ||
local, | ||
|
||
/// Represents the communication was initiated by someone else. | ||
remote, | ||
|
||
/// Represents that the communication was initiated by the system (e.g., automated processes). | ||
system, | ||
} | ||
|
||
/// Represents the type of SDP (Session Description Protocol) message | ||
/// used in a communication session. | ||
/// | ||
/// SDP messages are exchanged between peers during the setup of a media connection. | ||
enum SdpType { | ||
/// Represents an SDP offer, which is the initial proposal sent to set up a media session. | ||
offer, | ||
|
||
/// Represents an SDP answer, which is the response to an SDP offer, | ||
/// confirming or adjusting the session parameters. | ||
answer | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import '../enums.dart'; | ||
import '../message.dart'; | ||
import 'events.dart'; | ||
|
||
class EventNewMessage extends EventType { | ||
EventNewMessage({this.message, this.originator, this.request}); | ||
dynamic request; | ||
String? originator; | ||
Originator? originator; | ||
Message? message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import '../enums.dart'; | ||
import '../options.dart'; | ||
import 'events.dart'; | ||
|
||
class EventNewOptions extends EventType { | ||
EventNewOptions({this.message, this.originator, this.request}); | ||
dynamic request; | ||
String? originator; | ||
Originator? originator; | ||
Options? message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.