Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@victortive
Copy link
Contributor

There are many uses of the class C that holds constants that can be represented by enums instead.

For example the RTCSessionState can be converted to this:

class C {
  // RTCSession states.
  static const int STATUS_NULL = 0;
  static const int STATUS_INVITE_SENT = 1;
  static const int STATUS_1XX_RECEIVED = 2;
  static const int STATUS_INVITE_RECEIVED = 3;
  static const int STATUS_WAITING_FOR_ANSWER = 4;
  static const int STATUS_ANSWERED = 5;
  static const int STATUS_WAITING_FOR_ACK = 6;
  static const int STATUS_CANCELED = 7;
  static const int STATUS_TERMINATED = 8;
  static const int STATUS_CONFIRMED = 9;
}

to this

enum RtcSessionState {
  none, // STATUS_NULL
  inviteSent, // STATUS_INVITE_SENT
  provisionalResponse, // STATUS_1XX_RECEIVED
  inviteReceived, // STATUS_INVITE_RECEIVED
  waitingForAnswer, // STATUS_WAITING_FOR_ANSWER
  answered, // STATUS_ANSWERED
  waitingForAck, // STATUS_WAITING_FOR_ACK
  canceled, // STATUS_CANCELED
  terminated, // STATUS_TERMINATED
  confirmed, // STATUS_CONFIRMED
}

@mikaelwills
Copy link
Collaborator

@victortive love this, rebase and fix up the conflicts and we'll be good to go.

@victortive
Copy link
Contributor Author

@mikaelwills What conflicts are you referring to?

@mikaelwills
Copy link
Collaborator

mikaelwills commented Dec 27, 2024

@victortive Just below our comments "this branch cannot be rebased due to conflict"

have you:
git fetch upstream
git checkout main
git rebase upstream/main
git checkout your-branch
git rebase main?

@victortive
Copy link
Contributor Author

@mikaelwills Okay i updated my upstream and it seems to be fixed now on my local environment. Gihub wasn't showing any issues. Good catch.

@mikaelwills mikaelwills merged commit fe8848a into flutter-webrtc:main Dec 27, 2024
@mikaelwills
Copy link
Collaborator

@victortive merged in and it passed all the build checks, looking good!
Im sure you've done some already but will give it an integration test with two clients to make sure all is well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants