diff --git a/akka-bbb-apps/run.sh b/akka-bbb-apps/run.sh
new file mode 100755
index 0000000000..4015c4f137
--- /dev/null
+++ b/akka-bbb-apps/run.sh
@@ -0,0 +1,3 @@
+sbt clean
+sbt run
+
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala
index 7ea35dbe6e..a48e2c74f0 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala
@@ -13,11 +13,10 @@ import org.bigbluebutton.core.api._
import org.bigbluebutton.SystemConfiguration
import java.util.concurrent.TimeUnit
-import org.bigbluebutton.common2.messages.MessageBody.MeetingCreatedEvtBody
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.RegisterUserReqMsg
import org.bigbluebutton.core.running.RunningMeeting
import org.bigbluebutton.core2.RunningMeetings
-import org.bigbluebutton.core2.message.handlers.CreateMeetingReqMsgHdlr
object BigBlueButtonActor extends SystemConfiguration {
def props(system: ActorSystem,
@@ -78,12 +77,12 @@ class BigBlueButtonActor(val system: ActorSystem,
msg.core match {
case m: CreateMeetingReqMsg => handleCreateMeetingReqMsg(m)
case m: RegisterUserReqMsg => handleRegisterUserReqMsg(m)
- case _ => println("***** Cannot handle " + msg.envelope.name)
+ case _ => log.warning("Cannot handle " + msg.envelope.name)
}
}
def handleRegisterUserReqMsg(msg: RegisterUserReqMsg): Unit = {
- log.debug("****** RECEIVED RegisterUserReqMsg msg {}", msg)
+ log.debug("RECEIVED RegisterUserReqMsg msg {}", msg)
for {
m <- RunningMeetings.findWithId(meetings, msg.header.meetingId)
} yield {
@@ -327,4 +326,3 @@ class BigBlueButtonActor(val system: ActorSystem,
}
}
-
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala
index 039b52915a..8269bf639c 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonInGW.scala
@@ -13,7 +13,9 @@ import org.bigbluebutton.common.messages.PubSubPingMessage
import org.bigbluebutton.messages._
import akka.event.Logging
import org.bigbluebutton.SystemConfiguration
+import org.bigbluebutton.common2.domain.PageVO
import org.bigbluebutton.core.models.Roles
+
import scala.collection.JavaConverters
class BigBlueButtonInGW(
@@ -334,8 +336,8 @@ class BigBlueButtonInGW(
eventBus.publish(BigBlueButtonEvent(meetingId, new PresentationSlideGenerated(meetingId, messageKey, code, presentationId, numberOfPages, pagesCompleted, presName)))
}
- def generatePresentationPages(presId: String, numPages: Int, presBaseUrl: String): scala.collection.immutable.HashMap[String, Page] = {
- var pages = new scala.collection.immutable.HashMap[String, Page]
+ def generatePresentationPages(presId: String, numPages: Int, presBaseUrl: String): scala.collection.immutable.Map[String, PageVO] = {
+ var pages = new scala.collection.mutable.HashMap[String, PageVO]
for (i <- 1 to numPages) {
val id = presId + "/" + i
val num = i;
@@ -346,19 +348,19 @@ class BigBlueButtonInGW(
val txtUri = presBaseUrl + "/textfiles/" + i
val svgUri = presBaseUrl + "/svg/" + i
- val p = new Page(id = id, num = num, thumbUri = thumbnail, swfUri = swfUri,
+ val p = new PageVO(id = id, num = num, thumbUri = thumbnail, swfUri = swfUri,
txtUri = txtUri, svgUri = svgUri,
current = current)
- pages += (p.id -> p)
+ pages += p.id -> p
}
- pages
+ pages.toMap
}
def sendConversionCompleted(messageKey: String, meetingId: String, code: String, presentationId: String, numPages: Int, presName: String, presBaseUrl: String, downloadable: Boolean) {
val pages = generatePresentationPages(presentationId, numPages, presBaseUrl)
- val presentation = new Presentation(id = presentationId, name = presName, pages = pages, downloadable = downloadable)
+ val presentation = new Presentation(id = presentationId, name = presName, current = true, pages = pages, downloadable = downloadable)
eventBus.publish(BigBlueButtonEvent(meetingId, new PresentationConversionCompleted(meetingId, messageKey, code, presentation)))
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MessageSenderActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MessageSenderActor.scala
index fd410e512e..32a4865602 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MessageSenderActor.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/MessageSenderActor.scala
@@ -306,23 +306,6 @@ class MessageSenderActor(val service: MessageSender)
service.send(MessagingConstants.FROM_MEETING_CHANNEL, json)
}
- private def pageToMap(page: Page): java.util.Map[String, Any] = {
- val res = new scala.collection.mutable.HashMap[String, Any]
- res += "id" -> page.id
- res += "num" -> page.num
- res += "thumb_uri" -> page.thumbUri
- res += "swf_uri" -> page.swfUri
- res += "txt_uri" -> page.txtUri
- res += "svg_uri" -> page.svgUri
- res += "current" -> page.current
- res += "x_offset" -> page.xOffset
- res += "y_offset" -> page.yOffset
- res += "width_ratio" -> page.widthRatio
- res += "height_ratio" -> page.heightRatio
-
- JavaConverters.mapAsJavaMap(res)
- }
-
private def handleClearPresentationOutMsg(msg: ClearPresentationOutMsg) {
val json = PesentationMessageToJsonConverter.clearPresentationOutMsgToJson(msg)
service.send(MessagingConstants.FROM_PRESENTATION_CHANNEL, json)
@@ -334,36 +317,7 @@ class MessageSenderActor(val service: MessageSender)
}
private def handleGetPresentationInfoOutMsg(msg: GetPresentationInfoOutMsg) {
- // Create a map for our current presenter
- val presenter = new java.util.HashMap[String, Object]()
- presenter.put(Constants.USER_ID, msg.info.presenter.userId)
- presenter.put(Constants.NAME, msg.info.presenter.name)
- presenter.put(Constants.ASSIGNED_BY, msg.info.presenter.assignedBy)
- // Create an array for our presentations
- val presentations = new java.util.ArrayList[java.util.Map[String, Object]]
- msg.info.presentations.foreach { pres =>
- val presentation = new java.util.HashMap[String, Object]()
- presentation.put(Constants.ID, pres.id)
- presentation.put(Constants.NAME, pres.name)
- presentation.put(Constants.CURRENT, pres.current: java.lang.Boolean)
-
- // Get the pages for a presentation
- val pages = new java.util.ArrayList[java.util.Map[String, Any]]()
- pres.pages.values foreach { p =>
- pages.add(pageToMap(p))
- }
- // store the pages in the presentation
- presentation.put(Constants.PAGES, pages)
-
- // add this presentation into our presentations list
- presentations.add(presentation);
- }
-
- val reply = new GetPresentationInfoReplyMessage(msg.meetingID, msg.requesterID, presenter, presentations)
-
- val json = PesentationMessageToJsonConverter.getPresentationInfoOutMsgToJson(msg)
- service.send(MessagingConstants.FROM_PRESENTATION_CHANNEL, json)
}
private def handleResizeAndMoveSlideOutMsg(msg: ResizeAndMoveSlideOutMsg) {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/InMessages.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/InMessages.scala
index 011dcef009..1a85ff8eec 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/InMessages.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/InMessages.scala
@@ -124,7 +124,6 @@ case class RespondToGuest(meetingID: String, userId: String, response: Boolean,
//////////////////////////////////////////////////////////////////////////////////////
case class GetCurrentLayoutRequest(meetingID: String, requesterID: String) extends InMessage
-case class SetLayoutRequest(meetingID: String, requesterID: String, layoutID: String) extends InMessage
case class LockLayoutRequest(meetingID: String, setById: String, lock: Boolean, viewersOnly: Boolean,
layout: Option[String]) extends InMessage
case class BroadcastLayoutRequest(meetingID: String, requesterID: String, layout: String) extends InMessage
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/OutMessages.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/OutMessages.scala
index 148eb0eaac..fa66900970 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/OutMessages.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/api/OutMessages.scala
@@ -1,161 +1,161 @@
-package org.bigbluebutton.core.api
-
-import org.bigbluebutton.common2.messages.breakoutrooms._
-import org.bigbluebutton.core.apps._
-import org.bigbluebutton.core.models._
-
-case class VoiceRecordingStarted(meetingID: String, recorded: Boolean, recordingFile: String, timestamp: String, confNum: String) extends IOutMessage
-case class VoiceRecordingStopped(meetingID: String, recorded: Boolean, recordingFile: String, timestamp: String, confNum: String) extends IOutMessage
-case class RecordingStatusChanged(meetingID: String, recorded: Boolean, userId: String, recording: Boolean) extends IOutMessage
-case class GetRecordingStatusReply(meetingID: String, recorded: Boolean, userId: String, recording: Boolean) extends IOutMessage
-case class MeetingCreated(meetingID: String, externalMeetingID: String, parentMeetingID: String, recorded: Boolean, name: String,
- voiceBridge: String, duration: Int, moderatorPass: String, viewerPass: String, createTime: Long, createDate: String, isBreakout: Boolean) extends IOutMessage
-case class MeetingMuted(meetingID: String, recorded: Boolean, meetingMuted: Boolean) extends IOutMessage
-case class MeetingEnding(meetingID: String) extends IOutMessage
-case class MeetingEnded(meetingID: String, recorded: Boolean, voiceBridge: String) extends IOutMessage
-case class MeetingState(meetingID: String, recorded: Boolean, userId: String, permissions: Permissions, meetingMuted: Boolean) extends IOutMessage
-case class MeetingHasEnded(meetingID: String, userId: String) extends IOutMessage
-case class MeetingDestroyed(meetingID: String) extends IOutMessage
-case class DisconnectAllUsers(meetingID: String) extends IOutMessage
-case class InactivityWarning(meetingID: String, duration: Long) extends IOutMessage
-case class MeetingIsActive(meetingID: String) extends IOutMessage
-case class DisconnectUser(meetingID: String, userId: String) extends IOutMessage
-case class KeepAliveMessageReply(aliveID: String) extends IOutMessage
-case class PubSubPong(system: String, timestamp: Long) extends IOutMessage
-case object IsAliveMessage extends IOutMessage
-
-// Breakout Rooms
-case class BreakoutRoomsListOutMessage(meetingId: String, rooms: Vector[BreakoutRoomInfo], roomsReady: Boolean) extends IOutMessage
-case class CreateBreakoutRoom(meetingId: String, room: BreakoutRoomOutPayload) extends IOutMessage
-case class EndBreakoutRoom(breakoutMeetingId: String) extends IOutMessage
-case class BreakoutRoomOutPayload(breakoutMeetingId: String, name: String, parentId: String, sequence: Integer,
- voiceConfId: String, durationInMinutes: Int, moderatorPassword: String, viewerPassword: String,
- sourcePresentationId: String, sourcePresentationSlide: Int, record: Boolean)
-case class BreakoutRoomJoinURLOutMessage(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, userId: String, redirectJoinURL: String, noRedirectJoinURL: String) extends IOutMessage
-case class BreakoutRoomStartedOutMessage(parentMeetingId: String, recorded: Boolean, breakout: BreakoutRoomInfo) extends IOutMessage
-case class UpdateBreakoutUsersOutMessage(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, users: Vector[BreakoutUserVO]) extends IOutMessage
-case class MeetingTimeRemainingUpdate(meetingId: String, recorded: Boolean, timeRemaining: Int) extends IOutMessage
-case class BreakoutRoomsTimeRemainingUpdateOutMessage(meetingId: String, recorded: Boolean, timeRemaining: Int) extends IOutMessage
-case class BreakoutRoomEndedOutMessage(parentMeetingId: String, meetingId: String) extends IOutMessage
-
-// Permissions
-case class PermissionsSettingInitialized(meetingID: String, permissions: Permissions, applyTo: Array[UserVO]) extends IOutMessage
-case class NewPermissionsSetting(meetingID: String, setByUser: String, permissions: Permissions, applyTo: Array[UserVO]) extends IOutMessage
-case class UserLocked(meetingID: String, userId: String, lock: Boolean) extends IOutMessage
-case class GetPermissionsSettingReply(meetingID: String, userId: String) extends IOutMessage
-
-// Users
-case class UserRegistered(meetingID: String, recorded: Boolean, user: RegisteredUser) extends IOutMessage
-case class UserLeft(meetingID: String, recorded: Boolean, user: UserVO) extends IOutMessage
-case class UserEjectedFromMeeting(meetingID: String, recorded: Boolean, userId: String, ejectedBy: String) extends IOutMessage
-case class PresenterAssigned(meetingID: String, recorded: Boolean, presenter: Presenter) extends IOutMessage
-case class EjectAllVoiceUsers(meetingID: String, recorded: Boolean, voiceBridge: String) extends IOutMessage
-case class EndAndKickAll(meetingID: String, recorded: Boolean) extends IOutMessage
-case class GetUsersReply(meetingID: String, requesterID: String, users: Array[UserVO]) extends IOutMessage
-case class ValidateAuthTokenTimedOut(meetingID: String, requesterId: String, token: String, valid: Boolean, correlationId: String) extends IOutMessage
-case class ValidateAuthTokenReply(meetingID: String, requesterId: String, token: String, valid: Boolean, correlationId: String) extends IOutMessage
-case class UserJoined(meetingID: String, recorded: Boolean, user: UserVO) extends IOutMessage
-case class UserChangedEmojiStatus(meetingID: String, recorded: Boolean, emojiStatus: String, userID: String) extends IOutMessage
-case class UserListeningOnly(meetingID: String, recorded: Boolean, userID: String, listenOnly: Boolean) extends IOutMessage
-case class UserSharedWebcam(meetingID: String, recorded: Boolean, userID: String, stream: String) extends IOutMessage
-case class UserUnsharedWebcam(meetingID: String, recorded: Boolean, userID: String, stream: String) extends IOutMessage
-case class UserStatusChange(meetingID: String, recorded: Boolean, userID: String, status: String, value: Object) extends IOutMessage
-case class UserRoleChange(meetingID: String, recorded: Boolean, userID: String, role: String) extends IOutMessage
-case class GetUsersInVoiceConference(meetingID: String, recorded: Boolean, voiceConfId: String) extends IOutMessage
-case class MuteVoiceUser(meetingID: String, recorded: Boolean, requesterID: String,
- userId: String, voiceConfId: String, voiceUserId: String, mute: Boolean) extends IOutMessage
-case class UserVoiceMuted(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
-case class UserVoiceTalking(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
-case class EjectVoiceUser(meetingID: String, recorded: Boolean, requesterID: String, userId: String, voiceConfId: String, voiceUserId: String) extends IOutMessage
-case class TransferUserToMeeting(voiceConfId: String, targetVoiceConfId: String, userId: String) extends IOutMessage
-case class UserJoinedVoice(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
-case class UserLeftVoice(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
-case class AllowUserToShareDesktopOut(meetingID: String, userID: String, allowed: Boolean) extends IOutMessage
-
-// Voice
-case class IsMeetingMutedReply(meetingID: String, recorded: Boolean, requesterID: String, meetingMuted: Boolean) extends IOutMessage
-case class StartRecording(meetingID: String, recorded: Boolean, requesterID: String) extends IOutMessage
-case class StartRecordingVoiceConf(meetingID: String, recorded: Boolean, voiceConfId: String) extends IOutMessage
-case class StopRecordingVoiceConf(meetingID: String, recorded: Boolean, voiceConfId: String, recordedStream: String) extends IOutMessage
-case class StopRecording(meetingID: String, recorded: Boolean, requesterID: String) extends IOutMessage
-
-// Chat
-case class GetChatHistoryReply(meetingID: String, recorded: Boolean, requesterID: String,
- replyTo: String, history: Array[Map[String, String]]) extends IOutMessage
-case class SendPublicMessageEvent(meetingID: String, recorded: Boolean, requesterID: String,
- message: Map[String, String]) extends IOutMessage
-case class SendPrivateMessageEvent(meetingID: String, recorded: Boolean, requesterID: String,
- message: Map[String, String]) extends IOutMessage
-case class ClearPublicChatHistoryReply(meetingID: String, recorded: Boolean, requesterID: String) extends IOutMessage
-
-// Layout
-case class GetCurrentLayoutReply(meetingID: String, recorded: Boolean, requesterID: String, layoutID: String,
- locked: Boolean, setByUserID: String) extends IOutMessage
-case class BroadcastLayoutEvent(meetingID: String, recorded: Boolean, requesterID: String,
- layoutID: String, locked: Boolean, setByUserID: String, applyTo: Array[UserVO]) extends IOutMessage
-case class LockLayoutEvent(meetingID: String, recorded: Boolean, setById: String, locked: Boolean,
- applyTo: Array[UserVO]) extends IOutMessage
-
-// Presentation
-case class ClearPresentationOutMsg(meetingID: String, recorded: Boolean) extends IOutMessage
-case class RemovePresentationOutMsg(meetingID: String, recorded: Boolean, presentationID: String) extends IOutMessage
-case class GetPresentationInfoOutMsg(meetingID: String, recorded: Boolean, requesterID: String,
- info: CurrentPresentationInfo, replyTo: String) extends IOutMessage
-case class ResizeAndMoveSlideOutMsg(meetingID: String, recorded: Boolean, page: Page) extends IOutMessage
-case class GotoSlideOutMsg(meetingID: String, recorded: Boolean, page: Page) extends IOutMessage
-case class SharePresentationOutMsg(meetingID: String, recorded: Boolean, presentation: Presentation) extends IOutMessage
-case class GetSlideInfoOutMsg(meetingID: String, recorded: Boolean, requesterID: String, page: Page, replyTo: String) extends IOutMessage
-case class GetPreuploadedPresentationsOutMsg(meetingID: String, recorded: Boolean) extends IOutMessage
-case class PresentationConversionProgress(meetingID: String, messageKey: String, code: String,
- presentationId: String, presentationName: String) extends IOutMessage
-case class PresentationConversionError(meetingID: String, messageKey: String, code: String,
- presentationId: String, numberOfPages: Int, maxNumberPages: Int, presentationName: String) extends IOutMessage
-case class PresentationPageGenerated(meetingID: String, messageKey: String, code: String, presentationId: String,
- numberOfPages: Int, pagesCompleted: Int, presentationName: String) extends IOutMessage
-case class PresentationConversionDone(meetingID: String, recorded: Boolean, messageKey: String, code: String,
- presentation: Presentation) extends IOutMessage
-case class PresentationChanged(meetingID: String, presentation: Presentation) extends IOutMessage
-case class GetPresentationStatusReply(meetingID: String, presentations: Seq[Presentation], current: Presentation, replyTo: String) extends IOutMessage
-case class PresentationRemoved(meetingID: String, presentationId: String) extends IOutMessage
-case class PageChanged(meetingID: String, page: Page) extends IOutMessage
-
-// Polling
-//case class PollCreatedMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String, poll: PollVO) extends IOutMessage
-//case class CreatePollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String, pollType: String) extends IOutMessage
-case class PollStartedMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String, poll: SimplePollOutVO) extends IOutMessage
-case class StartPollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
-case class PollStoppedMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String) extends IOutMessage
-case class StopPollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String) extends IOutMessage
-case class PollShowResultMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String, poll: SimplePollResultOutVO) extends IOutMessage
-case class ShowPollResultReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
-case class PollHideResultMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String) extends IOutMessage
-case class HidePollResultReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
-case class UserRespondedToPollMessage(meetingID: String, recorded: Boolean, presenterId: String, pollId: String, poll: SimplePollResultOutVO) extends IOutMessage
-case class RespondToPollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
-case class GetCurrentPollReplyMessage(meetingID: String, recorded: Boolean, requesterId: String, hasPoll: Boolean, poll: Option[PollVO]) extends IOutMessage
-
-// No idea what part this is for
-case class GetAllMeetingsReply(meetings: Array[MeetingInfo]) extends IOutMessage
-
-// DeskShare
-case class DeskShareStartRTMPBroadcast(conferenceName: String, streamPath: String) extends IOutMessage
-case class DeskShareStopRTMPBroadcast(conferenceName: String, streamPath: String) extends IOutMessage
-case class DeskShareNotifyViewersRTMP(meetingID: String, streamPath: String, videoWidth: Int, videoHeight: Int, broadcasting: Boolean) extends IOutMessage
-case class DeskShareNotifyASingleViewer(meetingID: String, userID: String, streamPath: String, videoWidth: Int, videoHeight: Int, broadcasting: Boolean) extends IOutMessage
-case class DeskShareHangUp(meetingID: String, fsConferenceName: String) extends IOutMessage
-
-// Guest
-case class GetGuestPolicyReply(meetingID: String, recorded: Boolean, requesterID: String, policy: String) extends IOutMessage
-case class GuestPolicyChanged(meetingID: String, recorded: Boolean, policy: String) extends IOutMessage
-case class GuestAccessDenied(meetingID: String, recorded: Boolean, userId: String) extends IOutMessage
-
-// Shared Notes
-case class PatchDocumentReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String, patch: String, patchID: Int, undo: Boolean, redo: Boolean) extends IOutMessage
-case class GetCurrentDocumentReply(meetingID: String, recorded: Boolean, requesterID: String, notes: Map[String, NoteReport]) extends IOutMessage
-case class CreateAdditionalNotesReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String, noteName: String) extends IOutMessage
-case class DestroyAdditionalNotesReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String) extends IOutMessage
-case class SharedNotesSyncNoteReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String, note: NoteReport) extends IOutMessage
-
-// Value Objects
-case class MeetingVO(id: String, recorded: Boolean)
-
+package org.bigbluebutton.core.api
+
+import org.bigbluebutton.common2.messages.breakoutrooms._
+import org.bigbluebutton.core.apps._
+import org.bigbluebutton.core.models._
+import org.bigbluebutton.common2.domain.UserVO
+
+case class VoiceRecordingStarted(meetingID: String, recorded: Boolean, recordingFile: String, timestamp: String, confNum: String) extends IOutMessage
+case class VoiceRecordingStopped(meetingID: String, recorded: Boolean, recordingFile: String, timestamp: String, confNum: String) extends IOutMessage
+case class RecordingStatusChanged(meetingID: String, recorded: Boolean, userId: String, recording: Boolean) extends IOutMessage
+case class GetRecordingStatusReply(meetingID: String, recorded: Boolean, userId: String, recording: Boolean) extends IOutMessage
+case class MeetingCreated(meetingID: String, externalMeetingID: String, parentMeetingID: String, recorded: Boolean, name: String,
+ voiceBridge: String, duration: Int, moderatorPass: String, viewerPass: String, createTime: Long, createDate: String, isBreakout: Boolean) extends IOutMessage
+case class MeetingMuted(meetingID: String, recorded: Boolean, meetingMuted: Boolean) extends IOutMessage
+case class MeetingEnding(meetingID: String) extends IOutMessage
+case class MeetingEnded(meetingID: String, recorded: Boolean, voiceBridge: String) extends IOutMessage
+case class MeetingState(meetingID: String, recorded: Boolean, userId: String, permissions: Permissions, meetingMuted: Boolean) extends IOutMessage
+case class MeetingHasEnded(meetingID: String, userId: String) extends IOutMessage
+case class MeetingDestroyed(meetingID: String) extends IOutMessage
+case class DisconnectAllUsers(meetingID: String) extends IOutMessage
+case class InactivityWarning(meetingID: String, duration: Long) extends IOutMessage
+case class MeetingIsActive(meetingID: String) extends IOutMessage
+case class DisconnectUser(meetingID: String, userId: String) extends IOutMessage
+case class KeepAliveMessageReply(aliveID: String) extends IOutMessage
+case class PubSubPong(system: String, timestamp: Long) extends IOutMessage
+case object IsAliveMessage extends IOutMessage
+
+// Breakout Rooms
+case class BreakoutRoomsListOutMessage(meetingId: String, rooms: Vector[BreakoutRoomInfo], roomsReady: Boolean) extends IOutMessage
+case class CreateBreakoutRoom(meetingId: String, room: BreakoutRoomOutPayload) extends IOutMessage
+case class EndBreakoutRoom(breakoutMeetingId: String) extends IOutMessage
+case class BreakoutRoomOutPayload(breakoutMeetingId: String, name: String, parentId: String, sequence: Integer,
+ voiceConfId: String, durationInMinutes: Int, moderatorPassword: String, viewerPassword: String,
+ sourcePresentationId: String, sourcePresentationSlide: Int, record: Boolean)
+case class BreakoutRoomJoinURLOutMessage(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, userId: String, redirectJoinURL: String, noRedirectJoinURL: String) extends IOutMessage
+case class BreakoutRoomStartedOutMessage(parentMeetingId: String, recorded: Boolean, breakout: BreakoutRoomInfo) extends IOutMessage
+case class UpdateBreakoutUsersOutMessage(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, users: Vector[BreakoutUserVO]) extends IOutMessage
+case class MeetingTimeRemainingUpdate(meetingId: String, recorded: Boolean, timeRemaining: Int) extends IOutMessage
+case class BreakoutRoomsTimeRemainingUpdateOutMessage(meetingId: String, recorded: Boolean, timeRemaining: Int) extends IOutMessage
+case class BreakoutRoomEndedOutMessage(parentMeetingId: String, meetingId: String) extends IOutMessage
+
+// Permissions
+case class PermissionsSettingInitialized(meetingID: String, permissions: Permissions, applyTo: Array[UserVO]) extends IOutMessage
+case class NewPermissionsSetting(meetingID: String, setByUser: String, permissions: Permissions, applyTo: Array[UserVO]) extends IOutMessage
+case class UserLocked(meetingID: String, userId: String, lock: Boolean) extends IOutMessage
+case class GetPermissionsSettingReply(meetingID: String, userId: String) extends IOutMessage
+
+// Users
+case class UserRegistered(meetingID: String, recorded: Boolean, user: RegisteredUser) extends IOutMessage
+case class UserLeft(meetingID: String, recorded: Boolean, user: UserVO) extends IOutMessage
+case class UserEjectedFromMeeting(meetingID: String, recorded: Boolean, userId: String, ejectedBy: String) extends IOutMessage
+case class PresenterAssigned(meetingID: String, recorded: Boolean, presenter: Presenter) extends IOutMessage
+case class EjectAllVoiceUsers(meetingID: String, recorded: Boolean, voiceBridge: String) extends IOutMessage
+case class EndAndKickAll(meetingID: String, recorded: Boolean) extends IOutMessage
+case class GetUsersReply(meetingID: String, requesterID: String, users: Array[UserVO]) extends IOutMessage
+case class ValidateAuthTokenTimedOut(meetingID: String, requesterId: String, token: String, valid: Boolean, correlationId: String) extends IOutMessage
+case class ValidateAuthTokenReply(meetingID: String, requesterId: String, token: String, valid: Boolean, correlationId: String) extends IOutMessage
+case class UserJoined(meetingID: String, recorded: Boolean, user: UserVO) extends IOutMessage
+case class UserChangedEmojiStatus(meetingID: String, recorded: Boolean, emojiStatus: String, userID: String) extends IOutMessage
+case class UserListeningOnly(meetingID: String, recorded: Boolean, userID: String, listenOnly: Boolean) extends IOutMessage
+case class UserSharedWebcam(meetingID: String, recorded: Boolean, userID: String, stream: String) extends IOutMessage
+case class UserUnsharedWebcam(meetingID: String, recorded: Boolean, userID: String, stream: String) extends IOutMessage
+case class UserStatusChange(meetingID: String, recorded: Boolean, userID: String, status: String, value: Object) extends IOutMessage
+case class UserRoleChange(meetingID: String, recorded: Boolean, userID: String, role: String) extends IOutMessage
+case class GetUsersInVoiceConference(meetingID: String, recorded: Boolean, voiceConfId: String) extends IOutMessage
+case class MuteVoiceUser(meetingID: String, recorded: Boolean, requesterID: String,
+ userId: String, voiceConfId: String, voiceUserId: String, mute: Boolean) extends IOutMessage
+case class UserVoiceMuted(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
+case class UserVoiceTalking(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
+case class EjectVoiceUser(meetingID: String, recorded: Boolean, requesterID: String, userId: String, voiceConfId: String, voiceUserId: String) extends IOutMessage
+case class TransferUserToMeeting(voiceConfId: String, targetVoiceConfId: String, userId: String) extends IOutMessage
+case class UserJoinedVoice(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
+case class UserLeftVoice(meetingID: String, recorded: Boolean, confNum: String, user: UserVO) extends IOutMessage
+case class AllowUserToShareDesktopOut(meetingID: String, userID: String, allowed: Boolean) extends IOutMessage
+
+// Voice
+case class IsMeetingMutedReply(meetingID: String, recorded: Boolean, requesterID: String, meetingMuted: Boolean) extends IOutMessage
+case class StartRecording(meetingID: String, recorded: Boolean, requesterID: String) extends IOutMessage
+case class StartRecordingVoiceConf(meetingID: String, recorded: Boolean, voiceConfId: String) extends IOutMessage
+case class StopRecordingVoiceConf(meetingID: String, recorded: Boolean, voiceConfId: String, recordedStream: String) extends IOutMessage
+case class StopRecording(meetingID: String, recorded: Boolean, requesterID: String) extends IOutMessage
+
+// Chat
+case class GetChatHistoryReply(meetingID: String, recorded: Boolean, requesterID: String,
+ replyTo: String, history: Array[Map[String, String]]) extends IOutMessage
+case class SendPublicMessageEvent(meetingID: String, recorded: Boolean, requesterID: String,
+ message: Map[String, String]) extends IOutMessage
+case class SendPrivateMessageEvent(meetingID: String, recorded: Boolean, requesterID: String,
+ message: Map[String, String]) extends IOutMessage
+case class ClearPublicChatHistoryReply(meetingID: String, recorded: Boolean, requesterID: String) extends IOutMessage
+
+// Layout
+case class GetCurrentLayoutReply(meetingID: String, recorded: Boolean, requesterID: String, layoutID: String,
+ locked: Boolean, setByUserID: String) extends IOutMessage
+case class BroadcastLayoutEvent(meetingID: String, recorded: Boolean, requesterID: String,
+ layoutID: String, locked: Boolean, setByUserID: String, applyTo: Array[UserVO]) extends IOutMessage
+case class LockLayoutEvent(meetingID: String, recorded: Boolean, setById: String, locked: Boolean,
+ applyTo: Array[UserVO]) extends IOutMessage
+
+// Presentation
+case class ClearPresentationOutMsg(meetingID: String, recorded: Boolean) extends IOutMessage
+case class RemovePresentationOutMsg(meetingID: String, recorded: Boolean, presentationID: String) extends IOutMessage
+case class GetPresentationInfoOutMsg(meetingID: String, recorded: Boolean, requesterID: String,
+ info: CurrentPresentationInfo, replyTo: String) extends IOutMessage
+case class ResizeAndMoveSlideOutMsg(meetingID: String, recorded: Boolean, page: Page) extends IOutMessage
+case class GotoSlideOutMsg(meetingID: String, recorded: Boolean, page: Page) extends IOutMessage
+case class SharePresentationOutMsg(meetingID: String, recorded: Boolean, presentation: Presentation) extends IOutMessage
+case class GetSlideInfoOutMsg(meetingID: String, recorded: Boolean, requesterID: String, page: Page, replyTo: String) extends IOutMessage
+case class GetPreuploadedPresentationsOutMsg(meetingID: String, recorded: Boolean) extends IOutMessage
+case class PresentationConversionProgress(meetingID: String, messageKey: String, code: String,
+ presentationId: String, presentationName: String) extends IOutMessage
+case class PresentationConversionError(meetingID: String, messageKey: String, code: String,
+ presentationId: String, numberOfPages: Int, maxNumberPages: Int, presentationName: String) extends IOutMessage
+case class PresentationPageGenerated(meetingID: String, messageKey: String, code: String, presentationId: String,
+ numberOfPages: Int, pagesCompleted: Int, presentationName: String) extends IOutMessage
+case class PresentationConversionDone(meetingID: String, recorded: Boolean, messageKey: String, code: String,
+ presentation: Presentation) extends IOutMessage
+case class PresentationChanged(meetingID: String, presentation: Presentation) extends IOutMessage
+case class GetPresentationStatusReply(meetingID: String, presentations: Seq[Presentation], current: Presentation, replyTo: String) extends IOutMessage
+case class PresentationRemoved(meetingID: String, presentationId: String) extends IOutMessage
+case class PageChanged(meetingID: String, page: Page) extends IOutMessage
+
+// Polling
+//case class PollCreatedMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String, poll: PollVO) extends IOutMessage
+//case class CreatePollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String, pollType: String) extends IOutMessage
+case class PollStartedMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String, poll: SimplePollOutVO) extends IOutMessage
+case class StartPollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
+case class PollStoppedMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String) extends IOutMessage
+case class StopPollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String) extends IOutMessage
+case class PollShowResultMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String, poll: SimplePollResultOutVO) extends IOutMessage
+case class ShowPollResultReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
+case class PollHideResultMessage(meetingID: String, recorded: Boolean, requesterId: String, pollId: String) extends IOutMessage
+case class HidePollResultReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
+case class UserRespondedToPollMessage(meetingID: String, recorded: Boolean, presenterId: String, pollId: String, poll: SimplePollResultOutVO) extends IOutMessage
+case class RespondToPollReplyMessage(meetingID: String, recorded: Boolean, result: RequestResult, requesterId: String, pollId: String) extends IOutMessage
+case class GetCurrentPollReplyMessage(meetingID: String, recorded: Boolean, requesterId: String, hasPoll: Boolean, poll: Option[PollVO]) extends IOutMessage
+
+// No idea what part this is for
+case class GetAllMeetingsReply(meetings: Array[MeetingInfo]) extends IOutMessage
+
+// DeskShare
+case class DeskShareStartRTMPBroadcast(conferenceName: String, streamPath: String) extends IOutMessage
+case class DeskShareStopRTMPBroadcast(conferenceName: String, streamPath: String) extends IOutMessage
+case class DeskShareNotifyViewersRTMP(meetingID: String, streamPath: String, videoWidth: Int, videoHeight: Int, broadcasting: Boolean) extends IOutMessage
+case class DeskShareNotifyASingleViewer(meetingID: String, userID: String, streamPath: String, videoWidth: Int, videoHeight: Int, broadcasting: Boolean) extends IOutMessage
+case class DeskShareHangUp(meetingID: String, fsConferenceName: String) extends IOutMessage
+
+// Guest
+case class GetGuestPolicyReply(meetingID: String, recorded: Boolean, requesterID: String, policy: String) extends IOutMessage
+case class GuestPolicyChanged(meetingID: String, recorded: Boolean, policy: String) extends IOutMessage
+case class GuestAccessDenied(meetingID: String, recorded: Boolean, userId: String) extends IOutMessage
+
+// Shared Notes
+case class PatchDocumentReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String, patch: String, patchID: Int, undo: Boolean, redo: Boolean) extends IOutMessage
+case class GetCurrentDocumentReply(meetingID: String, recorded: Boolean, requesterID: String, notes: Map[String, NoteReport]) extends IOutMessage
+case class CreateAdditionalNotesReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String, noteName: String) extends IOutMessage
+case class DestroyAdditionalNotesReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String) extends IOutMessage
+case class SharedNotesSyncNoteReply(meetingID: String, recorded: Boolean, requesterID: String, noteID: String, note: NoteReport) extends IOutMessage
+
+// Value Objects
+case class MeetingVO(id: String, recorded: Boolean)
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/CaptionModel.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/CaptionModel.scala
index 65d481ed10..297c4cb91c 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/CaptionModel.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/CaptionModel.scala
@@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps
-import org.bigbluebutton.common2.domain.TranscriptVO
+import org.bigbluebutton.common2.messages.caption.TranscriptVO
import scala.collection.immutable.HashMap
class CaptionModel {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/LayoutApp.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/LayoutApp.scala
index e390ebdee2..b62dadb00b 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/LayoutApp.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/LayoutApp.scala
@@ -1,68 +1,68 @@
-package org.bigbluebutton.core.apps
-
-import org.bigbluebutton.core.api._
-
-import scala.collection.mutable.ArrayBuffer
-import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.core.models.{ Roles, UserVO, Users }
-import org.bigbluebutton.core.running.MeetingActor
-import org.bigbluebutton.core2.MeetingStatus2x
-
-trait LayoutApp {
- this: MeetingActor =>
-
- val outGW: OutMessageGateway
-
- def handleGetCurrentLayoutRequest(msg: GetCurrentLayoutRequest) {
- outGW.send(new GetCurrentLayoutReply(msg.meetingID, props.recordProp.record, msg.requesterID,
- liveMeeting.layoutModel.getCurrentLayout(),
- MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
- liveMeeting.layoutModel.getLayoutSetter()))
- }
-
- def handleLockLayoutRequest(msg: LockLayoutRequest) {
- liveMeeting.layoutModel.applyToViewersOnly(msg.viewersOnly)
- liveMeeting.lockLayout(msg.lock)
-
- outGW.send(new LockLayoutEvent(msg.meetingID, props.recordProp.record, msg.setById, msg.lock, affectedUsers))
-
- msg.layout foreach { l =>
- liveMeeting.layoutModel.setCurrentLayout(l)
- broadcastSyncLayout(msg.meetingID, msg.setById)
- }
- }
-
- private def broadcastSyncLayout(meetingId: String, setById: String) {
- outGW.send(new BroadcastLayoutEvent(meetingId, props.recordProp.record, setById,
- liveMeeting.layoutModel.getCurrentLayout(),
- MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
- liveMeeting.layoutModel.getLayoutSetter(), affectedUsers))
- }
-
- def handleBroadcastLayoutRequest(msg: BroadcastLayoutRequest) {
- liveMeeting.layoutModel.setCurrentLayout(msg.layout)
- broadcastSyncLayout(msg.meetingID, msg.requesterID)
- }
-
- def handleLockLayout(lock: Boolean, setById: String) {
- outGW.send(new LockLayoutEvent(props.meetingProp.intId, props.recordProp.record, setById, lock, affectedUsers))
-
- broadcastSyncLayout(props.meetingProp.intId, setById)
- }
-
- def affectedUsers(): Array[UserVO] = {
- if (liveMeeting.layoutModel.doesLayoutApplyToViewersOnly()) {
- val au = ArrayBuffer[UserVO]()
- Users.getUsers(liveMeeting.users) foreach { u =>
- if (!u.presenter && u.role != Roles.MODERATOR_ROLE) {
- au += u
- }
- }
- au.toArray
- } else {
- Users.getUsers(liveMeeting.users).toArray
- }
-
- }
-
-}
+package org.bigbluebutton.core.apps
+
+import org.bigbluebutton.common2.domain.UserVO
+
+import scala.collection.mutable.ArrayBuffer
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.api._
+import org.bigbluebutton.core.models.{ Layouts, Roles, Users }
+import org.bigbluebutton.core.running.MeetingActor
+import org.bigbluebutton.core2.MeetingStatus2x
+
+trait LayoutApp {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ def handleGetCurrentLayoutRequest(msg: GetCurrentLayoutRequest) {
+ outGW.send(new GetCurrentLayoutReply(msg.meetingID, props.recordProp.record, msg.requesterID,
+ Layouts.getCurrentLayout(),
+ MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
+ Layouts.getLayoutSetter()))
+ }
+
+ def handleLockLayoutRequest(msg: LockLayoutRequest) {
+ Layouts.applyToViewersOnly(msg.viewersOnly)
+ liveMeeting.lockLayout(msg.lock)
+
+ outGW.send(new LockLayoutEvent(msg.meetingID, props.recordProp.record, msg.setById, msg.lock, affectedUsers))
+
+ msg.layout foreach { l =>
+ Layouts.setCurrentLayout(l)
+ broadcastSyncLayout(msg.meetingID, msg.setById)
+ }
+ }
+
+ private def broadcastSyncLayout(meetingId: String, setById: String) {
+ outGW.send(new BroadcastLayoutEvent(meetingId, props.recordProp.record, setById,
+ Layouts.getCurrentLayout(),
+ MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
+ Layouts.getLayoutSetter(), affectedUsers))
+ }
+
+ def handleBroadcastLayoutRequest(msg: BroadcastLayoutRequest) {
+ Layouts.setCurrentLayout(msg.layout)
+ broadcastSyncLayout(msg.meetingID, msg.requesterID)
+ }
+
+ def handleLockLayout(lock: Boolean, setById: String) {
+ outGW.send(new LockLayoutEvent(props.meetingProp.intId, props.recordProp.record, setById, lock, affectedUsers))
+
+ broadcastSyncLayout(props.meetingProp.intId, setById)
+ }
+
+ def affectedUsers(): Array[UserVO] = {
+ if (Layouts.doesLayoutApplyToViewersOnly()) {
+ val au = ArrayBuffer[UserVO]()
+ Users.getUsers(liveMeeting.users) foreach { u =>
+ if (!u.presenter && u.role != Roles.MODERATOR_ROLE) {
+ au += u
+ }
+ }
+ au.toArray
+ } else {
+ Users.getUsers(liveMeeting.users).toArray
+ }
+ }
+
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PermisssionCheck.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PermisssionCheck.scala
index e5bceaa6b3..ff2cd9f214 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PermisssionCheck.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PermisssionCheck.scala
@@ -1,6 +1,6 @@
package org.bigbluebutton.core.apps
-import org.bigbluebutton.core.models.UserVO
+import org.bigbluebutton.common2.domain.UserVO
trait PermisssionCheck {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala
index 8864e7dae1..8cc093a771 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala
@@ -12,13 +12,13 @@ trait PresentationApp {
val outGW: OutMessageGateway
def handlePreuploadedPresentations(msg: PreuploadedPresentations) {
- val pres = msg.presentations
-
- msg.presentations.foreach(presentation => {
- liveMeeting.presModel.addPresentation(presentation)
-
- sharePresentation(presentation.id, true)
- })
+ // val pres = msg.presentations
+ //
+ // msg.presentations.foreach(presentation => {
+ // liveMeeting.presModel.addPresentation(presentation)
+ //
+ // sharePresentation(presentation.id, true)
+ // })
}
def handleInitializeMeeting(msg: InitializeMeeting) {
@@ -26,81 +26,81 @@ trait PresentationApp {
}
def handleClearPresentation(msg: ClearPresentation) {
- outGW.send(new ClearPresentationOutMsg(props.meetingProp.intId, props.recordProp.record))
+ // outGW.send(new ClearPresentationOutMsg(props.meetingProp.intId, props.recordProp.record))
}
def handlePresentationConversionUpdate(msg: PresentationConversionUpdate) {
- outGW.send(new PresentationConversionProgress(props.meetingProp.intId, msg.messageKey,
- msg.code, msg.presentationId, msg.presName))
+ // outGW.send(new PresentationConversionProgress(props.meetingProp.intId, msg.messageKey,
+ // msg.code, msg.presentationId, msg.presName))
}
def handlePresentationPageCountError(msg: PresentationPageCountError) {
- outGW.send(new PresentationConversionError(props.meetingProp.intId, msg.messageKey,
- msg.code, msg.presentationId,
- msg.numberOfPages,
- msg.maxNumberPages, msg.presName))
+ // outGW.send(new PresentationConversionError(props.meetingProp.intId, msg.messageKey,
+ // msg.code, msg.presentationId,
+ // msg.numberOfPages,
+ // msg.maxNumberPages, msg.presName))
}
def handlePresentationSlideGenerated(msg: PresentationSlideGenerated) {
- outGW.send(new PresentationPageGenerated(props.meetingProp.intId, msg.messageKey,
- msg.code, msg.presentationId,
- msg.numberOfPages,
- msg.pagesCompleted, msg.presName))
+ // outGW.send(new PresentationPageGenerated(props.meetingProp.intId, msg.messageKey,
+ // msg.code, msg.presentationId,
+ // msg.numberOfPages,
+ // msg.pagesCompleted, msg.presName))
}
def handlePresentationConversionCompleted(msg: PresentationConversionCompleted) {
liveMeeting.presModel.addPresentation(msg.presentation)
-
- outGW.send(new PresentationConversionDone(props.meetingProp.intId, props.recordProp.record, msg.messageKey,
- msg.code, msg.presentation))
-
- sharePresentation(msg.presentation.id, true)
+ //
+ // outGW.send(new PresentationConversionDone(props.meetingProp.intId, props.recordProp.record, msg.messageKey,
+ // msg.code, msg.presentation))
+ //
+ // sharePresentation(msg.presentation.id, true)
}
def handleRemovePresentation(msg: RemovePresentation) {
- val curPres = liveMeeting.presModel.getCurrentPresentation
-
- val removedPresentation = liveMeeting.presModel.remove(msg.presentationID)
-
- curPres foreach (cp => {
- if (cp.id == msg.presentationID) {
- sharePresentation(msg.presentationID, false);
- }
- })
-
- outGW.send(new RemovePresentationOutMsg(msg.meetingID, props.recordProp.record, msg.presentationID))
+ // val curPres = liveMeeting.presModel.getCurrentPresentation
+ //
+ // val removedPresentation = liveMeeting.presModel.remove(msg.presentationID)
+ //
+ // curPres foreach (cp => {
+ // if (cp.id == msg.presentationID) {
+ // sharePresentation(msg.presentationID, false);
+ // }
+ // })
+ //
+ // outGW.send(new RemovePresentationOutMsg(msg.meetingID, props.recordProp.record, msg.presentationID))
}
def handleGetPresentationInfo(msg: GetPresentationInfo) {
- val curPresenter = MeetingStatus2x.getCurrentPresenterInfo(liveMeeting.status)
- val presenter = new CurrentPresenter(curPresenter.presenterID, curPresenter.presenterName, curPresenter.assignedBy)
- val presentations = liveMeeting.presModel.getPresentations
- val presentationInfo = new CurrentPresentationInfo(presenter, presentations)
- outGW.send(new GetPresentationInfoOutMsg(props.meetingProp.intId, props.recordProp.record, msg.requesterID, presentationInfo, msg.replyTo))
+ // val curPresenter = MeetingStatus2x.getCurrentPresenterInfo(liveMeeting.status)
+ // val presenter = new CurrentPresenter(curPresenter.presenterID, curPresenter.presenterName, curPresenter.assignedBy)
+ // val presentations = liveMeeting.presModel.getPresentations
+ // val presentationInfo = new CurrentPresentationInfo(presenter, presentations)
+ // outGW.send(new GetPresentationInfoOutMsg(props.meetingProp.intId, props.recordProp.record, msg.requesterID, presentationInfo, msg.replyTo))
}
def handleResizeAndMoveSlide(msg: ResizeAndMoveSlide) {
- // Force coordinate that are out-of-bounds inside valid values
- val xOffset = if (msg.xOffset <= 0) msg.xOffset else 0
- val yOffset = if (msg.yOffset <= 0) msg.yOffset else 0
- val width = if (msg.widthRatio <= 100) msg.widthRatio else 100
- val height = if (msg.heightRatio <= 100) msg.heightRatio else 100
-
- val page = liveMeeting.presModel.resizePage(xOffset, yOffset, width, height);
- page foreach (p => outGW.send(new ResizeAndMoveSlideOutMsg(props.meetingProp.intId, props.recordProp.record, p)))
+ // // Force coordinate that are out-of-bounds inside valid values
+ // val xOffset = if (msg.xOffset <= 0) msg.xOffset else 0
+ // val yOffset = if (msg.yOffset <= 0) msg.yOffset else 0
+ // val width = if (msg.widthRatio <= 100) msg.widthRatio else 100
+ // val height = if (msg.heightRatio <= 100) msg.heightRatio else 100
+ //
+ // val page = liveMeeting.presModel.resizePage(xOffset, yOffset, width, height);
+ // page foreach (p => outGW.send(new ResizeAndMoveSlideOutMsg(props.meetingProp.intId, props.recordProp.record, p)))
}
def handleGotoSlide(msg: GotoSlide) {
- liveMeeting.presModel.changePage(msg.page) foreach { page =>
- log.debug("Switching page for meeting=[{}] page=[{}]", msg.meetingID, page.num);
- outGW.send(new GotoSlideOutMsg(props.meetingProp.intId, props.recordProp.record, page))
- }
-
- Users.getCurrentPresenter(liveMeeting.users) foreach { pres =>
- handleStopPollRequest(StopPollRequest(props.meetingProp.intId, pres.id))
- }
+ // liveMeeting.presModel.changePage(msg.page) foreach { page =>
+ // log.debug("Switching page for meeting=[{}] page=[{}]", msg.meetingID, page.num);
+ // outGW.send(new GotoSlideOutMsg(props.meetingProp.intId, props.recordProp.record, page))
+ // }
+ //
+ // Users.getCurrentPresenter(liveMeeting.users) foreach { pres =>
+ // handleStopPollRequest(StopPollRequest(props.meetingProp.intId, pres.id))
+ // }
}
@@ -109,6 +109,7 @@ trait PresentationApp {
}
def sharePresentation(presentationID: String, share: Boolean) {
+ /*
val pres = liveMeeting.presModel.sharePresentation(presentationID)
pres foreach { p =>
@@ -118,15 +119,15 @@ trait PresentationApp {
outGW.send(new GotoSlideOutMsg(props.meetingProp.intId, props.recordProp.record, page))
}
}
-
+ */
}
def handleGetSlideInfo(msg: GetSlideInfo) {
- liveMeeting.presModel.getCurrentPresentation foreach { pres =>
- liveMeeting.presModel.getCurrentPage(pres) foreach { page =>
- outGW.send(new GetSlideInfoOutMsg(props.meetingProp.intId, props.recordProp.record, msg.requesterID, page, msg.replyTo))
- }
- }
+ // liveMeeting.presModel.getCurrentPresentation foreach { pres =>
+ // liveMeeting.presModel.getCurrentPage(pres) foreach { page =>
+ // outGW.send(new GetSlideInfoOutMsg(props.meetingProp.intId, props.recordProp.record, msg.requesterID, page, msg.replyTo))
+ // }
+ // }
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationModel.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationModel.scala
index 5dccb4f1f2..0aa82c805d 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationModel.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationModel.scala
@@ -1,9 +1,12 @@
package org.bigbluebutton.core.apps
+import org.bigbluebutton.common2.domain.PresentationVO
+import org.bigbluebutton.common2.domain.PageVO
+
case class CurrentPresenter(userId: String, name: String, assignedBy: String)
case class CurrentPresentationInfo(presenter: CurrentPresenter, presentations: Seq[Presentation])
case class Presentation(id: String, name: String, current: Boolean = false,
- pages: scala.collection.immutable.HashMap[String, Page], downloadable: Boolean)
+ pages: scala.collection.immutable.Map[String, PageVO], downloadable: Boolean)
case class Page(id: String, num: Int, thumbUri: String = "", swfUri: String,
txtUri: String, svgUri: String, current: Boolean = false, xOffset: Double = 0, yOffset: Double = 0,
@@ -16,32 +19,35 @@ class PresentationModel {
savePresentation(pres)
}
- def getPresentations(): Seq[Presentation] = {
- presentations.values.toSeq
+ def getPresentations(): Vector[Presentation] = {
+ presentations.values.toVector
}
def getCurrentPresentation(): Option[Presentation] = {
presentations.values find (p => p.current)
}
- def getCurrentPage(pres: Presentation): Option[Page] = {
+ def getCurrentPage(pres: Presentation): Option[PageVO] = {
pres.pages.values find (p => p.current)
}
- def getCurrentPage(): Option[Page] = {
+ def getCurrentPage(): Option[PageVO] = {
for {
curPres <- getCurrentPresentation()
curPage <- getCurrentPage(curPres)
} yield curPage
}
- def remove(presId: String): Option[Presentation] = {
- val pres = presentations.get(presId)
- pres foreach (p => presentations -= p.id)
- pres
+ def removePresentation(presId: String): Option[Presentation] = {
+ for {
+ pres <- presentations.get(presId)
+ } yield {
+ presentations -= presId
+ pres
+ }
}
- def sharePresentation(presId: String): Option[Presentation] = {
+ def setCurrentPresentation(presId: String): Option[Presentation] = {
getCurrentPresentation foreach (curPres => {
if (curPres.id != presId) {
val newPres = curPres.copy(current = false)
@@ -63,54 +69,41 @@ class PresentationModel {
presentations += pres.id -> pres
}
- private def resizeCurrentPage(pres: Presentation,
- xOffset: Double, yOffset: Double,
- widthRatio: Double,
- heightRatio: Double): Option[Page] = {
- getCurrentPage(pres) match {
- case Some(cp) => {
- val page = cp.copy(xOffset = xOffset, yOffset = yOffset,
- widthRatio = widthRatio, heightRatio = heightRatio)
- val nPages = pres.pages + (page.id -> page)
- val newPres = pres.copy(pages = nPages)
- savePresentation(newPres)
- Some(page)
- }
- case None => None
+ def resizePage(presentationId: String, pageId: String,
+ xOffset: Double, yOffset: Double, widthRatio: Double,
+ heightRatio: Double): Option[PageVO] = {
+ for {
+ pres <- presentations.get(presentationId)
+ page <- pres.pages.get(pageId)
+ } yield {
+ val nPage = page.copy(xOffset = xOffset, yOffset = yOffset,
+ widthRatio = widthRatio, heightRatio = heightRatio)
+ val nPages = pres.pages + (nPage.id -> nPage)
+ val newPres = pres.copy(pages = nPages)
+ savePresentation(newPres)
+ nPage
}
}
- def resizePage(xOffset: Double, yOffset: Double,
- widthRatio: Double, heightRatio: Double): Option[Page] = {
- for {
- curPres <- getCurrentPresentation
- page <- resizeCurrentPage(curPres, xOffset, yOffset, widthRatio, heightRatio)
- } yield page
- }
-
- private def deactivateCurrentPage(pres: Presentation) {
- getCurrentPage(pres) foreach { cp =>
+ private def deactivateCurrentPage(pres: Presentation, pageIdToIgnore: String): Presentation = {
+ var updatedPres = pres
+ pres.pages.values.find(p => p.current && p.id != pageIdToIgnore).foreach { cp =>
val page = cp.copy(current = false)
val nPages = pres.pages + (page.id -> page)
val newPres = pres.copy(pages = nPages)
- savePresentation(newPres)
- // println("Making page[" + page.id + "] not current[" + page.current + "]")
- // println("After deact page. presentation id=[" + newPres.id + "] current=[" + newPres.current + "]")
- // newPres.pages.values foreach {page =>
- // println("page id=[" + page.id + "] current=[" + page.current + "]")
- // }
+ updatedPres = newPres
}
+ updatedPres
}
- private def makePageCurrent(pres: Presentation, page: String): Option[Page] = {
- pres.pages.values find (p => p.id == page) match {
+ private def makePageCurrent(pres: Presentation, pageId: String): Option[Presentation] = {
+ pres.pages.get(pageId) match {
case Some(newCurPage) => {
val page = newCurPage.copy(current = true)
val newPages = pres.pages + (page.id -> page)
val newPres = pres.copy(pages = newPages)
- savePresentation(newPres)
+ Some(newPres)
// println("Making page[" + page.id + "] current[" + page.current + "]")
- Some(page)
}
case None => {
// println("Could not find page[" + page + "] in presentation [" + pres.id + "]")
@@ -119,13 +112,18 @@ class PresentationModel {
}
}
- def changePage(pageId: String): Option[Page] = {
- getCurrentPresentation foreach { pres => deactivateCurrentPage(pres) }
+ def changeCurrentPage(presentationId: String, pageId: String): Boolean = {
+ var foundPage: Boolean = false;
for {
- pres <- getCurrentPresentation
- page <- makePageCurrent(pres, pageId)
- } yield page
+ pres <- presentations.get(presentationId)
+ newPres <- makePageCurrent(pres, pageId)
+ } yield {
+ foundPage = true
+ savePresentation(deactivateCurrentPage(newPres, pageId))
+ }
+
+ foundPage
}
-}
\ No newline at end of file
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/UsersApp.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/UsersApp.scala
index 65b6108035..ac7a7c860d 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/UsersApp.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/UsersApp.scala
@@ -1,48 +1,58 @@
package org.bigbluebutton.core.apps
+import org.bigbluebutton.common2.domain.UserVO
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.{ PresenterAssignedEvtMsg, PresenterAssignedEvtMsgBody }
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.GuestPolicy
import org.bigbluebutton.core.models._
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core2.MeetingStatus2x
+import org.bigbluebutton.core2.message.handlers.users.{ UserEmojiStatusHdlr, UserLeavingHdlr }
-trait UsersApp {
+trait UsersApp extends UserLeavingHdlr with UserEmojiStatusHdlr {
this: MeetingActor =>
val outGW: OutMessageGateway
- def handleValidateAuthToken(msg: ValidateAuthToken) {
- log.info("Got ValidateAuthToken message. meetingId=" + msg.meetingID + " userId=" + msg.userId)
- RegisteredUsers.getRegisteredUserWithToken(msg.token, msg.userId, liveMeeting.registeredUsers) match {
- case Some(u) =>
+ def automaticallyAssignPresenter(): Unit = {
+ log.debug("auto assigning presenter")
- //send the reply
- outGW.send(new ValidateAuthTokenReply(props.meetingProp.intId, msg.userId, msg.token, true, msg.correlationId))
+ Users2x.findModerator(liveMeeting.users2x) match {
+ case Some(moderator) =>
+ for {
+ newPresenter <- Users2x.makePresenter(liveMeeting.users2x, moderator.intId)
+ } yield {
+ log.debug("sending assigned presenter for intId={} name={}", newPresenter.intId, newPresenter.name)
+ sendPresenterAssigned(newPresenter.intId, newPresenter.name, newPresenter.name)
+ }
+ case None => log.debug("No moderator found.")
+ }
- log.info("ValidateToken success. meetingId=" + props.meetingProp.intId + " userId=" + msg.userId)
-
- //join the user
- handleUserJoin(new UserJoining(props.meetingProp.intId, msg.userId, msg.token))
- case None =>
- log.info("ValidateToken failed. meetingId=" + props.meetingProp.intId + " userId=" + msg.userId)
- outGW.send(new ValidateAuthTokenReply(props.meetingProp.intId, msg.userId, msg.token, false, msg.correlationId))
+ for {
+ moderator <- Users2x.findModerator(liveMeeting.users2x)
+ newPresenter <- Users2x.makePresenter(liveMeeting.users2x, moderator.intId)
+ } yield {
+ log.debug("sending assigned presenter for intId={} name={}", newPresenter.intId, newPresenter.name)
+ sendPresenterAssigned(newPresenter.intId, newPresenter.name, newPresenter.name)
}
}
- def handleRegisterUser(msg: RegisterUser) {
- if (MeetingStatus2x.hasMeetingEnded(liveMeeting.status)) {
- // Check first if the meeting has ended and the user refreshed the client to re-connect.
- log.info("Register user failed. Mmeeting has ended. meetingId=" + props.meetingProp.intId + " userId=" + msg.userID)
- sendMeetingHasEnded(msg.userID)
- } else {
- val regUser = RegisteredUsers.create(msg.userID, msg.extUserID, msg.name, msg.role, msg.authToken,
- msg.avatarURL, msg.guest, msg.authed, msg.guest, liveMeeting.registeredUsers)
+ def sendPresenterAssigned(intId: String, name: String, assignedBy: String): Unit = {
+ def build(meetingId: String, intId: String, name: String, assignedBy: String): BbbCommonEnvCoreMsg = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, intId)
+ val envelope = BbbCoreEnvelope(PresenterAssignedEvtMsg.NAME, routing)
- log.info("Register user success. meetingId=" + props.meetingProp.intId + " userId=" + msg.userID + " user=" + regUser)
- outGW.send(new UserRegistered(props.meetingProp.intId, props.recordProp.record, regUser))
+ val body = PresenterAssignedEvtMsgBody(intId, name, assignedBy)
+ val header = BbbClientMsgHeader(PresenterAssignedEvtMsg.NAME, meetingId, intId)
+ val event = PresenterAssignedEvtMsg(header, body)
+
+ BbbCommonEnvCoreMsg(envelope, event)
}
+ def event = build(props.meetingProp.intId, intId, name, assignedBy)
+ outGW.send(event)
}
def usersWhoAreNotPresenter(): Array[UserVO] = {
@@ -117,26 +127,6 @@ trait UsersApp {
}
- def handleUserMutedInVoiceConfMessage(msg: UserMutedInVoiceConfMessage) {
- for {
- user <- Users.getUserWithVoiceUserId(msg.voiceUserId, liveMeeting.users)
- nu = Users.setUserMuted(user, liveMeeting.users, msg.muted)
- } yield {
- log.info("User muted in voice conf. meetingId=" + props.meetingProp.intId + " userId=" + nu.id + " user=" + nu)
-
- outGW.send(new UserVoiceMuted(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf, nu))
- }
- }
-
- def handleUserTalkingInVoiceConfMessage(msg: UserTalkingInVoiceConfMessage) {
- for {
- user <- Users.getUserWithVoiceUserId(msg.voiceUserId, liveMeeting.users)
- nv = Users.setUserTalking(user, liveMeeting.users, msg.talking)
- } yield {
- outGW.send(new UserVoiceTalking(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf, nv))
- }
- }
-
def handleAssignPresenter(msg: AssignPresenter): Unit = {
assignNewPresenter(msg.newPresenterID, msg.newPresenterName, msg.assignedBy)
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardApp.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardApp.scala
index ae5e04cfe9..38a58bbdb7 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardApp.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardApp.scala
@@ -9,10 +9,10 @@ import org.bigbluebutton.core2.message.handlers.whiteboard.UndoWhiteboardPubMsgH
import org.bigbluebutton.core2.message.handlers.whiteboard.ModifyWhiteboardAccessPubMsgHdlr
import org.bigbluebutton.core2.message.handlers.whiteboard.GetWhiteboardAccessReqMsgHdlr
import org.bigbluebutton.core2.message.handlers.whiteboard.SendWhiteboardAnnotationPubMsgHdlr
-import org.bigbluebutton.common2.domain.AnnotationProps
+import org.bigbluebutton.common2.domain.AnnotationVO
import org.bigbluebutton.core2.message.handlers.whiteboard.GetWhiteboardAnnotationsReqMsgHdlr
-case class Whiteboard(id: String, annotationCount: Int, annotationsMap: scala.collection.immutable.Map[String, scala.collection.immutable.List[AnnotationProps]])
+case class Whiteboard(id: String, annotationCount: Int, annotationsMap: scala.collection.immutable.Map[String, scala.collection.immutable.List[AnnotationVO]])
trait WhiteboardApp
extends SendCursorPositionPubMsgHdlr
@@ -26,9 +26,9 @@ trait WhiteboardApp
val outGW: OutMessageGateway
- def sendWhiteboardAnnotation(annotation: AnnotationProps): AnnotationProps = {
+ def sendWhiteboardAnnotation(annotation: AnnotationVO): AnnotationVO = {
// println("Received whiteboard annotation. status=[" + status + "], annotationType=[" + annotationType + "]")
- var rtnAnnotation: AnnotationProps = annotation
+ var rtnAnnotation: AnnotationVO = annotation
if (WhiteboardKeyUtil.DRAW_START_STATUS == annotation.status) {
rtnAnnotation = liveMeeting.wbModel.addAnnotation(annotation.wbId, annotation.userId, annotation)
@@ -51,7 +51,7 @@ trait WhiteboardApp
rtnAnnotation
}
- def getWhiteboardAnnotations(whiteboardId: String): Array[AnnotationProps] = {
+ def getWhiteboardAnnotations(whiteboardId: String): Array[AnnotationVO] = {
//println("WB: Received page history [" + msg.whiteboardId + "]")
liveMeeting.wbModel.getHistory(whiteboardId)
}
@@ -60,7 +60,7 @@ trait WhiteboardApp
liveMeeting.wbModel.clearWhiteboard(whiteboardId, requesterId)
}
- def undoWhiteboard(whiteboardId: String, requesterId: String): Option[AnnotationProps] = {
+ def undoWhiteboard(whiteboardId: String, requesterId: String): Option[AnnotationVO] = {
liveMeeting.wbModel.undoWhiteboard(whiteboardId, requesterId)
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardModel.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardModel.scala
index 2a9e64729f..1a6937c884 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardModel.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/WhiteboardModel.scala
@@ -5,7 +5,7 @@ import org.bigbluebutton.core.util.jhotdraw.BezierWrapper
import scala.collection.immutable.List
import scala.collection.immutable.HashMap
import scala.collection.JavaConverters._
-import org.bigbluebutton.common2.domain.AnnotationProps
+import org.bigbluebutton.common2.domain.AnnotationVO
class WhiteboardModel {
private var _whiteboards = new HashMap[String, Whiteboard]()
@@ -25,14 +25,14 @@ class WhiteboardModel {
}
private def createWhiteboard(wbId: String): Whiteboard = {
- new Whiteboard(wbId, 0, new HashMap[String, List[AnnotationProps]]())
+ new Whiteboard(wbId, 0, new HashMap[String, List[AnnotationVO]]())
}
- private def getAnnotationsByUserId(wb: Whiteboard, id: String): List[AnnotationProps] = {
- wb.annotationsMap.get(id).getOrElse(List[AnnotationProps]())
+ private def getAnnotationsByUserId(wb: Whiteboard, id: String): List[AnnotationVO] = {
+ wb.annotationsMap.get(id).getOrElse(List[AnnotationVO]())
}
- def addAnnotation(wbId: String, userId: String, annotation: AnnotationProps): AnnotationProps = {
+ def addAnnotation(wbId: String, userId: String, annotation: AnnotationVO): AnnotationVO = {
val wb = getWhiteboard(wbId)
val usersAnnotations = getAnnotationsByUserId(wb, userId)
val rtnAnnotation = cleansePointsInAnnotation(annotation).copy(position = wb.annotationCount)
@@ -45,7 +45,7 @@ class WhiteboardModel {
rtnAnnotation
}
- def updateAnnotation(wbId: String, userId: String, annotation: AnnotationProps): AnnotationProps = {
+ def updateAnnotation(wbId: String, userId: String, annotation: AnnotationVO): AnnotationVO = {
val wb = getWhiteboard(wbId)
val usersAnnotations = getAnnotationsByUserId(wb, userId)
@@ -63,7 +63,7 @@ class WhiteboardModel {
}
}
- def updateAnnotationPencil(wbId: String, userId: String, annotation: AnnotationProps): AnnotationProps = {
+ def updateAnnotationPencil(wbId: String, userId: String, annotation: AnnotationVO): AnnotationVO = {
val wb = getWhiteboard(wbId)
val usersAnnotations = getAnnotationsByUserId(wb, userId)
@@ -97,8 +97,8 @@ class WhiteboardModel {
}
}
- def endAnnotationPencil(wbId: String, userId: String, annotation: AnnotationProps): AnnotationProps = {
- var rtnAnnotation: AnnotationProps = annotation
+ def endAnnotationPencil(wbId: String, userId: String, annotation: AnnotationVO): AnnotationVO = {
+ var rtnAnnotation: AnnotationVO = annotation
val wb = getWhiteboard(wbId)
val usersAnnotations = getAnnotationsByUserId(wb, userId)
@@ -146,7 +146,7 @@ class WhiteboardModel {
rtnAnnotation
}
- def getHistory(wbId: String): Array[AnnotationProps] = {
+ def getHistory(wbId: String): Array[AnnotationVO] = {
val wb = getWhiteboard(wbId)
wb.annotationsMap.values.flatten.toArray.sortBy(_.position);
}
@@ -165,7 +165,7 @@ class WhiteboardModel {
}
} else {
if (wb.annotationsMap.nonEmpty) {
- val newWb = wb.copy(annotationsMap = new HashMap[String, List[AnnotationProps]]())
+ val newWb = wb.copy(annotationsMap = new HashMap[String, List[AnnotationVO]]())
saveWhiteboard(newWb)
cleared = Some(true)
}
@@ -174,8 +174,8 @@ class WhiteboardModel {
cleared
}
- def undoWhiteboard(wbId: String, userId: String): Option[AnnotationProps] = {
- var last: Option[AnnotationProps] = None
+ def undoWhiteboard(wbId: String, userId: String): Option[AnnotationVO] = {
+ var last: Option[AnnotationVO] = None
val wb = getWhiteboard(wbId)
if (_multiUser) {
@@ -202,7 +202,7 @@ class WhiteboardModel {
last
}
- private def removeHeadAnnotation(wb: Whiteboard, key: String, list: List[AnnotationProps]): Whiteboard = {
+ private def removeHeadAnnotation(wb: Whiteboard, key: String, list: List[AnnotationVO]): Whiteboard = {
val newAnnotationsMap = if (list.tail == Nil) wb.annotationsMap - key else wb.annotationsMap + (key -> list.tail)
wb.copy(annotationsMap = newAnnotationsMap)
}
@@ -215,7 +215,7 @@ class WhiteboardModel {
_multiUser
}
- def cleansePointsInAnnotation(ann: AnnotationProps): AnnotationProps = {
+ def cleansePointsInAnnotation(ann: AnnotationVO): AnnotationVO = {
var updatedAnnotationInfo = ann.annotationInfo
ann.annotationInfo.get("points").foreach(points =>
updatedAnnotationInfo = (ann.annotationInfo + ("points" -> convertListNumbersToFloat(points.asInstanceOf[List[_]])))
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/CaptionApp2x.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/CaptionApp2x.scala
index c5f3a0b978..0bc04a9a4c 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/CaptionApp2x.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/CaptionApp2x.scala
@@ -2,7 +2,7 @@ package org.bigbluebutton.core.apps.caption
import akka.actor.ActorContext
import akka.event.Logging
-import org.bigbluebutton.common2.domain.TranscriptVO
+import org.bigbluebutton.common2.messages.caption.TranscriptVO
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.running.LiveMeeting
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/EditCaptionHistoryPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/EditCaptionHistoryPubMsgHdlr.scala
index 40a070406e..5f8de32abf 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/EditCaptionHistoryPubMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/EditCaptionHistoryPubMsgHdlr.scala
@@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.caption
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ EditCaptionHistoryEvtMsgBody }
+import org.bigbluebutton.common2.messages.caption.{ EditCaptionHistoryPubMsg, EditCaptionHistoryEvtMsg, EditCaptionHistoryEvtMsgBody }
import org.bigbluebutton.common2.messages._
trait EditCaptionHistoryPubMsgHdlr {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/SendCaptionHistoryReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/SendCaptionHistoryReqMsgHdlr.scala
index 234e5d4383..f785c7c7c4 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/SendCaptionHistoryReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/SendCaptionHistoryReqMsgHdlr.scala
@@ -1,8 +1,8 @@
package org.bigbluebutton.core.apps.caption
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.domain.TranscriptVO
-import org.bigbluebutton.common2.messages.MessageBody.{ SendCaptionHistoryRespMsgBody }
+import org.bigbluebutton.common2.messages.caption.TranscriptVO
+import org.bigbluebutton.common2.messages.caption.{ SendCaptionHistoryReqMsg, SendCaptionHistoryRespMsg, SendCaptionHistoryRespMsgBody }
import org.bigbluebutton.common2.messages._
trait SendCaptionHistoryReqMsgHdlr {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/UpdateCaptionOwnerPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/UpdateCaptionOwnerPubMsgHdlr.scala
index 45aeb09170..4238795d2a 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/UpdateCaptionOwnerPubMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/caption/UpdateCaptionOwnerPubMsgHdlr.scala
@@ -1,7 +1,7 @@
package org.bigbluebutton.core.apps.caption
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ UpdateCaptionOwnerEvtMsgBody }
+import org.bigbluebutton.common2.messages.caption.{ UpdateCaptionOwnerPubMsg, UpdateCaptionOwnerEvtMsg, UpdateCaptionOwnerEvtMsgBody }
import org.bigbluebutton.common2.messages._
trait UpdateCaptionOwnerPubMsgHdlr {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/GetPresentationInfoReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/GetPresentationInfoReqMsgHdlr.scala
new file mode 100755
index 0000000000..6b40560d74
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/GetPresentationInfoReqMsgHdlr.scala
@@ -0,0 +1,34 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.GetPresentationInfoRespMsgBody
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.domain.PresentationVO
+import org.bigbluebutton.core.apps.Presentation
+
+trait GetPresentationInfoReqMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handleGetPresentationInfoReqMsg(msg: GetPresentationInfoReqMsg): Unit = {
+ log.debug("Received GetPresentationInfoReqMsg")
+
+ def broadcastEvent(msg: GetPresentationInfoReqMsg, presentations: Vector[Presentation]): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(GetPresentationInfoRespMsg.NAME, routing)
+ val header = BbbClientMsgHeader(GetPresentationInfoRespMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val presVOs = presentations.map { p =>
+ PresentationVO(p.id, p.name, p.current, p.pages.values.toVector, p.downloadable)
+ }
+
+ val body = GetPresentationInfoRespMsgBody(presVOs)
+ val event = GetPresentationInfoRespMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+ }
+
+ broadcastEvent(msg, getPresentationInfo())
+ }
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/NewPresentationMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/NewPresentationMsgHdlr.scala
new file mode 100755
index 0000000000..70f0648362
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/NewPresentationMsgHdlr.scala
@@ -0,0 +1,25 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.NewPresentationEvtMsgBody
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.domain.PresentationVO
+
+trait NewPresentationMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def broadcastNewPresentationEvent(userId: String, presentation: PresentationVO): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, userId)
+ val envelope = BbbCoreEnvelope(NewPresentationEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(NewPresentationEvtMsg.NAME, liveMeeting.props.meetingProp.intId, userId)
+
+ val body = NewPresentationEvtMsgBody(presentation)
+ val event = NewPresentationEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationApp2x.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationApp2x.scala
index ea945ebe0c..8de5bba72a 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationApp2x.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationApp2x.scala
@@ -2,12 +2,72 @@ package org.bigbluebutton.core.apps.presentation
import akka.actor.ActorContext
import akka.event.Logging
+import org.bigbluebutton.common2.domain.PresentationVO
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.running.LiveMeeting
+import org.bigbluebutton.common2.domain.PageVO
+import org.bigbluebutton.core.apps.Presentation
class PresentationApp2x(val liveMeeting: LiveMeeting,
val outGW: OutMessageGateway)(implicit val context: ActorContext)
- extends EjectUserFromMeetingHdlr {
+ extends EjectUserFromMeetingHdlr
+ with NewPresentationMsgHdlr
+ with SetCurrentPresentationPubMsgHdlr
+ with GetPresentationInfoReqMsgHdlr
+ with SetCurrentPagePubMsgHdlr
+ with ResizeAndMovePagePubMsgHdlr
+ with RemovePresentationPubMsgHdlr
+ with PreuploadedPresentationsPubMsgHdlr
+ with PresentationConversionUpdatePubMsgHdlr
+ with PresentationPageCountErrorPubMsgHdlr
+ with PresentationPageGeneratedPubMsgHdlr
+ with PresentationConversionCompletedPubMsgHdlr {
val log = Logging(context.system, getClass)
+
+ def processPreuploadedPresentations(presentations: Vector[Presentation]) {
+ presentations.foreach(presentation => {
+ liveMeeting.presModel.addPresentation(presentation)
+ })
+ }
+
+ def presentationConversionCompleted(presentation: Presentation) {
+ liveMeeting.presModel.addPresentation(presentation)
+ }
+
+ def setCurrentPresentation(presentationId: String): Option[Presentation] = {
+ liveMeeting.presModel.setCurrentPresentation(presentationId)
+ }
+
+ def getPresentationInfo(): Vector[Presentation] = {
+ liveMeeting.presModel.getPresentations
+ }
+
+ def setCurrentPage(presentationId: String, pageId: String): Boolean = {
+ liveMeeting.presModel.changeCurrentPage(presentationId, pageId)
+
+ /* Need to figure out if this is still needed and if it is how to do it now
+ Users.getCurrentPresenter(liveMeeting.users) foreach { pres =>
+ handleStopPollRequest(StopPollRequest(props.meetingProp.intId, pres.id))
+ }
+ */
+ }
+
+ def resizeAndMovePage(presentationId: String, pageId: String,
+ xOffset: Double, yOffset: Double, widthRatio: Double,
+ heightRatio: Double): Option[PageVO] = {
+ // Force coordinate that are out-of-bounds inside valid values
+ // 0.25D is 400% zoom
+ // 100D-checkedWidth is the maximum the page can be moved over
+ val checkedWidth = Math.min(Math.max(widthRatio, 25D), 100D) //if (widthRatio <= 100D) widthRatio else 100D
+ val checkedHeight = Math.min(Math.max(heightRatio, 25D), 100D)
+ val checkedXOffset = Math.min(Math.max(xOffset, 0D), 100D - checkedWidth)
+ val checkedYOffset = Math.min(Math.max(yOffset, 0D), 100D - checkedHeight)
+
+ liveMeeting.presModel.resizePage(presentationId, pageId, checkedXOffset, checkedYOffset, checkedWidth, checkedHeight);
+ }
+
+ def removePresentation(presentationId: String): Option[Presentation] = {
+ liveMeeting.presModel.removePresentation(presentationId)
+ }
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationConversionCompletedPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationConversionCompletedPubMsgHdlr.scala
new file mode 100755
index 0000000000..5f06db955e
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationConversionCompletedPubMsgHdlr.scala
@@ -0,0 +1,45 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.common2.domain.PageVO
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.PresentationConversionCompletedEvtMsgBody
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.core.apps.Presentation
+
+trait PresentationConversionCompletedPubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handlePresentationConversionCompletedPubMsg(msg: PresentationConversionCompletedPubMsg): Unit = {
+ log.debug("PresentationConversionCompletedPubMsg ")
+ def broadcastEvent(msg: PresentationConversionCompletedPubMsg): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(PresentationConversionCompletedEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(PresentationConversionCompletedEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = PresentationConversionCompletedEvtMsgBody(msg.body.messageKey, msg.body.code, msg.body.presentation)
+ val event = PresentationConversionCompletedEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ val pages = new collection.mutable.HashMap[String, PageVO]
+
+ msg.body.presentation.pages.foreach { p =>
+ val page = PageVO(p.id, p.num, p.thumbUri, p.swfUri, p.txtUri, p.svgUri, p.current, p.xOffset, p.yOffset,
+ p.widthRatio, p.heightRatio)
+ pages += page.id -> page
+ }
+
+ val pres = new Presentation(msg.body.presentation.id, msg.body.presentation.name, msg.body.presentation.current,
+ pages.toMap, msg.body.presentation.downloadable)
+
+ log.debug("PresentationConversionCompletedPubMsg name={}", pres.name)
+
+ presentationConversionCompleted(pres)
+ broadcastEvent(msg)
+ }
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationConversionUpdatePubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationConversionUpdatePubMsgHdlr.scala
new file mode 100755
index 0000000000..81442c8fcb
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationConversionUpdatePubMsgHdlr.scala
@@ -0,0 +1,29 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.PresentationConversionUpdateEvtMsgBody
+import org.bigbluebutton.common2.messages._
+
+trait PresentationConversionUpdatePubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handlePresentationConversionUpdatePubMsg(msg: PresentationConversionUpdatePubMsg): Unit = {
+
+ def broadcastEvent(msg: PresentationConversionUpdatePubMsg): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(PresentationConversionUpdateEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(PresentationConversionUpdateEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = PresentationConversionUpdateEvtMsgBody(msg.body.messageKey, msg.body.code, msg.body.presentationId, msg.body.presName)
+ val event = PresentationConversionUpdateEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ broadcastEvent(msg)
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationPageCountErrorPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationPageCountErrorPubMsgHdlr.scala
new file mode 100755
index 0000000000..cc332ab081
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationPageCountErrorPubMsgHdlr.scala
@@ -0,0 +1,29 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.PresentationPageCountErrorEvtMsgBody
+import org.bigbluebutton.common2.messages._
+
+trait PresentationPageCountErrorPubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handlePresentationPageCountErrorPubMsg(msg: PresentationPageCountErrorPubMsg): Unit = {
+
+ def broadcastEvent(msg: PresentationPageCountErrorPubMsg): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(PresentationPageCountErrorEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(PresentationPageCountErrorEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = PresentationPageCountErrorEvtMsgBody(msg.body.messageKey, msg.body.code, msg.body.presentationId, msg.body.numberOfPages, msg.body.maxNumberPages, msg.body.presName)
+ val event = PresentationPageCountErrorEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ broadcastEvent(msg)
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationPageGeneratedPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationPageGeneratedPubMsgHdlr.scala
new file mode 100755
index 0000000000..246c2b94dd
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PresentationPageGeneratedPubMsgHdlr.scala
@@ -0,0 +1,29 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.PresentationPageGeneratedEvtMsgBody
+import org.bigbluebutton.common2.messages._
+
+trait PresentationPageGeneratedPubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handlePresentationPageGeneratedPubMsg(msg: PresentationPageGeneratedPubMsg): Unit = {
+
+ def broadcastEvent(msg: PresentationPageGeneratedPubMsg): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(PresentationPageGeneratedEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(PresentationPageGeneratedEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = PresentationPageGeneratedEvtMsgBody(msg.body.messageKey, msg.body.code, msg.body.presentationId, msg.body.numberOfPages, msg.body.pagesCompleted, msg.body.presName)
+ val event = PresentationPageGeneratedEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ broadcastEvent(msg)
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PreuploadedPresentationsPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PreuploadedPresentationsPubMsgHdlr.scala
new file mode 100755
index 0000000000..7f755e5258
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/PreuploadedPresentationsPubMsgHdlr.scala
@@ -0,0 +1,37 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.common2.domain.PageVO
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.core.apps.Presentation
+
+trait PreuploadedPresentationsPubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handlePreuploadedPresentationsPubMsg(msg: PreuploadedPresentationsPubMsg): Unit = {
+
+ val presos = new collection.mutable.HashMap[String, Presentation]
+
+ msg.body.presentations.foreach { pres =>
+ val pages = new collection.mutable.HashMap[String, PageVO]()
+
+ pres.pages.foreach { p =>
+ val page = new PageVO(p.id, p.num, p.thumbUri, p.swfUri, p.txtUri, p.svgUri, p.current, p.xOffset, p.yOffset,
+ p.widthRatio, p.heightRatio)
+ pages += page.id -> page
+ }
+
+ val pr = new Presentation(pres.id, pres.name, pres.current,
+ pages.toMap, pres.downloadable)
+ presos += pres.id -> pr
+ }
+
+ processPreuploadedPresentations(presos.values.toVector)
+
+ msg.body.presentations foreach (presentation => {
+ broadcastNewPresentationEvent(msg.header.userId, presentation)
+ })
+ }
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/RemovePresentationPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/RemovePresentationPubMsgHdlr.scala
new file mode 100755
index 0000000000..79a504383c
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/RemovePresentationPubMsgHdlr.scala
@@ -0,0 +1,33 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.RemovePresentationEvtMsgBody
+import org.bigbluebutton.common2.messages._
+
+trait RemovePresentationPubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handleRemovePresentationPubMsg(msg: RemovePresentationPubMsg): Unit = {
+
+ def broadcastEvent(msg: RemovePresentationPubMsg): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(RemovePresentationEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(RemovePresentationEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = RemovePresentationEvtMsgBody(msg.body.presentationId)
+ val event = RemovePresentationEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ for {
+ presentation <- removePresentation(msg.body.presentationId)
+ } yield {
+ broadcastEvent(msg)
+ }
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/ResizeAndMovePagePubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/ResizeAndMovePagePubMsgHdlr.scala
new file mode 100755
index 0000000000..e7d6dba15d
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/ResizeAndMovePagePubMsgHdlr.scala
@@ -0,0 +1,34 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.ResizeAndMovePageEvtMsgBody
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.domain.PageVO
+
+trait ResizeAndMovePagePubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handleResizeAndMovePagePubMsg(msg: ResizeAndMovePagePubMsg): Unit = {
+
+ def broadcastEvent(msg: ResizeAndMovePagePubMsg, page: PageVO): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(ResizeAndMovePageEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(ResizeAndMovePageEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = ResizeAndMovePageEvtMsgBody(msg.body.presentationId, page.id, page.xOffset, page.yOffset, page.widthRatio, page.heightRatio)
+ val event = ResizeAndMovePageEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ for {
+ page <- resizeAndMovePage(msg.body.presentationId, msg.body.pageId, msg.body.xOffset, msg.body.yOffset, msg.body.widthRatio, msg.body.heightRatio)
+ } yield {
+ broadcastEvent(msg, page)
+ }
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/SetCurrentPagePubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/SetCurrentPagePubMsgHdlr.scala
new file mode 100755
index 0000000000..18e683eeec
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/SetCurrentPagePubMsgHdlr.scala
@@ -0,0 +1,31 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.SetCurrentPageEvtMsgBody
+import org.bigbluebutton.common2.messages._
+
+trait SetCurrentPagePubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handleSetCurrentPagePubMsg(msg: SetCurrentPagePubMsg): Unit = {
+
+ def broadcastEvent(msg: SetCurrentPagePubMsg): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(SetCurrentPageEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(SetCurrentPageEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = SetCurrentPageEvtMsgBody(msg.body.presentationId, msg.body.pageId)
+ val event = SetCurrentPageEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ if (setCurrentPage(msg.body.presentationId, msg.body.pageId)) {
+ broadcastEvent(msg)
+ }
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/SetCurrentPresentationPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/SetCurrentPresentationPubMsgHdlr.scala
new file mode 100755
index 0000000000..cfdf9ecfe6
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentation/SetCurrentPresentationPubMsgHdlr.scala
@@ -0,0 +1,33 @@
+package org.bigbluebutton.core.apps.presentation
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.common2.messages.MessageBody.SetCurrentPresentationEvtMsgBody
+import org.bigbluebutton.common2.messages._
+
+trait SetCurrentPresentationPubMsgHdlr {
+ this: PresentationApp2x =>
+
+ val outGW: OutMessageGateway
+
+ def handleSetCurrentPresentationPubMsg(msg: SetCurrentPresentationPubMsg): Unit = {
+
+ def broadcastEvent(msg: SetCurrentPresentationPubMsg): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(SetCurrentPresentationEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(SetCurrentPresentationEvtMsg.NAME, liveMeeting.props.meetingProp.intId, msg.header.userId)
+
+ val body = SetCurrentPresentationEvtMsgBody(msg.body.presentationId)
+ val event = SetCurrentPresentationEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ //record(event)
+ }
+
+ for {
+ presentation <- setCurrentPresentation(msg.body.presentationId)
+ } yield {
+ broadcastEvent(msg)
+ }
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/GuestsWaiting.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/GuestsWaiting.scala
new file mode 100755
index 0000000000..8ea1a0c4fb
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/GuestsWaiting.scala
@@ -0,0 +1,40 @@
+package org.bigbluebutton.core.models
+
+object GuestsWaiting {
+ def findWithIntId(guests: GuestsWaiting, intId: String): Option[GuestWaiting] = {
+ guests.toVector find (u => u.intId == intId)
+ }
+
+ def findAll(guests: GuestsWaiting): Vector[GuestWaiting] = guests.toVector
+
+ def add(guests: GuestsWaiting, user: GuestWaiting): Option[GuestWaiting] = {
+ guests.save(user)
+ Some(user)
+ }
+
+ def remove(guests: GuestsWaiting, intId: String): Option[GuestWaiting] = {
+ guests.remove(intId)
+ }
+}
+
+class GuestsWaiting {
+ private var guests: collection.immutable.HashMap[String, GuestWaiting] = new collection.immutable.HashMap[String, GuestWaiting]
+
+ private def toVector: Vector[GuestWaiting] = guests.values.toVector
+
+ private def save(user: GuestWaiting): GuestWaiting = {
+ guests += user.intId -> user
+ user
+ }
+
+ private def remove(id: String): Option[GuestWaiting] = {
+ for {
+ user <- guests.get(id)
+ } yield {
+ guests -= id
+ user
+ }
+ }
+}
+
+case class GuestWaiting(intId: String, name: String, role: String)
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala
new file mode 100644
index 0000000000..bdf0303f44
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala
@@ -0,0 +1,31 @@
+package org.bigbluebutton.core.models
+
+object Layouts {
+ private var setByUser: String = "system";
+ private var currentLayout = "";
+ // this is not being set by the client, and we need to apply the layouts to all users, not just viewers, so will keep the default value of this as false
+ private var affectViewersOnly = false
+
+ def setCurrentLayout(layout: String) {
+ currentLayout = layout
+ }
+
+ def getCurrentLayout(): String = {
+ currentLayout
+ }
+
+ def applyToViewersOnly(viewersOnly: Boolean) {
+ affectViewersOnly = viewersOnly
+ }
+
+ def doesLayoutApplyToViewersOnly(): Boolean = {
+ affectViewersOnly
+ }
+
+ def getLayoutSetter(): String = {
+ setByUser
+ }
+}
+
+class Layouts {
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala
index 81f14bf672..9035ee93a6 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala
@@ -1,69 +1,71 @@
-package org.bigbluebutton.core.models
-
-object RegisteredUsers {
- def create(userId: String, extId: String, name: String, roles: String,
- token: String, avatar: String, guest: Boolean, authenticated: Boolean,
- waitingForAcceptance: Boolean, users: RegisteredUsers): RegisteredUser = {
- val ru = new RegisteredUser(userId, extId, name, roles, token, avatar, guest, authenticated, waitingForAcceptance)
- users.save(ru)
- ru
- }
-
- def findWithToken(token: String, users: RegisteredUsers): Option[RegisteredUser] = {
- users.toVector.find(u => u.authToken == token)
- }
-
- def findWithUserId(id: String, users: RegisteredUsers): Option[RegisteredUser] = {
- users.toVector.find(ru => id == ru.id)
- }
-
- def getRegisteredUserWithToken(token: String, userId: String, regUsers: RegisteredUsers): Option[RegisteredUser] = {
- def isSameUserId(ru: RegisteredUser, userId: String): Option[RegisteredUser] = {
- if (userId.startsWith(ru.id)) {
- Some(ru)
- } else {
- None
- }
- }
-
- for {
- ru <- RegisteredUsers.findWithToken(token, regUsers)
- user <- isSameUserId(ru, userId)
- } yield user
- }
-
- def updateRegUser(uvo: UserVO, users: RegisteredUsers) {
- for {
- ru <- RegisteredUsers.findWithUserId(uvo.id, users)
- regUser = new RegisteredUser(uvo.id, uvo.externalId, uvo.name, uvo.role, ru.authToken,
- uvo.avatarURL, uvo.guest, uvo.authed, uvo.waitingForAcceptance)
- } yield users.save(regUser)
- }
-
- def remove(id: String, users: RegisteredUsers): Option[RegisteredUser] = {
- users.delete(id)
- }
-
-}
-
-class RegisteredUsers {
- private var regUsers = new collection.immutable.HashMap[String, RegisteredUser]
-
- private def toVector: Vector[RegisteredUser] = regUsers.values.toVector
-
- private def save(user: RegisteredUser): Vector[RegisteredUser] = {
- regUsers += user.authToken -> user
- regUsers.values.toVector
- }
-
- private def delete(id: String): Option[RegisteredUser] = {
- val ru = regUsers.get(id)
- ru foreach { u => regUsers -= u.authToken }
- ru
- }
-}
-
-case class RegisteredUser(id: String, externId: String, name: String, role: String,
- authToken: String, avatarURL: String, guest: Boolean,
- authed: Boolean, waitingForAcceptance: Boolean)
-
+package org.bigbluebutton.core.models
+
+import org.bigbluebutton.common2.domain.UserVO
+
+object RegisteredUsers {
+ def create(userId: String, extId: String, name: String, roles: String,
+ token: String, avatar: String, guest: Boolean, authenticated: Boolean,
+ waitingForAcceptance: Boolean, users: RegisteredUsers): RegisteredUser = {
+ val ru = new RegisteredUser(userId, extId, name, roles, token, avatar, guest, authenticated, waitingForAcceptance)
+ users.save(ru)
+ ru
+ }
+
+ def findWithToken(token: String, users: RegisteredUsers): Option[RegisteredUser] = {
+ users.toVector.find(u => u.authToken == token)
+ }
+
+ def findWithUserId(id: String, users: RegisteredUsers): Option[RegisteredUser] = {
+ users.toVector.find(ru => id == ru.id)
+ }
+
+ def getRegisteredUserWithToken(token: String, userId: String, regUsers: RegisteredUsers): Option[RegisteredUser] = {
+ def isSameUserId(ru: RegisteredUser, userId: String): Option[RegisteredUser] = {
+ if (userId.startsWith(ru.id)) {
+ Some(ru)
+ } else {
+ None
+ }
+ }
+
+ for {
+ ru <- RegisteredUsers.findWithToken(token, regUsers)
+ user <- isSameUserId(ru, userId)
+ } yield user
+ }
+
+ def updateRegUser(uvo: UserVO, users: RegisteredUsers) {
+ for {
+ ru <- RegisteredUsers.findWithUserId(uvo.id, users)
+ regUser = new RegisteredUser(uvo.id, uvo.externalId, uvo.name, uvo.role, ru.authToken,
+ uvo.avatarURL, uvo.guest, uvo.authed, uvo.waitingForAcceptance)
+ } yield users.save(regUser)
+ }
+
+ def remove(id: String, users: RegisteredUsers): Option[RegisteredUser] = {
+ users.delete(id)
+ }
+
+}
+
+class RegisteredUsers {
+ private var regUsers = new collection.immutable.HashMap[String, RegisteredUser]
+
+ private def toVector: Vector[RegisteredUser] = regUsers.values.toVector
+
+ private def save(user: RegisteredUser): Vector[RegisteredUser] = {
+ regUsers += user.authToken -> user
+ regUsers.values.toVector
+ }
+
+ private def delete(id: String): Option[RegisteredUser] = {
+ val ru = regUsers.get(id)
+ ru foreach { u => regUsers -= u.authToken }
+ ru
+ }
+}
+
+case class RegisteredUser(id: String, externId: String, name: String, role: String,
+ authToken: String, avatarURL: String, guest: Boolean,
+ authed: Boolean, waitingForAcceptance: Boolean)
+
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users.scala
index 1c068d44e8..084dc37505 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users.scala
@@ -1,11 +1,16 @@
package org.bigbluebutton.core.models
import scala.collection.immutable.ListSet
-
import org.bigbluebutton.core.util.RandomStringGenerator
-
import com.softwaremill.quicklens.ModifyPimp
import com.softwaremill.quicklens.modify
+import org.bigbluebutton.common2.domain.{ UserVO, VoiceUserVO }
+
+object CallingWith {
+ val WEBRTC = "webrtc"
+ val FLASH = "flash"
+ val PHONE = "phone"
+}
object Roles {
val MODERATOR_ROLE = "MODERATOR"
@@ -17,7 +22,7 @@ object Roles {
object Users {
def newUser(userId: String, lockStatus: Boolean, ru: RegisteredUser, waitingForAcceptance: Boolean,
- vu: VoiceUser, users: Users): Option[UserVO] = {
+ vu: VoiceUserVO, users: Users): Option[UserVO] = {
val uvo = new UserVO(userId, ru.externId, ru.name,
ru.role, ru.guest, ru.authed, waitingForAcceptance = waitingForAcceptance, emojiStatus = "none", presenter = false,
hasStream = false, locked = lockStatus,
@@ -189,7 +194,7 @@ object Users {
}
def resetVoiceUser(user: UserVO, users: Users): UserVO = {
- val vu = new VoiceUser(user.id, user.id, user.name, user.name,
+ val vu = new VoiceUserVO(user.id, user.id, user.name, user.name,
joined = false, locked = false, muted = false, talking = false, user.avatarURL, listenOnly = false)
val nu = user.modify(_.voiceUser).setTo(vu)
@@ -202,7 +207,7 @@ object Users {
def switchUserToPhoneUser(user: UserVO, users: Users, voiceUserId: String, userId: String,
callerIdName: String, callerIdNum: String, muted: Boolean, talking: Boolean,
avatarURL: String, listenOnly: Boolean): UserVO = {
- val vu = new VoiceUser(voiceUserId, userId, callerIdName,
+ val vu = new VoiceUserVO(voiceUserId, userId, callerIdName,
callerIdNum, joined = true, locked = false,
muted, talking, avatarURL, listenOnly)
val nu = user.modify(_.voiceUser).setTo(vu)
@@ -214,7 +219,7 @@ object Users {
def restoreMuteState(user: UserVO, users: Users, voiceUserId: String, userId: String,
callerIdName: String, callerIdNum: String, muted: Boolean, talking: Boolean,
avatarURL: String, listenOnly: Boolean): UserVO = {
- val vu = new VoiceUser(voiceUserId, userId, callerIdName,
+ val vu = new VoiceUserVO(voiceUserId, userId, callerIdName,
callerIdNum, joined = true, locked = false,
muted, talking, avatarURL, listenOnly)
val nu = user.modify(_.voiceUser).setTo(vu)
@@ -223,7 +228,7 @@ object Users {
nu
}
- def makeUserPhoneUser(vu: VoiceUser, users: Users, webUserId: String, externUserId: String,
+ def makeUserPhoneUser(vu: VoiceUserVO, users: Users, webUserId: String, externUserId: String,
callerIdName: String, lockStatus: Boolean, listenOnly: Boolean, avatarURL: String): UserVO = {
val uvo = new UserVO(webUserId, externUserId, callerIdName,
Roles.VIEWER_ROLE, guest = false, authed = false, waitingForAcceptance = false, emojiStatus = "none", presenter = false,
@@ -256,6 +261,7 @@ class Users {
case class UserIdAndName(id: String, name: String)
+/*
case class UserVO(id: String, externalId: String, name: String, role: String,
guest: Boolean, authed: Boolean, waitingForAcceptance: Boolean, emojiStatus: String,
presenter: Boolean, hasStream: Boolean, locked: Boolean, webcamStreams: Set[String],
@@ -265,3 +271,4 @@ case class UserVO(id: String, externalId: String, name: String, role: String,
case class VoiceUser(userId: String, webUserId: String, callerName: String,
callerNum: String, joined: Boolean, locked: Boolean, muted: Boolean,
talking: Boolean, avatarURL: String, listenOnly: Boolean)
+*/
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala
index 342c9060bf..074453a516 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala
@@ -45,14 +45,35 @@ object Users2x {
for {
u <- findWithIntId(users, intId)
} yield {
- val newUser = u.modify(_.presenter).setTo(true).modify(_.role).setTo(Roles.PRESENTER_ROLE)
+ val newUser = u.modify(_.presenter).setTo(true)
+ users.save(newUser)
newUser
}
}
+ def setEmojiStatus(users: Users2x, intId: String, emoji: String): Option[UserState] = {
+ for {
+ u <- findWithIntId(users, intId)
+ } yield {
+ val newUser = u.modify(_.emoji).setTo(emoji)
+ users.save(newUser)
+ newUser
+ }
+ }
+
+ def hasPresenter(users: Users2x): Boolean = {
+ findPresenter(users) match {
+ case Some(p) => true
+ case None => false
+ }
+ }
+
+ def findPresenter(users: Users2x): Option[UserState] = {
+ users.toVector.find(u => u.presenter)
+ }
+
def findModerator(users: Users2x): Option[UserState] = {
- val mods = users.toVector.filter(u => u.role == Roles.MODERATOR_ROLE)
- if (mods.length > 1) Some(mods.head) else None
+ users.toVector.find(u => u.role == Roles.MODERATOR_ROLE)
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/VoiceUsers.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/VoiceUsers.scala
index cd9fe208a3..e6a0b6e853 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/VoiceUsers.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/VoiceUsers.scala
@@ -4,7 +4,7 @@ import com.softwaremill.quicklens._
object VoiceUsers {
def findWithVoiceUserId(users: VoiceUsers, voiceUserId: String): Option[VoiceUserState] = {
- users.toVector find (u => u.intId == voiceUserId)
+ users.toVector find (u => u.voiceUserId == voiceUserId)
}
def findWIthIntId(users: VoiceUsers, intId: String): Option[VoiceUserState] = {
@@ -25,6 +25,30 @@ object VoiceUsers {
users.toVector.find(u => u.intId == intId)
}
+ def userMuted(users: VoiceUsers, voiceUserId: String, muted: Boolean): Option[VoiceUserState] = {
+ for {
+ u <- findWithVoiceUserId(users, voiceUserId)
+ } yield {
+ val vu = u.modify(_.muted).setTo(muted)
+ .modify(_.talking).setTo(false)
+ .modify(_.listenOnly).setTo(false)
+ users.save(vu)
+ vu
+ }
+ }
+
+ def userTalking(users: VoiceUsers, voiceUserId: String, talkng: Boolean): Option[VoiceUserState] = {
+ for {
+ u <- findWithVoiceUserId(users, voiceUserId)
+ } yield {
+ val vu = u.modify(_.muted).setTo(false)
+ .modify(_.talking).setTo(talkng)
+ .modify(_.listenOnly).setTo(false)
+ users.save(vu)
+ vu
+ }
+ }
+
def joinedVoiceListenOnly(users: VoiceUsers, userId: String): Option[VoiceUserState] = {
for {
u <- findWIthIntId(users, userId)
@@ -95,4 +119,4 @@ class VoiceUsers {
case class VoiceUser2x(intId: String, voiceUserId: String)
case class VoiceUserVO2x(intId: String, voiceUserId: String, callerName: String,
callerNum: String, joined: Boolean, locked: Boolean, muted: Boolean,
- talking: Boolean, callingWith: String, listenOnly: Boolean)
\ No newline at end of file
+ talking: Boolean, callingWith: String, listenOnly: Boolean)
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/PesentationMessageToJsonConverter.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/PesentationMessageToJsonConverter.scala
index 2b94be851c..906c593c00 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/PesentationMessageToJsonConverter.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/PesentationMessageToJsonConverter.scala
@@ -4,10 +4,10 @@ import org.bigbluebutton.core.api._
import org.bigbluebutton.core.messaging.Util
import org.bigbluebutton.core.apps.Page
import scala.collection.JavaConverters
-
object PesentationMessageToJsonConverter {
+ /*
private def pageToMap(page: Page): java.util.Map[String, Any] = {
- val res = new scala.collection.mutable.HashMap[String, Any]
+ val res = new scala.collection.mutable.Map[String, Any]
res += "id" -> page.id
res += "num" -> page.num
res += "thumb_uri" -> page.thumbUri
@@ -20,9 +20,9 @@ object PesentationMessageToJsonConverter {
res += "width_ratio" -> page.widthRatio
res += "height_ratio" -> page.heightRatio
- JavaConverters.mapAsJavaMap(res)
+ JavaConverters.mapAsScalaMap(res)
}
-
+*/
def clearPresentationOutMsgToJson(msg: ClearPresentationOutMsg): String = {
val payload = new java.util.HashMap[String, Any]()
payload.put(Constants.MEETING_ID, msg.meetingID)
@@ -67,9 +67,9 @@ object PesentationMessageToJsonConverter {
// Get the pages for a presentation
val pages = new java.util.ArrayList[java.util.Map[String, Any]]()
- pres.pages.values foreach { p =>
- pages.add(pageToMap(p))
- }
+ // pres.pages.values foreach { p =>
+ // pages.add(p)
+ // }
// store the pages in the presentation
presentation.put(Constants.PAGES, pages)
@@ -87,7 +87,7 @@ object PesentationMessageToJsonConverter {
def resizeAndMoveSlideOutMsgToJson(msg: ResizeAndMoveSlideOutMsg): String = {
val payload = new java.util.HashMap[String, Any]()
payload.put(Constants.MEETING_ID, msg.meetingID)
- payload.put(Constants.PAGE, pageToMap(msg.page))
+ // payload.put(Constants.PAGE, pageToMap(msg.page))
val header = Util.buildHeader(MessageNames.PRESENTATION_PAGE_RESIZED, None)
Util.buildJson(header, payload)
@@ -96,7 +96,7 @@ object PesentationMessageToJsonConverter {
def gotoSlideOutMsgToJson(msg: GotoSlideOutMsg): String = {
val payload = new java.util.HashMap[String, Any]()
payload.put(Constants.MEETING_ID, msg.meetingID)
- payload.put(Constants.PAGE, pageToMap(msg.page))
+ // payload.put(Constants.PAGE, pageToMap(msg.page))
val header = Util.buildHeader(MessageNames.PRESENTATION_PAGE_CHANGED, None)
Util.buildJson(header, payload)
@@ -114,9 +114,9 @@ object PesentationMessageToJsonConverter {
// Get the pages for a presentation
val pages = new java.util.ArrayList[java.util.Map[String, Any]]()
- msg.presentation.pages.values foreach { p =>
- pages.add(pageToMap(p))
- }
+ // msg.presentation.pages.values foreach { p =>
+ // pages.add(pageToMap(p))
+ // }
// store the pages in the presentation
presentation.put(Constants.PAGES, pages)
@@ -131,7 +131,7 @@ object PesentationMessageToJsonConverter {
val payload = new java.util.HashMap[String, Any]()
payload.put(Constants.MEETING_ID, msg.meetingID)
payload.put(Constants.REQUESTER_ID, msg.requesterID)
- payload.put(Constants.PAGE, pageToMap(msg.page))
+ // payload.put(Constants.PAGE, pageToMap(msg.page))
val header = Util.buildHeader(MessageNames.GET_SLIDE_INFO_REPLY, None)
Util.buildJson(header, payload)
@@ -198,9 +198,9 @@ object PesentationMessageToJsonConverter {
presentation.put(Constants.DOWNLOADABLE, msg.presentation.downloadable: java.lang.Boolean)
val pages = new java.util.ArrayList[java.util.Map[String, Any]]()
- msg.presentation.pages.values foreach { p =>
- pages.add(pageToMap(p))
- }
+ // msg.presentation.pages.values foreach { p =>
+ // pages.add(pageToMap(p))
+ // }
presentation.put(Constants.PAGES, pages)
@@ -220,9 +220,9 @@ object PesentationMessageToJsonConverter {
presentation.put(Constants.DOWNLOADABLE, msg.presentation.downloadable: java.lang.Boolean)
val pages = new java.util.ArrayList[java.util.Map[String, Any]]()
- msg.presentation.pages.values foreach { p =>
- pages.add(pageToMap(p))
- }
+ // msg.presentation.pages.values foreach { p =>
+ // pages.add(pageToMap(p))
+ // }
presentation.put(Constants.PAGES, pages)
payload.put(Constants.PRESENTATION, presentation);
@@ -243,9 +243,9 @@ object PesentationMessageToJsonConverter {
val pages = new java.util.ArrayList[java.util.Map[String, Any]]()
- msg.current.pages.values foreach { p =>
- pages.add(pageToMap(p))
- }
+ // msg.current.pages.values foreach { p =>
+ // pages.add(pageToMap(p))
+ // }
presentation.put(Constants.PAGES, pages)
@@ -267,9 +267,9 @@ object PesentationMessageToJsonConverter {
def pageChangedToJson(msg: PageChanged): String = {
val payload = new java.util.HashMap[String, Any]()
payload.put(Constants.MEETING_ID, msg.meetingID)
- payload.put(Constants.PAGE, pageToMap(msg.page))
+ // payload.put(Constants.PAGE, pageToMap(msg.page))
val header = Util.buildHeader(MessageNames.PRESENTATION_PAGE_CHANGED, None)
Util.buildJson(header, payload)
}
-}
\ No newline at end of file
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala
index 54764dc306..5eb2ac514c 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala
@@ -5,9 +5,15 @@ import org.bigbluebutton.SystemConfiguration
import com.fasterxml.jackson.databind.JsonNode
import org.bigbluebutton.common2.messages._
import org.bigbluebutton.common2.messages.breakoutrooms._
+import org.bigbluebutton.common2.messages.caption._
+import org.bigbluebutton.common2.messages.polls._
+import org.bigbluebutton.common2.messages.users._
+import org.bigbluebutton.common2.messages.layout._
import org.bigbluebutton.common2.messages.voiceconf._
+import org.bigbluebutton.common2.messages.whiteboard._
import org.bigbluebutton.core.bus._
import org.bigbluebutton.core2.ReceivedMessageRouter
+
import scala.reflect.runtime.universe._
object ReceivedJsonMsgHandlerActor {
@@ -45,7 +51,9 @@ class ReceivedJsonMsgHandlerActor(
}
def handle(envelope: BbbCoreEnvelope, jsonNode: JsonNode): Unit = {
- log.debug("Route envelope name " + envelope.name)
+ if (SendCursorPositionPubMsg.NAME != envelope.name)
+ log.debug("Route envelope name " + envelope.name)
+
envelope.name match {
case CreateMeetingReqMsg.NAME =>
// for {
@@ -213,6 +221,30 @@ class ReceivedJsonMsgHandlerActor(
} yield {
send(m.header.meetingId, envelope, m)
}
+ case GetCurrentLayoutMsg.NAME =>
+ for {
+ m <- deserialize[GetCurrentLayoutMsg](jsonNode)
+ } yield {
+ send(m.header.meetingId, envelope, m)
+ }
+ case LockLayoutMsg.NAME =>
+ for {
+ m <- deserialize[LockLayoutMsg](jsonNode)
+ } yield {
+ send(m.header.meetingId, envelope, m)
+ }
+ case BroadcastLayoutMsg.NAME =>
+ for {
+ m <- deserialize[BroadcastLayoutMsg](jsonNode)
+ } yield {
+ send(m.header.meetingId, envelope, m)
+ }
+ case UserLeaveReqMsg.NAME =>
+ for {
+ m <- deserialize[UserLeaveReqMsg](jsonNode)
+ } yield {
+ send(m.header.meetingId, envelope, m)
+ }
case SendCursorPositionPubMsg.NAME =>
routeGenericMsg[SendCursorPositionPubMsg](envelope, jsonNode)
case ModifyWhiteboardAccessPubMsg.NAME =>
@@ -227,6 +259,26 @@ class ReceivedJsonMsgHandlerActor(
routeGenericMsg[SendWhiteboardAnnotationPubMsg](envelope, jsonNode)
case GetWhiteboardAnnotationsReqMsg.NAME =>
routeGenericMsg[GetWhiteboardAnnotationsReqMsg](envelope, jsonNode)
+ case SetCurrentPresentationPubMsg.NAME =>
+ routeGenericMsg[SetCurrentPresentationPubMsg](envelope, jsonNode)
+ case GetPresentationInfoReqMsg.NAME =>
+ routeGenericMsg[GetPresentationInfoReqMsg](envelope, jsonNode)
+ case SetCurrentPagePubMsg.NAME =>
+ routeGenericMsg[SetCurrentPagePubMsg](envelope, jsonNode)
+ case ResizeAndMovePagePubMsg.NAME =>
+ routeGenericMsg[ResizeAndMovePagePubMsg](envelope, jsonNode)
+ case RemovePresentationPubMsg.NAME =>
+ routeGenericMsg[RemovePresentationPubMsg](envelope, jsonNode)
+ case PreuploadedPresentationsPubMsg.NAME =>
+ routeGenericMsg[PreuploadedPresentationsPubMsg](envelope, jsonNode)
+ case PresentationConversionUpdatePubMsg.NAME =>
+ routeGenericMsg[PresentationConversionUpdatePubMsg](envelope, jsonNode)
+ case PresentationPageCountErrorPubMsg.NAME =>
+ routeGenericMsg[PresentationPageCountErrorPubMsg](envelope, jsonNode)
+ case PresentationPageGeneratedPubMsg.NAME =>
+ routeGenericMsg[PresentationPageGeneratedPubMsg](envelope, jsonNode)
+ case PresentationConversionCompletedPubMsg.NAME =>
+ routeGenericMsg[PresentationConversionCompletedPubMsg](envelope, jsonNode)
case EditCaptionHistoryPubMsg.NAME =>
routeGenericMsg[EditCaptionHistoryPubMsg](envelope, jsonNode)
case UpdateCaptionOwnerPubMsg.NAME =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/UsersMessageToJsonConverter.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/UsersMessageToJsonConverter.scala
index 8ab88afafd..554b3f9bee 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/UsersMessageToJsonConverter.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/UsersMessageToJsonConverter.scala
@@ -1,9 +1,11 @@
package org.bigbluebutton.core.pubsub.senders
+import scala.collection.JavaConverters._
+
+import org.bigbluebutton.common2.domain.UserVO
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.messaging.Util
-import org.bigbluebutton.core.models.{ RegisteredUser, UserVO }
-import scala.collection.JavaConverters._
+import org.bigbluebutton.core.models.RegisteredUser
object UsersMessageToJsonConverter {
private def userToMap(user: UserVO): java.util.Map[String, Any] = {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/LiveMeeting.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/LiveMeeting.scala
index 928887fb0b..7cb52eeb3a 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/LiveMeeting.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/LiveMeeting.scala
@@ -12,6 +12,7 @@ class LiveMeeting(val props: DefaultProps,
val status: MeetingStatus2x,
val chatModel: ChatModel,
val layoutModel: LayoutModel,
+ val layouts: Layouts,
val users: Users,
val registeredUsers: RegisteredUsers,
val polls: Polls, // 2x
@@ -23,7 +24,8 @@ class LiveMeeting(val props: DefaultProps,
val notesModel: SharedNotesModel,
val webcams: Webcams,
val voiceUsers: VoiceUsers,
- val users2x: Users2x)
+ val users2x: Users2x,
+ val guestsWaiting: GuestsWaiting)
extends ChatModelTrait {
def hasMeetingEnded(): Boolean = {
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala
index 7a3d07568b..a48437000a 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala
@@ -1,30 +1,38 @@
package org.bigbluebutton.core.running
import java.io.{ PrintWriter, StringWriter }
+
import akka.actor._
import akka.actor.ActorLogging
import akka.actor.SupervisorStrategy.Resume
import org.bigbluebutton.common2.domain.DefaultProps
-import org.bigbluebutton.common2.messages.MessageBody.ValidateAuthTokenRespMsgBody
import org.bigbluebutton.common2.messages._
import org.bigbluebutton.common2.messages.breakoutrooms._
-import org.bigbluebutton.common2.messages.voiceconf.UserJoinedVoiceConfEvtMsg
+import org.bigbluebutton.common2.messages.caption._
+import org.bigbluebutton.common2.messages.polls._
+import org.bigbluebutton.common2.messages.users._
+import org.bigbluebutton.common2.messages.voiceconf.{ UserJoinedVoiceConfEvtMsg, UserLeftVoiceConfEvtMsg, UserMutedInVoiceConfEvtMsg, UserTalkingInVoiceConfEvtMsg }
+import org.bigbluebutton.common2.messages.whiteboard._
+import org.bigbluebutton.common2.messages.layout._
import org.bigbluebutton.core._
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.apps._
+import org.bigbluebutton.core.apps.caption.CaptionApp2x
import org.bigbluebutton.core.apps.deskshare.DeskshareApp2x
import org.bigbluebutton.core.apps.presentation.PresentationApp2x
import org.bigbluebutton.core.apps.presentation.poll.PollApp2x
import org.bigbluebutton.core.apps.users.UsersApp2x
import org.bigbluebutton.core.bus._
-import org.bigbluebutton.core.models.{ RegisteredUsers, Users, Polls }
+import org.bigbluebutton.core.models.{ RegisteredUsers, Users }
import org.bigbluebutton.core2.MeetingStatus2x
import org.bigbluebutton.core2.message.handlers._
import org.bigbluebutton.core2.message.handlers.users._
+
import scala.concurrent.duration._
import org.bigbluebutton.core.models.BreakoutRooms
import org.bigbluebutton.core2.message.handlers.breakoutrooms._
-import org.bigbluebutton.core.apps.caption.CaptionApp2x
+import org.bigbluebutton.core2.testdata.FakeTestData
+import org.bigbluebutton.core2.message.handlers.layout._
object MeetingActor {
def props(props: DefaultProps,
@@ -42,13 +50,8 @@ class MeetingActor(val props: DefaultProps,
with BreakoutRoomApp
with SharedNotesApp with PermisssionCheck
with UserBroadcastCamStartMsgHdlr
- with StartCustomPollReqMsgHdlr
- with StopPollReqMsgHdlr
- with ShowPollResultReqMsgHdlr
- with HidePollResultReqMsgHdlr
- with GetCurrentPollReqMsgHdlr
- with RespondToPollReqMsgHdlr
with UserJoinedVoiceConfEvtMsgHdlr
+ with UserLeftVoiceConfEvtMsgHdlr
with UserJoinMeetingReqMsgHdlr
with StartPollReqMsgHdlr
with UserBroadcastCamStopMsgHdlr
@@ -59,20 +62,12 @@ class MeetingActor(val props: DefaultProps,
with IsMeetingMutedRequestHdlr
with MuteUserRequestHdlr
with EjectUserFromVoiceRequestHdlr
- with GetLockSettingsHdlr
- with SetLockSettingsHdlr
- with LockUserRequestHdlr
- with InitLockSettingsHdlr
- with InitAudioSettingsHdlr
- with UserEmojiStatusHdlr
- with EjectUserFromMeetingHdlr
- with UserShareWebcamHdlr
- with UserUnshareWebcamHdlr
- with ChangeUserStatusHdlr
- with GetUsersHdlr
- with UserJoiningHdlr
- with UserLeavingHdlr
- with ChangeUserRoleHdlr
+ with StartCustomPollReqMsgHdlr
+ with StopPollReqMsgHdlr
+ with RespondToPollReqMsgHdlr
+ with GetCurrentPollReqMsgHdlr
+ with HidePollResultReqMsgHdlr
+ with ShowPollResultReqMsgHdlr
with UserJoinedVoiceConfMessageHdlr
with ValidateAuthTokenReqMsgHdlr
with BreakoutRoomsListMsgHdlr
@@ -83,7 +78,12 @@ class MeetingActor(val props: DefaultProps,
with BreakoutRoomEndedMsgHdlr
with BreakoutRoomUsersUpdateMsgHdlr
with SendBreakoutUsersUpdateMsgHdlr
- with TransferUserToMeetingRequestHdlr {
+ with TransferUserToMeetingRequestHdlr
+ with UserMutedInVoiceConfEvtMsgHdlr
+ with UserTalkingInVoiceConfEvtMsgHdlr
+ with GetCurrentLayoutMsgHdlr
+ with LockLayoutMsgHdlr
+ with BroadcastLayoutMsgHdlr {
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case e: Exception => {
@@ -113,6 +113,11 @@ class MeetingActor(val props: DefaultProps,
val deskshareApp2x = new DeskshareApp2x(liveMeeting, outGW = outGW)
val captionApp2x = new CaptionApp2x(liveMeeting, outGW = outGW)
+ /*******************************************************************/
+ //object FakeTestData extends FakeTestData
+ //FakeTestData.createFakeUsers(liveMeeting)
+ /*******************************************************************/
+
def receive = {
//=============================
// 2x messages
@@ -125,34 +130,20 @@ class MeetingActor(val props: DefaultProps,
// old messages
case msg: ActivityResponse => handleActivityResponse(msg)
case msg: MonitorNumberOfUsers => handleMonitorNumberOfUsers(msg)
- case msg: ValidateAuthToken => handleValidateAuthToken(msg)
//case msg: RegisterUser => handleRegisterUser(msg)
- case msg: UserJoinedVoiceConfMessage => handleUserJoinedVoiceConfMessage(msg)
- case msg: UserLeftVoiceConfMessage => handleUserLeftVoiceConfMessage(msg)
- case msg: UserMutedInVoiceConfMessage => handleUserMutedInVoiceConfMessage(msg)
- case msg: UserTalkingInVoiceConfMessage => handleUserTalkingInVoiceConfMessage(msg)
case msg: VoiceConfRecordingStartedMessage => handleVoiceConfRecordingStartedMessage(msg)
- case msg: UserJoining => handleUserJoin(msg)
- case msg: UserLeaving => handleUserLeft(msg)
+
case msg: AssignPresenter => handleAssignPresenter(msg)
case msg: AllowUserToShareDesktop => handleAllowUserToShareDesktop(msg)
- case msg: GetUsers => handleGetUsers(msg)
- case msg: ChangeUserStatus => handleChangeUserStatus(msg)
- case msg: EjectUserFromMeeting => handle(msg)
+
case msg: UserEmojiStatus => handleUserEmojiStatus(msg)
- case msg: UserShareWebcam => handleUserShareWebcam(msg)
- case msg: UserUnshareWebcam => handleUserunshareWebcam(msg)
+
case msg: MuteMeetingRequest => handleMuteMeetingRequest(msg)
case msg: MuteAllExceptPresenterRequest => handleMuteAllExceptPresenterRequest(msg)
case msg: IsMeetingMutedRequest => handleIsMeetingMutedRequest(msg)
case msg: MuteUserRequest => handleMuteUserRequest(msg)
case msg: EjectUserFromVoiceRequest => handleEjectUserRequest(msg)
case msg: TransferUserToMeetingRequest => handleTransferUserToMeeting(msg)
- case msg: SetLockSettings => handleSetLockSettings(msg)
- case msg: GetLockSettings => handleGetLockSettings(msg)
- case msg: LockUserRequest => handleLockUserRequest(msg)
- case msg: InitLockSettings => handleInitLockSettings(msg)
- case msg: InitAudioSettings => handleInitAudioSettings(msg)
case msg: GetChatHistoryRequest => handleGetChatHistoryRequest(msg)
case msg: SendPublicMessageRequest => handleSendPublicMessageRequest(msg)
case msg: SendPrivateMessageRequest => handleSendPrivateMessageRequest(msg)
@@ -175,15 +166,7 @@ class MeetingActor(val props: DefaultProps,
case msg: PreuploadedPresentations => handlePreuploadedPresentations(msg)
case msg: SetRecordingStatus => handleSetRecordingStatus(msg)
case msg: GetRecordingStatus => handleGetRecordingStatus(msg)
- case msg: StartCustomPollRequest => handleStartCustomPollRequest(msg)
- case msg: StartPollRequest => handleStartPollRequest(msg)
- case msg: StopPollRequest => handleStopPollRequest(msg)
- case msg: ShowPollResultRequest => handleShowPollResultRequest(msg)
- case msg: HidePollResultRequest => handleHidePollResultRequest(msg)
- case msg: RespondToPollRequest => handleRespondToPollRequest(msg)
case msg: GetPollRequest => handleGetPollRequest(msg)
- case msg: GetCurrentPollRequest => handleGetCurrentPollRequest(msg)
- case msg: ChangeUserRole => handle(msg)
case msg: LogoutEndMeeting => handleLogoutEndMeeting(msg)
case msg: ClearPublicChatHistoryRequest => handleClearPublicChatHistoryRequest(msg)
@@ -228,6 +211,7 @@ class MeetingActor(val props: DefaultProps,
case m: ValidateAuthTokenReqMsg => handleValidateAuthTokenReqMsg(m)
case m: RegisterUserReqMsg => handleRegisterUserReqMsg(m)
case m: UserJoinMeetingReqMsg => handle(m)
+ case m: UserLeaveReqMsg => handle(m)
case m: UserBroadcastCamStartMsg => handleUserBroadcastCamStartMsg(m)
case m: UserBroadcastCamStopMsg => handleUserBroadcastCamStopMsg(m)
case m: UserJoinedVoiceConfEvtMsg => handleUserJoinedVoiceConfEvtMsg(m)
@@ -248,16 +232,32 @@ class MeetingActor(val props: DefaultProps,
case m: BreakoutRoomsListMsg => handleBreakoutRoomsListMsg(m)
case m: CreateBreakoutRoomsMsg => handleCreateBreakoutRoomsMsg(m)
case m: EndAllBreakoutRoomsMsg => handleEndAllBreakoutRoomsMsg(m)
- case m: RequestBreakoutJoinURLMsg => handleRequestBreakoutJoinURLMsg(m);
- case m: BreakoutRoomCreatedMsg => handleBreakoutRoomCreatedMsg(m);
+ case m: RequestBreakoutJoinURLMsg => handleRequestBreakoutJoinURLMsg(m)
+ case m: BreakoutRoomCreatedMsg => handleBreakoutRoomCreatedMsg(m)
case m: BreakoutRoomEndedMsg => handleBreakoutRoomEndedMsg(m)
case m: BreakoutRoomUsersUpdateMsg => handleBreakoutRoomUsersUpdateMsg(m)
case m: SendBreakoutUsersUpdateMsg => handleSendBreakoutUsersUpdateMsg(m)
case m: TransferUserToMeetingRequestMsg => handleTransferUserToMeetingRequestMsg(m)
+ case m: UserLeftVoiceConfEvtMsg => handle(m)
+ case m: UserMutedInVoiceConfEvtMsg => handle(m)
+ case m: UserTalkingInVoiceConfEvtMsg => handle(m)
+ case m: GetCurrentLayoutMsg => handleGetCurrentLayoutMsg(m)
+ case m: LockLayoutMsg => handleLockLayoutMsg(m)
+ case m: BroadcastLayoutMsg => handleBroadcastLayoutMsg(m)
+ case m: SetCurrentPresentationPubMsg => presentationApp2x.handleSetCurrentPresentationPubMsg(m)
+ case m: GetPresentationInfoReqMsg => presentationApp2x.handleGetPresentationInfoReqMsg(m)
+ case m: SetCurrentPagePubMsg => presentationApp2x.handleSetCurrentPagePubMsg(m)
+ case m: ResizeAndMovePagePubMsg => presentationApp2x.handleResizeAndMovePagePubMsg(m)
+ case m: RemovePresentationPubMsg => presentationApp2x.handleRemovePresentationPubMsg(m)
+ case m: PreuploadedPresentationsPubMsg => presentationApp2x.handlePreuploadedPresentationsPubMsg(m)
+ case m: PresentationConversionUpdatePubMsg => presentationApp2x.handlePresentationConversionUpdatePubMsg(m)
+ case m: PresentationPageCountErrorPubMsg => presentationApp2x.handlePresentationPageCountErrorPubMsg(m)
+ case m: PresentationPageGeneratedPubMsg => presentationApp2x.handlePresentationPageGeneratedPubMsg(m)
+ case m: PresentationConversionCompletedPubMsg => presentationApp2x.handlePresentationConversionCompletedPubMsg(m)
case m: EditCaptionHistoryPubMsg => captionApp2x.handleEditCaptionHistoryPubMsg(m)
case m: UpdateCaptionOwnerPubMsg => captionApp2x.handleUpdateCaptionOwnerPubMsg(m)
case m: SendCaptionHistoryReqMsg => captionApp2x.handleSendCaptionHistoryReqMsg(m)
- case _ => println("***** Cannot handle " + msg.envelope.name)
+ case _ => log.warning("***** Cannot handle " + msg.envelope.name)
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala
index 347cd3106e..c69930ce65 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala
@@ -19,6 +19,7 @@ class RunningMeeting(val props: DefaultProps, val outGW: OutMessageGateway,
val chatModel = new ChatModel()
val layoutModel = new LayoutModel()
+ val layouts = new Layouts()
val pollModel = new PollModel()
val wbModel = new WhiteboardModel()
val presModel = new PresentationModel()
@@ -33,14 +34,15 @@ class RunningMeeting(val props: DefaultProps, val outGW: OutMessageGateway,
val users2x = new Users2x
val usersState = new UsersState
val polls2x = new Polls
+ val guestsWaiting = new GuestsWaiting
// meetingModel.setGuestPolicy(props.usersProp.guestPolicy)
// We extract the meeting handlers into this class so it is
// easy to test.
- val liveMeeting = new LiveMeeting(props, meetingStatux2x, chatModel, layoutModel,
+ val liveMeeting = new LiveMeeting(props, meetingStatux2x, chatModel, layoutModel, layouts,
users, registeredUsers, polls2x, pollModel, wbModel, presModel, breakoutRooms, captionModel,
- notesModel, webcams, voiceUsers, users2x)
+ notesModel, webcams, voiceUsers, users2x, guestsWaiting)
val actorRef = context.actorOf(MeetingActor.props(props, eventBus, outGW, liveMeeting), props.meetingProp.intId)
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/util/Model1x2xConverter.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/util/Model1x2xConverter.scala
index fc89dd7de4..6ca69757e7 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/util/Model1x2xConverter.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/util/Model1x2xConverter.scala
@@ -1,36 +1,36 @@
-package org.bigbluebutton.core.util
-
-import org.bigbluebutton.core.models.{ UserState, UserVO, VoiceUser, VoiceUserState }
-
-import scala.collection.immutable.ListSet
-
-object Model1x2xConverter {
-
- def defaultVoiceUser(intId: String, voiceUserId: String, callerIdName: String, callerIdNum: String, avatar: String): VoiceUser = {
- new VoiceUser(voiceUserId, intId, callerIdName, callerIdNum, joined = false, locked = false,
- muted = false, talking = false, avatar, listenOnly = false)
- }
-
- def defaultUserVO(intId: String, extId: String, name: String, role: String, guest: Boolean, authed: Boolean,
- waitingForAcceptance: Boolean, lockStatus: Boolean, vu: VoiceUser): UserVO = {
- new UserVO(intId, extId, name, role, guest, authed, waitingForAcceptance = waitingForAcceptance,
- emojiStatus = "none", presenter = false,
- hasStream = false, locked = lockStatus,
- webcamStreams = new ListSet[String](), phoneUser = false, vu,
- listenOnly = vu.listenOnly, avatarURL = vu.avatarURL, joinedWeb = true)
- }
-
- def toVoiceUser(vu: VoiceUserState): VoiceUser = {
- new VoiceUser(vu.voiceUserId, vu.intId, vu.callerName, vu.callerNum, joined = false, locked = false,
- muted = vu.muted, talking = vu.talking, "none", listenOnly = vu.listenOnly)
- }
-
- def toUserVO(u: UserState, vu: VoiceUser, webcams: Vector[String]): UserVO = {
-
- new UserVO(id = u.intId, externalId = u.extId, name = u.name, role = u.role,
- guest = u.guest, authed = u.authed, waitingForAcceptance = u.waitingForAcceptance, emojiStatus = u.emoji,
- presenter = u.presenter, hasStream = webcams.length > 0, locked = u.locked, webcamStreams = webcams.toSet,
- phoneUser = false, voiceUser = vu, listenOnly = vu.listenOnly, avatarURL = u.avatar,
- joinedWeb = true)
- }
-}
+package org.bigbluebutton.core.util
+
+import org.bigbluebutton.common2.domain.{ UserVO, VoiceUserVO }
+import org.bigbluebutton.core.models.{ VoiceUserState, UserState }
+import scala.collection.immutable.ListSet
+
+object Model1x2xConverter {
+
+ def defaultVoiceUser(intId: String, voiceUserId: String, callerIdName: String, callerIdNum: String, avatar: String): VoiceUserVO = {
+ new VoiceUserVO(voiceUserId, intId, callerIdName, callerIdNum, joined = false, locked = false,
+ muted = false, talking = false, avatar, listenOnly = false)
+ }
+
+ def defaultUserVO(intId: String, extId: String, name: String, role: String, guest: Boolean, authed: Boolean,
+ waitingForAcceptance: Boolean, lockStatus: Boolean, vu: VoiceUserVO): UserVO = {
+ new UserVO(intId, extId, name, role, guest, authed, waitingForAcceptance = waitingForAcceptance,
+ emojiStatus = "none", presenter = false,
+ hasStream = false, locked = lockStatus,
+ webcamStreams = new ListSet[String](), phoneUser = false, vu,
+ listenOnly = vu.listenOnly, avatarURL = vu.avatarURL, joinedWeb = true)
+ }
+
+ def toVoiceUser(vu: VoiceUserState): VoiceUserVO = {
+ new VoiceUserVO(vu.voiceUserId, vu.intId, vu.callerName, vu.callerNum, joined = false, locked = false,
+ muted = vu.muted, talking = vu.talking, "none", listenOnly = vu.listenOnly)
+ }
+
+ def toUserVO(u: UserState, vu: VoiceUserVO, webcams: Vector[String]): UserVO = {
+
+ new UserVO(id = u.intId, externalId = u.extId, name = u.name, role = u.role,
+ guest = u.guest, authed = u.authed, waitingForAcceptance = u.waitingForAcceptance, emojiStatus = u.emoji,
+ presenter = u.presenter, hasStream = webcams.length > 0, locked = u.locked, webcamStreams = webcams.toSet,
+ phoneUser = false, voiceUser = vu, listenOnly = vu.listenOnly, avatarURL = u.avatar,
+ joinedWeb = true)
+ }
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala
old mode 100644
new mode 100755
index b61e5ca4f8..03c60d25c2
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala
@@ -1,11 +1,11 @@
package org.bigbluebutton.core2.message.handlers
-import org.bigbluebutton.common2.messages.MessageBody.GetCurrentPollRespMsgBody
import org.bigbluebutton.common2.messages._
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Polls
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.common2.domain.PollVO
+import org.bigbluebutton.common2.messages.polls.{ GetCurrentPollReqMsg, GetCurrentPollRespMsg, GetCurrentPollRespMsgBody }
trait GetCurrentPollReqMsgHdlr {
this: MeetingActor =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/HidePollResultReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/HidePollResultReqMsgHdlr.scala
old mode 100644
new mode 100755
index 2e1f780a97..f0954f47cb
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/HidePollResultReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/HidePollResultReqMsgHdlr.scala
@@ -1,7 +1,7 @@
package org.bigbluebutton.core2.message.handlers
-import org.bigbluebutton.common2.messages.MessageBody.{ PollHideResultEvtMsgBody }
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.polls.{ HidePollResultReqMsg, PollHideResultEvtMsg, PollHideResultEvtMsgBody }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Polls
import org.bigbluebutton.core.running.MeetingActor
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/MuteAllExceptPresenterRequestHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/MuteAllExceptPresenterRequestHdlr.scala
index 2981422fc7..80e4cd2853 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/MuteAllExceptPresenterRequestHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/MuteAllExceptPresenterRequestHdlr.scala
@@ -1,6 +1,5 @@
package org.bigbluebutton.core2.message.handlers
-import org.bigbluebutton.common2.messages.MessageBody.UserBroadcastCamStartedEvtMsgBody
import org.bigbluebutton.common2.messages._
import org.bigbluebutton.common2.messages.voiceconf.{ MuteUserInVoiceConfMsg, MuteUserInVoiceConfMsgBody }
import org.bigbluebutton.core.OutMessageGateway
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RespondToPollReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RespondToPollReqMsgHdlr.scala
old mode 100644
new mode 100755
index 9a81624557..b77cddb199
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RespondToPollReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/RespondToPollReqMsgHdlr.scala
@@ -1,8 +1,8 @@
package org.bigbluebutton.core2.message.handlers
import org.bigbluebutton.common2.domain.SimplePollResultOutVO
-import org.bigbluebutton.common2.messages.MessageBody.UserRespondedToPollEvtMsgBody
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.polls.{ RespondToPollReqMsg, UserRespondedToPollEvtMsg, UserRespondedToPollEvtMsgBody }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Polls
import org.bigbluebutton.core.running.MeetingActor
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/SetLockSettingsHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/SetLockSettingsHdlr.scala
index b2ed5b7ebc..ee3044eb93 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/SetLockSettingsHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/SetLockSettingsHdlr.scala
@@ -14,10 +14,12 @@ trait SetLockSettingsHdlr {
def handleSetLockSettings(msg: SetLockSettings) {
if (!liveMeeting.permissionsEqual(msg.settings)) {
liveMeeting.newPermissions(msg.settings)
+
+ /*
outGW.send(new NewPermissionsSetting(props.meetingProp.intId, msg.setByUser,
MeetingStatus2x.getPermissions(liveMeeting.status),
Users.getUsers(liveMeeting.users).toArray))
-
+*/
handleLockLayout(msg.settings.lockedLayout, msg.setByUser)
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/ShowPollResultReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/ShowPollResultReqMsgHdlr.scala
old mode 100644
new mode 100755
index 134dbb0a85..63d9d918da
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/ShowPollResultReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/ShowPollResultReqMsgHdlr.scala
@@ -1,11 +1,11 @@
package org.bigbluebutton.core2.message.handlers
-import org.bigbluebutton.common2.messages.MessageBody.PollShowResultEvtMsgBody
import org.bigbluebutton.common2.messages._
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Polls
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.common2.domain.SimplePollResultOutVO
+import org.bigbluebutton.common2.messages.polls.{ PollShowResultEvtMsg, PollShowResultEvtMsgBody, ShowPollResultReqMsg }
trait ShowPollResultReqMsgHdlr {
this: MeetingActor =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartCustomPollReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartCustomPollReqMsgHdlr.scala
old mode 100644
new mode 100755
index 9333002a78..2757371e0d
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartCustomPollReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartCustomPollReqMsgHdlr.scala
@@ -1,8 +1,8 @@
package org.bigbluebutton.core2.message.handlers
import org.bigbluebutton.common2.domain.SimplePollOutVO
-import org.bigbluebutton.common2.messages.MessageBody.PollStartedEvtMsgBody
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.polls.{ PollStartedEvtMsg, PollStartedEvtMsgBody, StartCustomPollReqMsg }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Polls
import org.bigbluebutton.core.running.MeetingActor
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartPollReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartPollReqMsgHdlr.scala
old mode 100644
new mode 100755
index 43b2744f3a..bee11876f8
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartPollReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StartPollReqMsgHdlr.scala
@@ -1,8 +1,8 @@
package org.bigbluebutton.core2.message.handlers
-import org.bigbluebutton.common2.messages.MessageBody.PollStartedEvtMsgBody
import org.bigbluebutton.common2.messages._
import org.bigbluebutton.common2.domain.SimplePollOutVO
+import org.bigbluebutton.common2.messages.polls.{ PollStartedEvtMsg, PollStartedEvtMsgBody, StartPollReqMsg }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Polls
import org.bigbluebutton.core.running.MeetingActor
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StopPollReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StopPollReqMsgHdlr.scala
old mode 100644
new mode 100755
index fc2af26963..c0a84b234c
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StopPollReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/StopPollReqMsgHdlr.scala
@@ -1,7 +1,7 @@
package org.bigbluebutton.core2.message.handlers
-import org.bigbluebutton.common2.messages.MessageBody.PollStoppedEvtMsgBody
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.polls.{ PollStoppedEvtMsg, PollStoppedEvtMsgBody, StopPollReqMsg }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Polls
import org.bigbluebutton.core.running.MeetingActor
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/BroadcastLayoutMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/BroadcastLayoutMsgHdlr.scala
new file mode 100644
index 0000000000..e57d77f5b9
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/BroadcastLayoutMsgHdlr.scala
@@ -0,0 +1,33 @@
+package org.bigbluebutton.core2.message.handlers.layout
+
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.Routing
+import org.bigbluebutton.common2.messages.layout._
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.models.Layouts
+import org.bigbluebutton.core.running.MeetingActor
+import org.bigbluebutton.core2.MeetingStatus2x
+
+trait BroadcastLayoutMsgHdlr {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ def handleBroadcastLayoutMsg(msg: BroadcastLayoutMsg): Unit = {
+
+ Layouts.setCurrentLayout(msg.body.layout)
+
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(BroadcastLayoutEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(BroadcastLayoutEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
+
+ val body = BroadcastLayoutEvtMsgBody(msg.body.meetingId, props.recordProp.record, msg.body.requesterId,
+ Layouts.getCurrentLayout(),
+ MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
+ Layouts.getLayoutSetter(), affectedUsers)
+ val event = BroadcastLayoutEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+
+ outGW.send(msgEvent)
+ }
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/GetCurrentLayoutMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/GetCurrentLayoutMsgHdlr.scala
new file mode 100644
index 0000000000..b1db135eac
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/GetCurrentLayoutMsgHdlr.scala
@@ -0,0 +1,40 @@
+package org.bigbluebutton.core2.message.handlers.layout
+
+import org.bigbluebutton.common2.messages.Routing
+import org.bigbluebutton.common2.messages.MessageTypes
+import org.bigbluebutton.common2.messages.layout._
+import org.bigbluebutton.core.running.MeetingActor
+import org.bigbluebutton.common2.messages.BbbCommonEnvCoreMsg
+import org.bigbluebutton.core2.MeetingStatus2x
+import org.bigbluebutton.common2.messages.layout.GetCurrentLayoutMsg
+import org.bigbluebutton.common2.messages.BbbClientMsgHeader
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.models.Layouts
+import org.bigbluebutton.common2.messages.BbbCoreEnvelope
+
+trait GetCurrentLayoutMsgHdlr {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ def handleGetCurrentLayoutMsg(msg: GetCurrentLayoutMsg): Unit = {
+
+ def broadcastEvent(msg: GetCurrentLayoutMsg): Unit = {
+
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(GetCurrentLayoutEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(GetCurrentLayoutEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
+
+ val body = GetCurrentLayoutEvtMsgBody(msg.body.meetingId, props.recordProp.record, msg.body.requesterId,
+ Layouts.getCurrentLayout(),
+ MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
+ Layouts.getLayoutSetter())
+ val event = GetCurrentLayoutEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+
+ outGW.send(msgEvent)
+ }
+
+ broadcastEvent(msg)
+ }
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/LockLayoutMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/LockLayoutMsgHdlr.scala
new file mode 100644
index 0000000000..5ba9f3b6f1
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/layout/LockLayoutMsgHdlr.scala
@@ -0,0 +1,59 @@
+package org.bigbluebutton.core2.message.handlers.layout
+
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.Routing
+import org.bigbluebutton.common2.messages.layout._
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.models.Layouts
+import org.bigbluebutton.core.running.MeetingActor
+import org.bigbluebutton.core2.MeetingStatus2x
+
+trait LockLayoutMsgHdlr {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ def handleLockLayoutMsg(msg: LockLayoutMsg): Unit = {
+
+ def broadcastEvent(msg: LockLayoutMsg): Unit = {
+
+ Layouts.applyToViewersOnly(msg.body.viewersOnly)
+ liveMeeting.lockLayout(msg.body.lock)
+
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(LockLayoutEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(LockLayoutEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
+
+ val body = LockLayoutEvtMsgBody(msg.body.meetingId, props.recordProp.record, msg.body.setById, msg.body.lock, affectedUsers)
+ val event = LockLayoutEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+
+ outGW.send(msgEvent)
+
+ msg.body.layout foreach { l =>
+ Layouts.setCurrentLayout(l)
+ broadcastSyncLayout(msg.body.meetingId, msg.body.setById)
+ }
+
+ outGW.send(msgEvent)
+ }
+
+ def broadcastSyncLayout(meetingId: String, setById: String) {
+
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
+ val envelope = BbbCoreEnvelope(BroadcastLayoutEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(BroadcastLayoutEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
+
+ val body = BroadcastLayoutEvtMsgBody(meetingId, props.recordProp.record, setById,
+ Layouts.getCurrentLayout(),
+ MeetingStatus2x.getPermissions(liveMeeting.status).lockedLayout,
+ Layouts.getLayoutSetter(), affectedUsers)
+ val event = BroadcastLayoutEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+
+ outGW.send(msgEvent)
+ }
+
+ broadcastEvent(msg)
+ }
+}
\ No newline at end of file
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/EjectUserFromMeetingHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/EjectUserFromMeetingHdlr.scala
index b07954795a..4bae2cb356 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/EjectUserFromMeetingHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/EjectUserFromMeetingHdlr.scala
@@ -12,7 +12,7 @@ trait EjectUserFromMeetingHdlr {
val outGW: OutMessageGateway
def handle(msg: EjectUserFromMeeting) {
-
+ /*
for {
user <- Users2x.findWithIntId(liveMeeting.users2x, msg.userId)
} yield {
@@ -21,6 +21,7 @@ trait EjectUserFromMeetingHdlr {
pollApp2x.handle(msg, user)
deskshareApp2x.handle(msg, user)
}
+ */
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetLockSettingsHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetLockSettingsHdlr.scala
index 38b0f6b63e..e9837ecfee 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetLockSettingsHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetLockSettingsHdlr.scala
@@ -13,8 +13,8 @@ trait GetLockSettingsHdlr {
def handleGetLockSettings(msg: GetLockSettings) {
- outGW.send(new NewPermissionsSetting(props.meetingProp.intId, msg.userId,
- MeetingStatus2x.getPermissions(liveMeeting.status),
- Users.getUsers(liveMeeting.users).toArray))
+ // outGW.send(new NewPermissionsSetting(props.meetingProp.intId, msg.userId,
+ // MeetingStatus2x.getPermissions(liveMeeting.status),
+ // Users.getUsers(liveMeeting.users).toArray))
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetUsersHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetUsersHdlr.scala
index 10e4eba6ac..9f4e70f51b 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetUsersHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/GetUsersHdlr.scala
@@ -16,16 +16,4 @@ trait GetUsersHdlr {
sendAllUsersInMeeting(msg.requesterID)
}
- def sendAllUsersInMeeting(requesterId: String): Unit = {
- val users = Users2x.findAll(liveMeeting.users2x)
- val webUsers = users.map { u =>
- WebUser(intId = u.intId, extId = u.extId, name = u.name, role = u.role,
- guest = u.guest, authed = u.authed, waitingForAcceptance = u.waitingForAcceptance, emoji = u.emoji,
- locked = u.locked, presenter = u.presenter, avatar = u.avatar)
- }
-
- val event = GetUsersMeetingRespMsgBuilder.build(liveMeeting.props.meetingProp.intId, requesterId, webUsers)
- Sender.send(outGW, event)
- }
-
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/InitLockSettingsHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/InitLockSettingsHdlr.scala
index 99b9b58e2e..297ab71e90 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/InitLockSettingsHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/InitLockSettingsHdlr.scala
@@ -15,8 +15,6 @@ trait InitLockSettingsHdlr {
if (!MeetingStatus2x.permisionsInitialized(liveMeeting.status)) {
MeetingStatus2x.initializePermissions(liveMeeting.status)
liveMeeting.newPermissions(msg.settings)
- outGW.send(new PermissionsSettingInitialized(msg.meetingID, msg.settings,
- Users.getUsers(liveMeeting.users).toArray))
}
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/MuteUserRequestHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/MuteUserRequestHdlr.scala
index 1908c4195e..1337c4eff1 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/MuteUserRequestHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/MuteUserRequestHdlr.scala
@@ -2,7 +2,7 @@ package org.bigbluebutton.core2.message.handlers.users
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.{ MuteUserRequest, MuteVoiceUser }
-import org.bigbluebutton.core.models.Users
+import org.bigbluebutton.core.models.{ Users, Users2x, VoiceUsers }
import org.bigbluebutton.core.running.MeetingActor
trait MuteUserRequestHdlr {
@@ -13,11 +13,11 @@ trait MuteUserRequestHdlr {
def handleMuteUserRequest(msg: MuteUserRequest) {
log.info("Received mute user request. meetingId=" + props.meetingProp.intId + " userId=" + msg.userID + " mute=" + msg.mute)
for {
- u <- Users.findWithId(msg.userID, liveMeeting.users)
+ u <- VoiceUsers.findWithIntId(liveMeeting.voiceUsers, msg.userID)
} yield {
- log.info("Send mute user request. meetingId=" + props.meetingProp.intId + " userId=" + u.id + " user=" + u)
+ log.info("Send mute user request. meetingId=" + props.meetingProp.intId + " userId=" + u.intId + " user=" + u)
outGW.send(new MuteVoiceUser(props.meetingProp.intId, props.recordProp.record,
- msg.requesterID, u.id, props.voiceProp.voiceConf, u.voiceUser.userId, msg.mute))
+ msg.requesterID, u.intId, props.voiceProp.voiceConf, u.voiceUserId, msg.mute))
}
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStartMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStartMsgHdlr.scala
index 49c782f6c3..2ed76530fa 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStartMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStartMsgHdlr.scala
@@ -1,7 +1,7 @@
package org.bigbluebutton.core2.message.handlers.users
-import org.bigbluebutton.common2.messages.MessageBody.UserBroadcastCamStartedEvtMsgBody
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.{ UserBroadcastCamStartMsg, UserBroadcastCamStartedEvtMsg, UserBroadcastCamStartedEvtMsgBody }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.{ MediaStream, WebcamStream, Webcams }
import org.bigbluebutton.core.running.MeetingActor
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStopMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStopMsgHdlr.scala
index b59df1f8a7..43eb3a0351 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStopMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserBroadcastCamStopMsgHdlr.scala
@@ -1,7 +1,7 @@
package org.bigbluebutton.core2.message.handlers.users
-import org.bigbluebutton.common2.messages.MessageBody.UserBroadcastCamStoppedEvtMsgBody
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.{ UserBroadcastCamStopMsg, UserBroadcastCamStoppedEvtMsg, UserBroadcastCamStoppedEvtMsgBody }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.models.Webcams
import org.bigbluebutton.core.running.MeetingActor
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserConnectedToGlobalAudioHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserConnectedToGlobalAudioHdlr.scala
index b629b78e0f..639ed1958f 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserConnectedToGlobalAudioHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserConnectedToGlobalAudioHdlr.scala
@@ -16,18 +16,6 @@ trait UserConnectedToGlobalAudioHdlr {
def handleUserConnectedToGlobalAudio(msg: UserConnectedToGlobalAudio) {
log.info("Handling UserConnectedToGlobalAudio: meetingId=" + props.meetingProp.intId + " userId=" + msg.userid)
- val user = Users.findWithId(msg.userid, liveMeeting.users)
- user foreach { u =>
- if (MeetingStatus2x.addGlobalAudioConnection(liveMeeting.status, msg.userid)) {
- for {
- uvo <- Users.joinedVoiceListenOnly(msg.userid, liveMeeting.users)
- } yield {
- log.info("UserConnectedToGlobalAudio: meetingId=" + props.meetingProp.intId + " userId=" + uvo.id + " user=" + uvo)
- outGW.send(new UserListeningOnly(props.meetingProp.intId, props.recordProp.record, uvo.id, uvo.listenOnly))
- }
- }
- }
-
def broadcastEvent(vu: VoiceUserState): Unit = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId,
vu.intId)
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserDisconnectedFromGlobalAudioHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserDisconnectedFromGlobalAudioHdlr.scala
index 4b6641443d..8653af709b 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserDisconnectedFromGlobalAudioHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserDisconnectedFromGlobalAudioHdlr.scala
@@ -4,9 +4,8 @@ import org.bigbluebutton.common2.messages._
import org.bigbluebutton.common2.messages.voiceconf.{ UserLeftVoiceConfToClientEvtMsg, UserLeftVoiceConfToClientEvtMsgBody }
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.{ UserDisconnectedFromGlobalAudio, UserLeft, UserListeningOnly }
-import org.bigbluebutton.core.models.{ Users, VoiceUserState, VoiceUsers }
+import org.bigbluebutton.core.models.{ VoiceUserState, VoiceUsers }
import org.bigbluebutton.core.running.MeetingActor
-import org.bigbluebutton.core2.MeetingStatus2x
trait UserDisconnectedFromGlobalAudioHdlr {
this: MeetingActor =>
@@ -16,27 +15,6 @@ trait UserDisconnectedFromGlobalAudioHdlr {
def handleUserDisconnectedFromGlobalAudio(msg: UserDisconnectedFromGlobalAudio) {
log.info("Handling UserDisconnectedToGlobalAudio: meetingId=" + props.meetingProp.intId + " userId=" + msg.userid)
- val user = Users.findWithId(msg.userid, liveMeeting.users)
- user foreach { u =>
- if (MeetingStatus2x.removeGlobalAudioConnection(liveMeeting.status, msg.userid)) {
- if (!u.joinedWeb) {
- for {
- uvo <- Users.userLeft(u.id, liveMeeting.users)
- } yield {
- log.info("Not web user. Send user left message. meetingId=" + props.meetingProp.intId + " userId=" + u.id + " user=" + u)
- outGW.send(new UserLeft(props.meetingProp.intId, props.recordProp.record, uvo))
- }
- } else {
- for {
- uvo <- Users.leftVoiceListenOnly(u.id, liveMeeting.users)
- } yield {
- log.info("UserDisconnectedToGlobalAudio: meetingId=" + props.meetingProp.intId + " userId=" + uvo.id + " user=" + uvo)
- outGW.send(new UserListeningOnly(props.meetingProp.intId, props.recordProp.record, uvo.id, uvo.listenOnly))
- }
- }
- }
- }
-
def broadcastEvent(vu: VoiceUserState): Unit = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId,
vu.intId)
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserEmojiStatusHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserEmojiStatusHdlr.scala
index ede07f6342..4609dcc7c9 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserEmojiStatusHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserEmojiStatusHdlr.scala
@@ -1,8 +1,10 @@
package org.bigbluebutton.core2.message.handlers.users
+import org.bigbluebutton.common2.messages.users.{ UserEmojiChangedEvtMsg, UserEmojiChangedEvtMsgBody, ValidateAuthTokenRespMsg, ValidateAuthTokenRespMsgBody }
+import org.bigbluebutton.common2.messages._
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.{ UserChangedEmojiStatus, UserEmojiStatus }
-import org.bigbluebutton.core.models.Users
+import org.bigbluebutton.core.models.{ Users, Users2x }
import org.bigbluebutton.core.running.MeetingActor
trait UserEmojiStatusHdlr {
@@ -12,10 +14,19 @@ trait UserEmojiStatusHdlr {
def handleUserEmojiStatus(msg: UserEmojiStatus) {
for {
- uvo <- Users.setEmojiStatus(msg.userId, liveMeeting.users, msg.emojiStatus)
+ uvo <- Users2x.setEmojiStatus(liveMeeting.users2x, msg.userId, msg.emojiStatus)
} yield {
- outGW.send(new UserChangedEmojiStatus(props.meetingProp.intId, props.recordProp.record, msg.emojiStatus, uvo.id))
+ sendUserEmojiChangedEvtMsg(outGW, liveMeeting.props.meetingProp.intId, msg.userId, msg.emojiStatus)
}
}
+ def sendUserEmojiChangedEvtMsg(outGW: OutMessageGateway, meetingId: String, userId: String, emoji: String): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId)
+ val envelope = BbbCoreEnvelope(UserEmojiChangedEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(UserEmojiChangedEvtMsg.NAME, meetingId, userId)
+ val body = UserEmojiChangedEvtMsgBody(userId, emoji)
+ val event = UserEmojiChangedEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+ }
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinMeetingReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinMeetingReqMsgHdlr.scala
index e7008596e6..98bbc8bfb9 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinMeetingReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinMeetingReqMsgHdlr.scala
@@ -1,6 +1,6 @@
package org.bigbluebutton.core2.message.handlers.users
-import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.UserJoinMeetingReqMsg
import org.bigbluebutton.core.{ MessageRecorder, OutMessageGateway }
import org.bigbluebutton.core.models.{ RegisteredUsers, UserState, Users2x }
import org.bigbluebutton.core.running.MeetingActor
@@ -13,9 +13,13 @@ trait UserJoinMeetingReqMsgHdlr {
def handle(msg: UserJoinMeetingReqMsg): Unit = {
userJoinMeeting(msg.body.authToken)
+
+ startRecordingIfAutoStart()
}
def userJoinMeeting(authToken: String): Unit = {
+ log.debug("User joining with token {}", authToken)
+
for {
regUser <- RegisteredUsers.findWithToken(authToken, liveMeeting.registeredUsers)
} yield {
@@ -37,6 +41,7 @@ trait UserJoinMeetingReqMsgHdlr {
Sender.send(outGW, event)
MessageRecorder.record(outGW, liveMeeting.props.recordProp.record, event.core)
+
}
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinedVoiceConfMessageHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinedVoiceConfMessageHdlr.scala
index 03d1be40df..7d244aad94 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinedVoiceConfMessageHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoinedVoiceConfMessageHdlr.scala
@@ -1,124 +1,57 @@
-package org.bigbluebutton.core2.message.handlers.users
-
-import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.core.api._
-import org.bigbluebutton.core.models.{ Roles, Users, VoiceUser }
-import org.bigbluebutton.core.running.MeetingActor
-import org.bigbluebutton.core2.MeetingStatus2x
-
-trait UserJoinedVoiceConfMessageHdlr {
- this: MeetingActor =>
-
- val outGW: OutMessageGateway
-
- def handleUserJoinedVoiceFromPhone(msg: UserJoinedVoiceConfMessage) = {
- log.info("User joining from phone. meetingId=" + props.meetingProp.intId + " userId=" + msg.userId
- + " extUserId=" + msg.externUserId)
-
- Users.getUserWithVoiceUserId(msg.voiceUserId, liveMeeting.users) match {
- case Some(user) => {
- log.info("Voice user=" + msg.voiceUserId + " is already in conf="
- + props.voiceProp.voiceConf + ". Must be duplicate message. meetigId=" + props.meetingProp.intId)
- }
- case None => {
- val webUserId = if (msg.userId != msg.callerIdName) {
- msg.userId
- } else {
- // No current web user. This means that the user called in through
- // the phone. We need to generate a new user as we are not able
- // to match with a web user.
- Users.generateWebUserId(liveMeeting.users)
- }
-
- /**
- * If user is not joined listenOnly then user is joined calling through phone or webrtc.
- */
- val vu = new VoiceUser(msg.voiceUserId, webUserId, msg.callerIdName, msg.callerIdNum,
- joined = !msg.listenOnly, locked = false, muted = msg.muted, talking = msg.talking, msg.avatarURL, listenOnly = msg.listenOnly)
-
- /**
- * If user is not joined listenOnly then user is joined calling through phone or webrtc.
- * So we call him "phoneUser".
- */
- val uvo = Users.makeUserPhoneUser(vu, liveMeeting.users, webUserId, msg.externUserId, msg.callerIdName,
- lockStatus = getInitialLockStatus(Roles.VIEWER_ROLE),
- listenOnly = msg.listenOnly, avatarURL = msg.avatarURL)
-
- log.info("User joined from phone. meetingId=" + props.meetingProp.intId + " userId=" + uvo.id + " user=" + uvo)
-
- outGW.send(new UserJoined(props.meetingProp.intId, props.recordProp.record, uvo))
- outGW.send(new UserJoinedVoice(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf, uvo))
-
- if (MeetingStatus2x.isMeetingMuted(liveMeeting.status)) {
- outGW.send(new MuteVoiceUser(props.meetingProp.intId, props.recordProp.record, uvo.id, uvo.id,
- props.voiceProp.voiceConf, vu.userId, MeetingStatus2x.isMeetingMuted(liveMeeting.status)))
- }
- }
- }
- }
-
- def startRecordingVoiceConference() {
- if (Users.numUsersInVoiceConference(liveMeeting.users) == 1 &&
- props.recordProp.record &&
- !MeetingStatus2x.isVoiceRecording(liveMeeting.status)) {
- MeetingStatus2x.startRecordingVoice(liveMeeting.status)
- log.info("Send START RECORDING voice conf. meetingId=" + props.meetingProp.intId + " voice conf=" + props.voiceProp.voiceConf)
- outGW.send(new StartRecordingVoiceConf(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf))
- }
- }
-
- def switchUserToPhoneUser(msg: UserJoinedVoiceConfMessage) = {
- log.info("User has been disconnected but still in voice conf. Switching to phone user. meetingId="
- + props.meetingProp.intId + " callername=" + msg.callerIdName
- + " userId=" + msg.userId + " extUserId=" + msg.externUserId)
-
- Users.findWithId(msg.userId, liveMeeting.users) match {
- case Some(user) => {
- val nu = Users.switchUserToPhoneUser(user, liveMeeting.users, msg.voiceUserId, msg.userId, msg.callerIdName,
- msg.callerIdNum, msg.muted, msg.talking, msg.avatarURL, msg.listenOnly)
-
- log.info("User joined voice. meetingId=" + props.meetingProp.intId + " userId=" + user.id + " user=" + nu)
- outGW.send(new UserJoinedVoice(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf, nu))
-
- if (MeetingStatus2x.isMeetingMuted(liveMeeting.status)) {
- outGW.send(new MuteVoiceUser(props.meetingProp.intId, props.recordProp.record,
- nu.id, nu.id, props.voiceProp.voiceConf,
- nu.voiceUser.userId, MeetingStatus2x.isMeetingMuted(liveMeeting.status)))
- }
- }
- case None => {
- handleUserJoinedVoiceFromPhone(msg)
- }
- }
- }
-
- def handleUserJoinedVoiceConfMessage(msg: UserJoinedVoiceConfMessage) = {
- log.info("Received user joined voice. meetingId=" + props.meetingProp.intId + " callername=" + msg.callerIdName
- + " userId=" + msg.userId + " extUserId=" + msg.externUserId)
-
- Users.findWithId(msg.userId, liveMeeting.users) match {
- case Some(user) => {
- // this is used to restore the mute state on reconnect
- val previouslyMuted = user.voiceUser.muted
-
- val nu = Users.restoreMuteState(user, liveMeeting.users, msg.voiceUserId, msg.userId, msg.callerIdName,
- msg.callerIdNum, msg.muted, msg.talking, msg.avatarURL, msg.listenOnly)
-
- log.info("User joined voice. meetingId=" + props.meetingProp.intId + " userId=" + user.id + " user=" + nu)
- outGW.send(new UserJoinedVoice(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf, nu))
-
- if (MeetingStatus2x.isMeetingMuted(liveMeeting.status) || previouslyMuted) {
- outGW.send(new MuteVoiceUser(props.meetingProp.intId, props.recordProp.record,
- nu.id, nu.id, props.voiceProp.voiceConf,
- nu.voiceUser.userId, true))
- }
-
- startRecordingVoiceConference()
- }
- case None => {
- handleUserJoinedVoiceFromPhone(msg)
- startRecordingVoiceConference()
- }
- }
- }
-}
+package org.bigbluebutton.core2.message.handlers.users
+
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.api._
+import org.bigbluebutton.core.models.{ Roles, Users }
+import org.bigbluebutton.core.running.MeetingActor
+import org.bigbluebutton.core2.MeetingStatus2x
+import org.bigbluebutton.common2.domain.VoiceUserVO
+
+trait UserJoinedVoiceConfMessageHdlr {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ /*
+ def startRecordingVoiceConference() {
+ if (Users.numUsersInVoiceConference(liveMeeting.users) == 1 &&
+ props.recordProp.record &&
+ !MeetingStatus2x.isVoiceRecording(liveMeeting.status)) {
+ MeetingStatus2x.startRecordingVoice(liveMeeting.status)
+ log.info("Send START RECORDING voice conf. meetingId=" + props.meetingProp.intId + " voice conf=" + props.voiceProp.voiceConf)
+ outGW.send(new StartRecordingVoiceConf(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf))
+ }
+ }
+
+
+
+ def handleUserJoinedVoiceConfMessage(msg: UserJoinedVoiceConfMessage) = {
+ log.info("Received user joined voice. meetingId=" + props.meetingProp.intId + " callername=" + msg.callerIdName
+ + " userId=" + msg.userId + " extUserId=" + msg.externUserId)
+
+ Users.findWithId(msg.userId, liveMeeting.users) match {
+ case Some(user) => {
+ // this is used to restore the mute state on reconnect
+ val previouslyMuted = user.voiceUser.muted
+
+ val nu = Users.restoreMuteState(user, liveMeeting.users, msg.voiceUserId, msg.userId, msg.callerIdName,
+ msg.callerIdNum, msg.muted, msg.talking, msg.avatarURL, msg.listenOnly)
+
+ log.info("User joined voice. meetingId=" + props.meetingProp.intId + " userId=" + user.id + " user=" + nu)
+ outGW.send(new UserJoinedVoice(props.meetingProp.intId, props.recordProp.record, props.voiceProp.voiceConf, nu))
+
+ if (MeetingStatus2x.isMeetingMuted(liveMeeting.status) || previouslyMuted) {
+ outGW.send(new MuteVoiceUser(props.meetingProp.intId, props.recordProp.record,
+ nu.id, nu.id, props.voiceProp.voiceConf,
+ nu.voiceUser.userId, true))
+ }
+
+ startRecordingVoiceConference()
+ }
+ case None => {
+ startRecordingVoiceConference()
+ }
+ }
+ }
+ */
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoiningHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoiningHdlr.scala
index f66baeb3a3..cb7f9a5f1b 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoiningHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserJoiningHdlr.scala
@@ -1,5 +1,6 @@
package org.bigbluebutton.core2.message.handlers.users
+import org.bigbluebutton.common2.domain.VoiceUserVO
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api._
import org.bigbluebutton.core.models._
@@ -13,67 +14,7 @@ trait UserJoiningHdlr {
def handleUserJoin(msg: UserJoining): Unit = {
log.debug("Received user joined meeting. metingId=" + props.meetingProp.intId + " userId=" + msg.userID)
- def initVoiceUser(userId: String, ru: RegisteredUser): VoiceUser = {
- val wUser = Users.findWithId(userId, liveMeeting.users)
-
- wUser match {
- case Some(u) => {
- log.debug("Found user. metingId=" + props.meetingProp.intId + " userId=" + msg.userID + " user=" + u)
- if (u.voiceUser.joined) {
- /*
- * User is in voice conference. Must mean that the user reconnected with audio
- * still in the voice conference.
- */
- u.voiceUser.copy()
- } else {
- /**
- * User is not joined in voice conference. Initialize user and copy status
- * as user maybe joined listenOnly.
- */
- new VoiceUser(u.voiceUser.userId, msg.userID, ru.name, ru.name,
- joined = false, locked = false, muted = false,
- talking = false, u.avatarURL, listenOnly = u.listenOnly)
- }
- }
- case None => {
- log.debug("User not found. metingId=" + props.meetingProp.intId + " userId=" + msg.userID)
- /**
- * New user. Initialize voice status.
- */
- new VoiceUser(msg.userID, msg.userID, ru.name, ru.name,
- joined = false, locked = false,
- muted = false, talking = false, ru.avatarURL, listenOnly = false)
- }
- }
- }
-
- val regUser = RegisteredUsers.getRegisteredUserWithToken(msg.authToken, msg.userID, liveMeeting.registeredUsers)
- regUser foreach { ru =>
- log.debug("Found registered user. metingId=" + props.meetingProp.intId + " userId=" + msg.userID + " ru=" + ru)
-
- val wUser = Users.findWithId(msg.userID, liveMeeting.users)
-
- val vu = initVoiceUser(msg.userID, ru)
-
- wUser.foreach { w =>
- if (!w.joinedWeb) {
- log.debug("User is in voice only. Mark as user left. metingId=" + props.meetingProp.intId + " userId=" + msg.userID)
- /**
- * If user is not joined through the web (perhaps reconnecting).
- * Send a user left event to clear up user list of all clients.
- */
- Users.userLeft(w.id, liveMeeting.users)
- outGW.send(new UserLeft(msg.meetingID, props.recordProp.record, w))
- }
- }
-
- /**
- * Initialize the newly joined user copying voice status in case this
- * join is due to a reconnect.
- */
- val waitingForAcceptance = ru.guest &&
- MeetingStatus2x.getGuestPolicy(liveMeeting.status) == GuestPolicy.ASK_MODERATOR && ru.waitingForAcceptance
- val lockStatus = getInitialLockStatus(ru.role)
+ /*
for {
uvo <- Users.newUser(msg.userID, lockStatus, ru, waitingForAcceptance, vu, liveMeeting.users)
@@ -102,6 +43,7 @@ trait UserJoiningHdlr {
startRecordingIfAutoStart()
}
}
- }
+ */
+
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeavingHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeavingHdlr.scala
index e94936c82b..c57cfbdd59 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeavingHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeavingHdlr.scala
@@ -1,8 +1,9 @@
package org.bigbluebutton.core2.message.handlers.users
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.UserLeaveReqMsg
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.core.api.{ UserJoinedVoiceConfMessage, UserLeaving, UserLeft }
-import org.bigbluebutton.core.models.Users
+import org.bigbluebutton.core.models.Users2x
import org.bigbluebutton.core.running.MeetingActor
trait UserLeavingHdlr {
@@ -10,30 +11,26 @@ trait UserLeavingHdlr {
val outGW: OutMessageGateway
- def handleUserLeft(msg: UserLeaving): Unit = {
+ def handle(msg: UserLeaveReqMsg): Unit = {
for {
- u <- Users.userLeft(msg.userID, liveMeeting.users)
+ u <- Users2x.remove(liveMeeting.users2x, msg.body.userId)
} yield {
- log.info("User left meeting. meetingId=" + props.meetingProp.intId + " userId=" + u.id + " user=" + u)
- outGW.send(new UserLeft(msg.meetingID, props.recordProp.record, u))
+ log.info("User left meeting. meetingId=" + props.meetingProp.intId + " userId=" + u.intId + " user=" + u)
- makeSurePresenterIsAssigned(u)
-
- val vu = u.voiceUser
- if (vu.joined || u.listenOnly) {
- /**
- * The user that left is still in the voice conference. Maybe this user just got disconnected
- * and is reconnecting. Make the user as joined only in the voice conference. If we get a
- * user left voice conference message, then we will remove the user from the users list.
- */
- switchUserToPhoneUser(new UserJoinedVoiceConfMessage(props.voiceProp.voiceConf,
- vu.userId, u.id, u.externalId, vu.callerName,
- vu.callerNum, vu.muted, vu.talking, vu.avatarURL, u.listenOnly));
- }
-
- captionApp2x.handleUserLeavingMsg(u.id)
+ captionApp2x.handleUserLeavingMsg(msg.body.userId)
liveMeeting.startCheckingIfWeNeedToEndVoiceConf()
stopAutoStartedRecording()
+ sendUserLeftMeetingEvtMsg(outGW, props.meetingProp.intId, msg.body.userId)
}
}
+
+ def sendUserLeftMeetingEvtMsg(outGW: OutMessageGateway, meetingId: String, userId: String): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId)
+ val envelope = BbbCoreEnvelope(UserLeftMeetingEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(UserLeftMeetingEvtMsg.NAME, meetingId, userId)
+ val body = UserLeftMeetingEvtMsgBody(userId)
+ val event = UserLeftMeetingEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+ }
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeftVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeftVoiceConfEvtMsgHdlr.scala
index 31fbeb55b5..8d3990b8bf 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeftVoiceConfEvtMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserLeftVoiceConfEvtMsgHdlr.scala
@@ -1,8 +1,39 @@
package org.bigbluebutton.core2.message.handlers.users
-/**
- * Created by ritz on 2017-06-09.
- */
-trait UserLeftVoiceConfEvtMsgHdlr {
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.voiceconf.{ UserLeftVoiceConfEvtMsg, UserLeftVoiceConfToClientEvtMsg, UserLeftVoiceConfToClientEvtMsgBody }
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.models.{ VoiceUserState, VoiceUsers }
+import org.bigbluebutton.core.running.MeetingActor
+trait UserLeftVoiceConfEvtMsgHdlr {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ def handle(msg: UserLeftVoiceConfEvtMsg): Unit = {
+ log.debug("Received UserLeftVoiceConfEvtMsg from FS {} ", msg.body.voiceUserId)
+
+ def broadcastEvent(vu: VoiceUserState): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId,
+ vu.intId)
+ val envelope = BbbCoreEnvelope(UserLeftVoiceConfToClientEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(UserLeftVoiceConfToClientEvtMsg.NAME, props.meetingProp.intId, vu.intId)
+
+ val body = UserLeftVoiceConfToClientEvtMsgBody(intId = vu.intId, voiceUserId = vu.intId)
+
+ val event = UserLeftVoiceConfToClientEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ record(event)
+ }
+
+ for {
+ user <- VoiceUsers.findWithVoiceUserId(liveMeeting.voiceUsers, msg.body.voiceUserId)
+ } yield {
+ VoiceUsers.removeWithIntId(liveMeeting.voiceUsers, user.intId)
+ broadcastEvent(user)
+ }
+ }
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserMutedInVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserMutedInVoiceConfEvtMsgHdlr.scala
index 50a7befb05..b4438bbff1 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserMutedInVoiceConfEvtMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserMutedInVoiceConfEvtMsgHdlr.scala
@@ -1,8 +1,37 @@
package org.bigbluebutton.core2.message.handlers.users
-/**
- * Created by ritz on 2017-06-09.
- */
-trait UserMutedInVoiceConfEvtMsgHdlr {
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.voiceconf._
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.models.{ VoiceUserState, VoiceUsers }
+import org.bigbluebutton.core.running.MeetingActor
+trait UserMutedInVoiceConfEvtMsgHdlr {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ def handle(msg: UserMutedInVoiceConfEvtMsg): Unit = {
+
+ def broadcastEvent(vu: VoiceUserState): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId,
+ vu.intId)
+ val envelope = BbbCoreEnvelope(UserMutedEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(UserMutedEvtMsg.NAME, props.meetingProp.intId, vu.intId)
+
+ val body = UserMutedEvtMsgBody(intId = vu.intId, voiceUserId = vu.intId, vu.muted)
+
+ val event = UserMutedEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ record(event)
+ }
+
+ for {
+ mutedUser <- VoiceUsers.userMuted(liveMeeting.voiceUsers, msg.body.voiceUserId, msg.body.muted)
+ } yield {
+ broadcastEvent(mutedUser)
+ }
+ }
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserTalkingInVoiceConfEvtMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserTalkingInVoiceConfEvtMsgHdlr.scala
index 3dda80b93a..1754091b05 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserTalkingInVoiceConfEvtMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/UserTalkingInVoiceConfEvtMsgHdlr.scala
@@ -1,8 +1,37 @@
package org.bigbluebutton.core2.message.handlers.users
-/**
- * Created by ritz on 2017-06-09.
- */
-trait UserTalkingInVoiceConfEvtMsgHdlr {
+import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.voiceconf._
+import org.bigbluebutton.core.OutMessageGateway
+import org.bigbluebutton.core.models.{ VoiceUserState, VoiceUsers }
+import org.bigbluebutton.core.running.MeetingActor
+trait UserTalkingInVoiceConfEvtMsgHdlr {
+ this: MeetingActor =>
+
+ val outGW: OutMessageGateway
+
+ def handle(msg: UserTalkingInVoiceConfEvtMsg): Unit = {
+
+ def broadcastEvent(vu: VoiceUserState): Unit = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId,
+ vu.intId)
+ val envelope = BbbCoreEnvelope(UserTalkingEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(UserTalkingEvtMsg.NAME, props.meetingProp.intId, vu.intId)
+
+ val body = UserTalkingEvtMsgBody(intId = vu.intId, voiceUserId = vu.intId, vu.talking)
+
+ val event = UserTalkingEvtMsg(header, body)
+ val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
+ outGW.send(msgEvent)
+
+ record(event)
+ }
+
+ for {
+ mutedUser <- VoiceUsers.userTalking(liveMeeting.voiceUsers, msg.body.voiceUserId, msg.body.talking)
+ } yield {
+ broadcastEvent(mutedUser)
+ }
+ }
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/ValidateAuthTokenReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/ValidateAuthTokenReqMsgHdlr.scala
index 89fd47a3e8..3faecf9cd9 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/ValidateAuthTokenReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/users/ValidateAuthTokenReqMsgHdlr.scala
@@ -1,12 +1,13 @@
package org.bigbluebutton.core2.message.handlers.users
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.ValidateAuthTokenReqMsg
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.core.models.{ RegisteredUsers, VoiceUsers, Webcams }
-import org.bigbluebutton.core.api.ValidateAuthToken
-import org.bigbluebutton.core.models.RegisteredUsers
+import org.bigbluebutton.core.models._
+import org.bigbluebutton.core.api.{ GuestPolicy, ValidateAuthToken }
import org.bigbluebutton.core.running.MeetingActor
-import org.bigbluebutton.core2.message.senders.{ GetVoiceUsersMeetingRespMsgBuilder, GetWebcamStreamsMeetingRespMsgBuilder, Sender, ValidateAuthTokenRespMsgSender }
+import org.bigbluebutton.core2.MeetingStatus2x
+import org.bigbluebutton.core2.message.senders._
trait ValidateAuthTokenReqMsgHdlr {
this: MeetingActor =>
@@ -14,25 +15,66 @@ trait ValidateAuthTokenReqMsgHdlr {
val outGW: OutMessageGateway
def handleValidateAuthTokenReqMsg(msg: ValidateAuthTokenReqMsg): Unit = {
- log.debug("****** RECEIVED ValidateAuthTokenReqMsg msg {}", msg)
+ log.debug("RECEIVED ValidateAuthTokenReqMsg msg {}", msg)
- val valid = RegisteredUsers.getRegisteredUserWithToken(msg.body.authToken, msg.body.userId, liveMeeting.registeredUsers) match {
- case Some(u) => true
- case None => false
+ RegisteredUsers.getRegisteredUserWithToken(msg.body.authToken, msg.body.userId, liveMeeting.registeredUsers) match {
+ case Some(u) =>
+
+ if (u.guest && u.waitingForAcceptance && MeetingStatus2x.getGuestPolicy(liveMeeting.status) == GuestPolicy.ASK_MODERATOR) {
+ ValidateAuthTokenRespMsgSender.send(outGW, meetingId = props.meetingProp.intId,
+ userId = msg.body.userId, authToken = msg.body.authToken, valid = true, waitForApproval = true)
+
+ val guest = GuestWaiting(u.id, u.name, u.role)
+ addGuestToWaitingForApproval(guest)
+ notifyModeratorsOfGuestWaiting(Vector(guest))
+ } else {
+
+ ValidateAuthTokenRespMsgSender.send(outGW, meetingId = props.meetingProp.intId,
+ userId = msg.body.userId, authToken = msg.body.authToken, valid = true, waitForApproval = false)
+ log.debug("validate token token={}, valid=true, waitForApproval=false", msg.body.authToken)
+
+ // Temp only so we can implement user handling in client. (ralam june 21, 2017)
+ userJoinMeeting(msg.body.authToken)
+ sendAllUsersInMeeting(msg.body.userId)
+ sendAllVoiceUsersInMeeting(msg.body.userId)
+ sendAllWebcamStreams(msg.body.userId)
+
+ if (!Users2x.hasPresenter(liveMeeting.users2x)) {
+ automaticallyAssignPresenter()
+ } else {
+ log.debug("Not sending presenter.")
+ }
+ }
+
+ case None =>
+ ValidateAuthTokenRespMsgSender.send(outGW, meetingId = props.meetingProp.intId,
+ userId = msg.body.userId, authToken = msg.body.authToken, valid = false, waitForApproval = false)
+ }
+ }
+
+ def notifyModeratorsOfGuestWaiting(guests: Vector[GuestWaiting]): Unit = {
+ def build(meetingId: String, userId: String, guests: Vector[GuestWaiting]): BbbCommonEnvCoreMsg = {
+ val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, meetingId, userId)
+ val envelope = BbbCoreEnvelope(GuestsWaitingApprovalEvtMsg.NAME, routing)
+ val header = BbbClientMsgHeader(GuestsWaitingApprovalEvtMsg.NAME, meetingId, userId)
+
+ val guestsWaiting = guests.map(g => GuestWaitingVO(g.intId, g.name, g.role))
+ val body = GuestsWaitingApprovalEvtMsgBody(guestsWaiting)
+ val event = GuestsWaitingApprovalEvtMsg(header, body)
+
+ BbbCommonEnvCoreMsg(envelope, event)
}
- sendOldValidateToken(props.meetingProp.intId, msg.body.userId, msg.body.authToken)
+ val mods = Users2x.findAll(liveMeeting.users2x).filter(p => p.role == Roles.MODERATOR_ROLE)
+ mods foreach { m =>
+ val event = build(liveMeeting.props.meetingProp.intId, m.intId, guests)
+ Sender.send(outGW, event)
+ }
- ValidateAuthTokenRespMsgSender.send(outGW, meetingId = props.meetingProp.intId,
- userId = msg.body.userId, authToken = msg.body.authToken, valid = valid)
+ }
- userJoinMeeting(msg.body.authToken)
-
- sendAllUsersInMeeting(msg.body.userId)
-
- sendAllVoiceUsersInMeeting(msg.body.userId)
-
- sendAllWebcamStreams(msg.body.userId)
+ def addGuestToWaitingForApproval(guest: GuestWaiting): Unit = {
+ GuestsWaiting.add(liveMeeting.guestsWaiting, guest)
}
def sendAllVoiceUsersInMeeting(requesterId: String): Unit = {
@@ -59,8 +101,15 @@ trait ValidateAuthTokenReqMsgHdlr {
Sender.send(outGW, event)
}
- def sendOldValidateToken(meetingId: String, userId: String, authToken: String): Unit = {
- handleValidateAuthToken(ValidateAuthToken(meetingID = meetingId, userId = userId, token = authToken,
- correlationId = authToken, sessionId = authToken))
+ def sendAllUsersInMeeting(requesterId: String): Unit = {
+ val users = Users2x.findAll(liveMeeting.users2x)
+ val webUsers = users.map { u =>
+ WebUser(intId = u.intId, extId = u.extId, name = u.name, role = u.role,
+ guest = u.guest, authed = u.authed, waitingForAcceptance = u.waitingForAcceptance, emoji = u.emoji,
+ locked = u.locked, presenter = u.presenter, avatar = u.avatar)
+ }
+
+ val event = GetUsersMeetingRespMsgBuilder.build(liveMeeting.props.meetingProp.intId, requesterId, webUsers)
+ Sender.send(outGW, event)
}
}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ClearWhiteboardPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ClearWhiteboardPubMsgHdlr.scala
index 415b674472..bee03c1627 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ClearWhiteboardPubMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ClearWhiteboardPubMsgHdlr.scala
@@ -2,8 +2,8 @@ package org.bigbluebutton.core2.message.handlers.whiteboard
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ ClearWhiteboardEvtMsgBody }
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.whiteboard.{ ClearWhiteboardEvtMsg, ClearWhiteboardEvtMsgBody, ClearWhiteboardPubMsg }
trait ClearWhiteboardPubMsgHdlr {
this: MeetingActor =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAccessReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAccessReqMsgHdlr.scala
index 31b6b65404..d6e5b852ff 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAccessReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAccessReqMsgHdlr.scala
@@ -2,8 +2,8 @@ package org.bigbluebutton.core2.message.handlers.whiteboard
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ GetWhiteboardAccessRespMsgBody }
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.whiteboard.{ GetWhiteboardAccessReqMsg, GetWhiteboardAccessRespMsg, GetWhiteboardAccessRespMsgBody }
trait GetWhiteboardAccessReqMsgHdlr {
this: MeetingActor =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala
index bd7a897e6b..6493e32816 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/GetWhiteboardAnnotationsReqMsgHdlr.scala
@@ -2,9 +2,9 @@ package org.bigbluebutton.core2.message.handlers.whiteboard
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ GetWhiteboardAnnotationsRespMsgBody }
import org.bigbluebutton.common2.messages._
-import org.bigbluebutton.common2.domain.AnnotationProps
+import org.bigbluebutton.common2.messages.whiteboard.{ GetWhiteboardAnnotationsReqMsg, GetWhiteboardAnnotationsRespMsg, GetWhiteboardAnnotationsRespMsgBody }
+import org.bigbluebutton.common2.domain.AnnotationVO
trait GetWhiteboardAnnotationsReqMsgHdlr {
this: MeetingActor =>
@@ -13,7 +13,7 @@ trait GetWhiteboardAnnotationsReqMsgHdlr {
def handleGetWhiteboardAnnotationsReqMsg(msg: GetWhiteboardAnnotationsReqMsg): Unit = {
- def broadcastEvent(msg: GetWhiteboardAnnotationsReqMsg, history: Array[AnnotationProps]): Unit = {
+ def broadcastEvent(msg: GetWhiteboardAnnotationsReqMsg, history: Array[AnnotationVO]): Unit = {
val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(GetWhiteboardAnnotationsRespMsg.NAME, routing)
val header = BbbClientMsgHeader(GetWhiteboardAnnotationsRespMsg.NAME, props.meetingProp.intId, msg.header.userId)
@@ -29,4 +29,4 @@ trait GetWhiteboardAnnotationsReqMsgHdlr {
val history = getWhiteboardAnnotations(msg.body.whiteboardId)
broadcastEvent(msg, history)
}
-}
\ No newline at end of file
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala
index 273a64d796..c3662e06c6 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/ModifyWhiteboardAccessPubMsgHdlr.scala
@@ -2,8 +2,8 @@ package org.bigbluebutton.core2.message.handlers.whiteboard
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ ModifyWhiteboardAccessEvtMsgBody }
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.whiteboard.{ ModifyWhiteboardAccessEvtMsg, ModifyWhiteboardAccessEvtMsgBody, ModifyWhiteboardAccessPubMsg }
trait ModifyWhiteboardAccessPubMsgHdlr {
this: MeetingActor =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendCursorPositionPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendCursorPositionPubMsgHdlr.scala
index 4c01d745fe..ef8dd7453a 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendCursorPositionPubMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendCursorPositionPubMsgHdlr.scala
@@ -2,8 +2,8 @@ package org.bigbluebutton.core2.message.handlers.whiteboard
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ SendCursorPositionEvtMsgBody }
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.whiteboard.{ SendCursorPositionEvtMsg, SendCursorPositionEvtMsgBody, SendCursorPositionPubMsg }
trait SendCursorPositionPubMsgHdlr {
this: MeetingActor =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala
index b537b44db3..370b360898 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/SendWhiteboardAnnotationPubMsgHdlr.scala
@@ -2,9 +2,9 @@ package org.bigbluebutton.core2.message.handlers.whiteboard
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ SendWhiteboardAnnotationEvtMsgBody }
import org.bigbluebutton.common2.messages._
-import org.bigbluebutton.common2.domain.AnnotationProps
+import org.bigbluebutton.common2.messages.whiteboard.{ SendWhiteboardAnnotationEvtMsg, SendWhiteboardAnnotationEvtMsgBody, SendWhiteboardAnnotationPubMsg }
+import org.bigbluebutton.common2.domain.AnnotationVO
trait SendWhiteboardAnnotationPubMsgHdlr {
this: MeetingActor =>
@@ -13,7 +13,7 @@ trait SendWhiteboardAnnotationPubMsgHdlr {
def handleSendWhiteboardAnnotationPubMsg(msg: SendWhiteboardAnnotationPubMsg): Unit = {
- def broadcastEvent(msg: SendWhiteboardAnnotationPubMsg, annotation: AnnotationProps): Unit = {
+ def broadcastEvent(msg: SendWhiteboardAnnotationPubMsg, annotation: AnnotationVO): Unit = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
val envelope = BbbCoreEnvelope(SendWhiteboardAnnotationEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(SendWhiteboardAnnotationEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/UndoWhiteboardPubMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/UndoWhiteboardPubMsgHdlr.scala
index 827f739629..7bf382c62e 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/UndoWhiteboardPubMsgHdlr.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/whiteboard/UndoWhiteboardPubMsgHdlr.scala
@@ -2,8 +2,8 @@ package org.bigbluebutton.core2.message.handlers.whiteboard
import org.bigbluebutton.core.running.MeetingActor
import org.bigbluebutton.core.OutMessageGateway
-import org.bigbluebutton.common2.messages.MessageBody.{ UndoWhiteboardEvtMsgBody }
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.whiteboard.{ UndoWhiteboardEvtMsg, UndoWhiteboardEvtMsgBody, UndoWhiteboardPubMsg }
trait UndoWhiteboardPubMsgHdlr {
this: MeetingActor =>
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgSenders1x.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgSenders1x.scala
index 6b8995ecc9..be4ad33b28 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgSenders1x.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/MsgSenders1x.scala
@@ -2,8 +2,8 @@ package org.bigbluebutton.core2.message.senders
import org.bigbluebutton.core.OutMessageGateway
import org.bigbluebutton.core.api.{ DisconnectUser, EjectVoiceUser, UserEjectedFromMeeting, UserLeft }
-import org.bigbluebutton.core.models.UserVO
import org.bigbluebutton.core.running.LiveMeeting
+import org.bigbluebutton.common2.domain.UserVO
trait MsgSenders1x {
val outGW: OutMessageGateway
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/ValidateAuthTokenRespMsgSender.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/ValidateAuthTokenRespMsgSender.scala
index 3a06539d8a..011e2067ff 100755
--- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/ValidateAuthTokenRespMsgSender.scala
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/ValidateAuthTokenRespMsgSender.scala
@@ -1,16 +1,17 @@
package org.bigbluebutton.core2.message.senders
-import org.bigbluebutton.common2.messages.MessageBody.ValidateAuthTokenRespMsgBody
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.{ ValidateAuthTokenRespMsg, ValidateAuthTokenRespMsgBody }
import org.bigbluebutton.core.OutMessageGateway
object ValidateAuthTokenRespMsgSender {
- def send(outGW: OutMessageGateway, meetingId: String, userId: String, authToken: String, valid: Boolean): Unit = {
+ def send(outGW: OutMessageGateway, meetingId: String, userId: String, authToken: String,
+ valid: Boolean, waitForApproval: Boolean): Unit = {
val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, meetingId, userId)
val envelope = BbbCoreEnvelope(ValidateAuthTokenRespMsg.NAME, routing)
val header = BbbClientMsgHeader(ValidateAuthTokenRespMsg.NAME, meetingId, userId)
- val body = ValidateAuthTokenRespMsgBody(userId, authToken, valid)
+ val body = ValidateAuthTokenRespMsgBody(userId, authToken, valid, waitForApproval)
val event = ValidateAuthTokenRespMsg(header, body)
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
outGW.send(msgEvent)
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/testdata/FakeTestData.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/testdata/FakeTestData.scala
new file mode 100755
index 0000000000..c31645bc11
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/testdata/FakeTestData.scala
@@ -0,0 +1,58 @@
+package org.bigbluebutton.core2.testdata
+
+import org.bigbluebutton.core.models._
+import org.bigbluebutton.core.running.LiveMeeting
+
+/**
+ * Create fake test data so we can populate meeting.
+ */
+trait FakeTestData {
+
+ def createFakeUsers(liveMeeting: LiveMeeting): Unit = {
+ createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, false, false, CallingWith.WEBRTC, muted = false,
+ talking = true, listenOnly = false)
+ createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, guest = true, authed = true, CallingWith.WEBRTC, muted = false,
+ talking = false, listenOnly = false)
+ createUserVoiceAndCam(liveMeeting, Roles.VIEWER_ROLE, guest = true, authed = true, CallingWith.WEBRTC, muted = false,
+ talking = false, listenOnly = false)
+ createUserVoiceAndCam(liveMeeting, Roles.VIEWER_ROLE, guest = true, authed = true, CallingWith.FLASH, muted = false,
+ talking = false, listenOnly = false)
+
+ val vu1 = FakeUserGenerator.createFakeVoiceOnlyUser(CallingWith.PHONE, muted = false, talking = false, listenOnly = false)
+ VoiceUsers.add(liveMeeting.voiceUsers, vu1)
+
+ val vu2 = FakeUserGenerator.createFakeVoiceOnlyUser(CallingWith.PHONE, muted = false, talking = false, listenOnly = false)
+ VoiceUsers.add(liveMeeting.voiceUsers, vu2)
+ val vu3 = FakeUserGenerator.createFakeVoiceOnlyUser(CallingWith.PHONE, muted = false, talking = false, listenOnly = false)
+ VoiceUsers.add(liveMeeting.voiceUsers, vu3)
+ val vu4 = FakeUserGenerator.createFakeVoiceOnlyUser(CallingWith.PHONE, muted = false, talking = false, listenOnly = false)
+ VoiceUsers.add(liveMeeting.voiceUsers, vu4)
+ val vu5 = FakeUserGenerator.createFakeVoiceOnlyUser(CallingWith.PHONE, muted = false, talking = false, listenOnly = false)
+ VoiceUsers.add(liveMeeting.voiceUsers, vu5)
+
+ }
+
+ def createUserVoiceAndCam(liveMeeting: LiveMeeting, role: String, guest: Boolean, authed: Boolean, callingWith: String,
+ muted: Boolean, talking: Boolean, listenOnly: Boolean): Unit = {
+
+ val ruser1 = FakeUserGenerator.createFakeRegisteredUser(liveMeeting.registeredUsers, Roles.MODERATOR_ROLE, true, false)
+
+ val vuser1 = FakeUserGenerator.createFakeVoiceUser(ruser1, "webrtc", muted = false, talking = true, listenOnly = false)
+ VoiceUsers.add(liveMeeting.voiceUsers, vuser1)
+
+ val rusers = Users2x.findAll(liveMeeting.users2x)
+ val others = rusers.filterNot(u => u.intId == ruser1.id)
+ val viewers = others.map { o => o.intId }
+ val wstream1 = FakeUserGenerator.createFakeWebcamStreamFor(ruser1.id, viewers.toSet)
+ Webcams.addWebcamBroadcastStream(liveMeeting.webcams, wstream1)
+
+ createFakeUser(liveMeeting, ruser1)
+ }
+
+ def createFakeUser(liveMeeting: LiveMeeting, regUser: RegisteredUser): Unit = {
+ val u = UserState(intId = regUser.id, extId = regUser.externId, name = regUser.name, role = regUser.role,
+ guest = regUser.guest, authed = regUser.authed, waitingForAcceptance = regUser.waitingForAcceptance,
+ emoji = "none", locked = false, presenter = false, avatar = regUser.avatarURL)
+ Users2x.add(liveMeeting.users2x, u)
+ }
+}
diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/testdata/FakeUserGenerator.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/testdata/FakeUserGenerator.scala
new file mode 100755
index 0000000000..f44ad992e0
--- /dev/null
+++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/testdata/FakeUserGenerator.scala
@@ -0,0 +1,86 @@
+package org.bigbluebutton.core2.testdata
+
+import org.bigbluebutton.core.models._
+import org.bigbluebutton.core.util.RandomStringGenerator
+
+import scala.util.Random
+
+/**
+ * Create fake names.
+ */
+object FakeUserGenerator {
+ private val random = new Random
+
+ // From Fake Name Generator (http://homepage.net/name_generator/)
+ private val firstNames = Seq("Abigail", "Alexandra", "Alison", "Amanda", "Amelia", "Amy", "Andrea", "Angela", "Anna", "Anne",
+ "Audrey", "Ava", "Bella", "Bernadette", "Carol", "Caroline", "Carolyn", "Chloe", "Claire", "Deirdre", "Diana",
+ "Diane", "Donna", "Dorothy", "Elizabeth", "Ella", "Emily", "Emma", "Faith", "Felicity", "Fiona", "Gabrielle",
+ "Grace", "Hannah", "Heather", "Irene", "Jan", "Jane", "Jasmine", "Jennifer", "Jessica", "Joan", "Joanne", "Julia",
+ "Karen", "Katherine", "Kimberly", "Kylie", "Lauren", "Leah", "Lillian", "Lily", "Lisa", "Madeleine", "Maria",
+ "Mary", "Megan", "Melanie", "Michelle", "Molly", "Natalie", "Nicola", "Olivia", "Penelope", "Pippa", "Rachel",
+ "Rebecca", "Rose", "Ruth", "Sally", "Samantha", "Sarah", "Sonia", "Sophie", "Stephanie", "Sue", "Theresa",
+ "Tracey", "Una", "Vanessa", "Victoria", "Virginia", "Wanda", "Wendy", "Yvonne", "Zoe", "Adam", "Adrian",
+ "Alan", "Alexander", "Andrew", "Anthony", "Austin", "Benjamin", "Blake", "Boris", "Brandon", "Brian",
+ "Cameron", "Carl", "Charles", "Christian", "Christopher", "Colin", "Connor", "Dan", "David", "Dominic",
+ "Dylan", "Edward", "Eric", "Evan", "Frank", "Gavin", "Gordon", "Harry", "Ian", "Isaac", "Jack", "Jacob",
+ "Jake", "James", "Jason", "Joe", "John", "Jonathan", "Joseph", "Joshua", "Julian", "Justin", "Keith", "Kevin",
+ "Leonard", "Liam", "Lucas", "Luke", "Matt", "Max", "Michael", "Nathan", "Neil", "Nicholas", "Oliver", "Owen",
+ "Paul", "Peter", "Phil", "Piers", "Richard", "Robert", "Ryan", "Sam", "Sean", "Sebastian", "Simon", "Stephen",
+ "Steven", "Stewart", "Thomas", "Tim", "Trevor", "Victor", "Warren", "William"
+ )
+
+ private val lastNames = Seq("Abraham", "Allan", "Alsop", "Anderson", "Arnold", "Avery", "Bailey", "Baker", "Ball", "Bell",
+ "Berry", "Black", "Blake", "Bond", "Bower", "Brown", "Buckland", "Burgess", "Butler", "Cameron", "Campbell",
+ "Carr", "Chapman", "Churchill", "Clark", "Clarkson", "Coleman", "Cornish", "Davidson", "Davies", "Dickens",
+ "Dowd", "Duncan", "Dyer", "Edmunds", "Ellison", "Ferguson", "Fisher", "Forsyth", "Fraser", "Gibson", "Gill",
+ "Glover", "Graham", "Grant", "Gray", "Greene", "Hamilton", "Hardacre", "Harris", "Hart", "Hemmings", "Henderson",
+ "Hill", "Hodges", "Howard", "Hudson", "Hughes", "Hunter", "Ince", "Jackson", "James", "Johnston", "Jones",
+ "Kelly", "Kerr", "King", "Knox", "Lambert", "Langdon", "Lawrence", "Lee", "Lewis", "Lyman", "MacDonald",
+ "Mackay", "Mackenzie", "MacLeod", "Manning", "Marshall", "Martin", "Mathis", "May", "McDonald", "McLean",
+ "McGrath", "Metcalfe", "Miller", "Mills", "Mitchell", "Morgan", "Morrison", "Murray", "Nash", "Newman",
+ "Nolan", "North", "Ogden", "Oliver", "Paige", "Parr", "Parsons", "Paterson", "Payne", "Peake", "Peters",
+ "Piper", "Poole", "Powell", "Pullman", "Quinn", "Rampling", "Randall", "Rees", "Reid", "Roberts", "Robertson",
+ "Ross", "Russell", "Rutherford", "Sanderson", "Scott", "Sharp", "Short", "Simpson", "Skinner", "Slater", "Smith",
+ "Springer", "Stewart", "Sutherland", "Taylor", "Terry", "Thomson", "Tucker", "Turner", "Underwood", "Vance",
+ "Vaughan", "Walker", "Wallace", "Walsh", "Watson", "Welch", "White", "Wilkins", "Wilson", "Wright", "Young"
+ )
+
+ private def getRandomElement(list: Seq[String], random: Random): String = list(random.nextInt(list.length))
+
+ def createFakeRegisteredUser(users: RegisteredUsers, role: String, guest: Boolean, authed: Boolean): RegisteredUser = {
+ val name = getRandomElement(firstNames, random) + " " + getRandomElement(lastNames, random)
+ val id = "w_" + RandomStringGenerator.randomAlphanumericString(16)
+ val extId = RandomStringGenerator.randomAlphanumericString(16)
+ val authToken = RandomStringGenerator.randomAlphanumericString(16)
+ val avatarURL = "https://www." + RandomStringGenerator.randomAlphanumericString(32) + ".com/" +
+ RandomStringGenerator.randomAlphanumericString(10) + ".png"
+
+ RegisteredUsers.create(userId = id, extId, name, role,
+ authToken, avatarURL, guest, authed, waitingForAcceptance = true, users)
+ }
+
+ def createFakeVoiceUser(user: RegisteredUser, callingWith: String, muted: Boolean, talking: Boolean,
+ listenOnly: Boolean): VoiceUserState = {
+ val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
+ VoiceUserState(intId = user.id, voiceUserId = voiceUserId, callingWith, callerName = user.name,
+ callerNum = user.name, muted, talking, listenOnly)
+ }
+
+ def createFakeVoiceOnlyUser(callingWith: String, muted: Boolean, talking: Boolean,
+ listenOnly: Boolean): VoiceUserState = {
+ val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
+ val intId = "v_" + RandomStringGenerator.randomAlphanumericString(16)
+ val name = getRandomElement(firstNames, random) + " " + getRandomElement(lastNames, random)
+ VoiceUserState(intId, voiceUserId = voiceUserId, callingWith, callerName = name,
+ callerNum = name, muted, talking, listenOnly)
+ }
+
+ def createFakeWebcamStreamFor(userId: String, viewers: Set[String]): WebcamStream = {
+ val streamId = RandomStringGenerator.randomAlphanumericString(10)
+ val url = "https://www." + RandomStringGenerator.randomAlphanumericString(32) + ".com/" + streamId
+ val attributes = collection.immutable.HashMap("height" -> "600", "width" -> "800", "codec" -> "h264")
+ val media = MediaStream(streamId, url: String, userId: String, attributes, viewers)
+ WebcamStream(streamId, stream = media)
+ }
+
+}
diff --git a/akka-bbb-fsesl/run.sh b/akka-bbb-fsesl/run.sh
new file mode 100755
index 0000000000..4015c4f137
--- /dev/null
+++ b/akka-bbb-fsesl/run.sh
@@ -0,0 +1,3 @@
+sbt clean
+sbt run
+
diff --git a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala
index 0a29dbb68b..5d46a94b65 100755
--- a/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala
+++ b/akka-bbb-fsesl/src/main/scala/org/bigbluebutton/freeswitch/VoiceConferenceService.scala
@@ -31,8 +31,6 @@ class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceSer
val json = JsonUtil.toJson(msgEvent)
sender.publish(fromVoiceConfRedisChannel, json)
- val oldmsg = new VoiceConfRecordingStartedMessage(voiceConfId, recordStream, recording, timestamp)
- sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, oldmsg.toJson())
}
def userJoinedVoiceConf(voiceConfId: String, voiceUserId: String, userId: String, callerIdName: String,
@@ -51,8 +49,6 @@ class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceSer
val json = JsonUtil.toJson(msgEvent)
sender.publish(fromVoiceConfRedisChannel, json)
- val oldmsg = new UserJoinedVoiceConfMessage(voiceConfId, voiceUserId, userId, callerIdName, callerIdNum, muted, talking, avatarURL)
- sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, oldmsg.toJson())
}
def userLeftVoiceConf(voiceConfId: String, voiceUserId: String) {
@@ -68,8 +64,6 @@ class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceSer
val json = JsonUtil.toJson(msgEvent)
sender.publish(fromVoiceConfRedisChannel, json)
- val oldmsg = new UserLeftVoiceConfMessage(voiceConfId, voiceUserId)
- sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, oldmsg.toJson())
}
def userLockedInVoiceConf(voiceConfId: String, voiceUserId: String, locked: java.lang.Boolean) {
@@ -89,8 +83,6 @@ class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceSer
val json = JsonUtil.toJson(msgEvent)
sender.publish(fromVoiceConfRedisChannel, json)
- val oldmsg = new UserMutedInVoiceConfMessage(voiceConfId, voiceUserId, muted)
- sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, oldmsg.toJson())
}
def userTalkingInVoiceConf(voiceConfId: String, voiceUserId: String, talking: java.lang.Boolean) {
@@ -106,8 +98,6 @@ class VoiceConferenceService(sender: RedisPublisher) extends IVoiceConferenceSer
val json = JsonUtil.toJson(msgEvent)
sender.publish(fromVoiceConfRedisChannel, json)
- val oldmsg = new UserTalkingInVoiceConfMessage(voiceConfId, voiceUserId, talking)
- sender.publish(FROM_VOICE_CONF_SYSTEM_CHAN, oldmsg.toJson())
}
def deskShareStarted(voiceConfId: String, callerIdNum: String, callerIdName: String) {
diff --git a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/MsgToClientGW.scala b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/MsgToClientGW.scala
index f4dfbe93dd..bd63b7bbdf 100755
--- a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/MsgToClientGW.scala
+++ b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/MsgToClientGW.scala
@@ -9,12 +9,12 @@ case class DisconnectAllConnections(scope: String) extends SystemMessage
class MsgToClientGW(val connInvokerService: IConnectionInvokerService) {
def broadcastToMeeting(msg: BroadcastToMeetingMsg): Unit = {
- println("**** MsgToClientGW broadcastToMeeting " + msg.json)
+ //println("**** MsgToClientGW broadcastToMeeting " + msg.json)
connInvokerService.sendMessage(msg)
}
def directToClient(msg: DirectToClientMsg): Unit = {
- println("**** MsgToClientGW directToClient " + msg.json)
+ //println("**** MsgToClientGW directToClient " + msg.json)
connInvokerService.sendMessage(msg)
}
diff --git a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/SystemConfiguration.scala b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/SystemConfiguration.scala
index 1aac88b78a..94f38416f4 100755
--- a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/SystemConfiguration.scala
+++ b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/SystemConfiguration.scala
@@ -4,7 +4,7 @@ import scala.util.Try
import com.typesafe.config.ConfigFactory
trait SystemConfiguration {
- val config = ConfigFactory.load("bbb-app")
+ val config = ConfigFactory.load()
lazy val redisHost = Try(config.getString("redis.host")).getOrElse("127.0.0.1")
lazy val redisPort = Try(config.getInt("redis.port")).getOrElse(6379)
diff --git a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/Connections.scala b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/Connections.scala
index 76768216b7..104e265c91 100755
--- a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/Connections.scala
+++ b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/Connections.scala
@@ -28,6 +28,10 @@ object Connections {
def remove(conns: Connections, connId: String): Option[Connection] = {
conns.remove(connId)
}
+
+ def noMoreConnections(conns: Connections): Boolean = {
+ conns.toVector.length == 0
+ }
}
class Connections {
diff --git a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/MeetingManagerActor.scala b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/MeetingManagerActor.scala
index 3fa8f5b944..dd874ca6d6 100755
--- a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/MeetingManagerActor.scala
+++ b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/MeetingManagerActor.scala
@@ -78,7 +78,7 @@ class MeetingManagerActor(msgToAkkaAppsEventBus: MsgToAkkaAppsEventBus,
private def forwardToMeeting(msg: BbbCommonEnvJsNodeMsg): Unit = {
msg.envelope.routing.get("meetingId") match {
- case Some(meetingId2) => println("**** MeetingManagerActor forwardToMeeting. Found " + meetingId2)
+ case Some(meetingId2) => log.debug("**** MeetingManagerActor forwardToMeeting. Found " + meetingId2)
MeetingManager.findWithMeetingId(meetingMgr, meetingId2) match {
case Some(meetingId2) => log.debug("**** MeetingManagerActor forwardToMeeting. Found " + meetingId2.meetingId)
case None => log.debug("**** MeetingManagerActor forwardToMeeting. Could not find meetingId")
diff --git a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/UserActor.scala b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/UserActor.scala
index 6eca7821f1..0804114ffa 100755
--- a/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/UserActor.scala
+++ b/bbb-apps-common/src/main/scala/org/bigbluebutton/client/meeting/UserActor.scala
@@ -1,11 +1,12 @@
package org.bigbluebutton.client.meeting
import akka.actor.{Actor, ActorLogging, Props}
-import org.bigbluebutton.client.SystemConfiguration
+import org.bigbluebutton.client.{ConnInfo, SystemConfiguration}
import org.bigbluebutton.client.bus._
import org.bigbluebutton.common2.messages._
import org.bigbluebutton.common2.util.JsonUtil
import com.fasterxml.jackson.databind.JsonNode
+import org.bigbluebutton.common2.messages.users.{UserLeaveReqMsg, UserLeaveReqMsgBody}
import scala.util.{Failure, Success}
@@ -62,8 +63,22 @@ class UserActor(val userId: String,
log.debug("**** UserActor remove connection " + m.connId)
Connections.remove(conns, m.connId)
}
+
+ if (Connections.noMoreConnections(conns)) {
+ val json = buildUserLeavingMessage(msg.connInfo)
+ val msgFromClient = MsgFromClientMsg(msg.connInfo, json)
+ handleMsgFromClientMsg(msgFromClient)
+ }
}
+ private def buildUserLeavingMessage(connInfo: ConnInfo): String = {
+ val header = BbbClientMsgHeader(UserLeaveReqMsg.NAME, meetingId, userId)
+ val body = UserLeaveReqMsgBody(userId, connInfo.sessionId)
+ val event = UserLeaveReqMsg(header, body)
+ JsonUtil.toJson(event)
+ }
+
+
def handleMsgFromClientMsg(msg: MsgFromClientMsg):Unit = {
log.debug("Received MsgFromClientMsg " + msg)
@@ -141,5 +156,3 @@ class UserActor(val userId: String,
}
}
}
-
-
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala
index da44faf092..ac5934245b 100755
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Meeting2x.scala
@@ -27,7 +27,6 @@ case class DefaultProps(meetingProp: MeetingProp, breakoutProps: BreakoutProps,
recordProp: RecordProp, welcomeProp: WelcomeProp, voiceProp: VoiceProp,
usersProp: UsersProp, metadataProp: MetadataProp, screenshareProps: ScreenshareProps)
-
case class StartEndTimeStatus(startTime: Long, endTime: Long)
case class RecordingStatus(isRecording: Boolean)
case class GuestPolicyStatus(currentGuestPolicy: String)
@@ -45,3 +44,13 @@ case class Responder(userId: String, name: String)
case class AnswerVO(id: Int, key: String, text: Option[String], responders: Option[Array[Responder]])
case class QuestionVO(id: Int, questionType: String, multiResponse: Boolean, questionText: Option[String], answers: Option[Array[AnswerVO]])
case class PollVO(id: String, questions: Array[QuestionVO], title: Option[String], started: Boolean, stopped: Boolean, showResult: Boolean)
+
+case class UserVO(id: String, externalId: String, name: String, role: String,
+ guest: Boolean, authed: Boolean, waitingForAcceptance: Boolean, emojiStatus: String,
+ presenter: Boolean, hasStream: Boolean, locked: Boolean, webcamStreams: Set[String],
+ phoneUser: Boolean, voiceUser: VoiceUserVO, listenOnly: Boolean, avatarURL: String,
+ joinedWeb: Boolean)
+
+case class VoiceUserVO(userId: String, webUserId: String, callerName: String,
+ callerNum: String, joined: Boolean, locked: Boolean, muted: Boolean,
+ talking: Boolean, avatarURL: String, listenOnly: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Presentation.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Presentation.scala
new file mode 100755
index 0000000000..8a38c2bfbe
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Presentation.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.domain
+
+case class PresentationVO(id: String, name: String, current: Boolean = false,
+ pages: Vector[PageVO], downloadable: Boolean)
+
+case class PageVO(id: String, num: Int, thumbUri: String = "", swfUri: String,
+ txtUri: String, svgUri: String, current: Boolean = false, xOffset: Double = 0,
+ yOffset: Double = 0, widthRatio: Double = 100D, heightRatio: Double = 100D)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Whiteboard.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Whiteboard.scala
index 3747210648..cdec63594a 100755
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Whiteboard.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Whiteboard.scala
@@ -1,3 +1,3 @@
package org.bigbluebutton.common2.domain
-case class AnnotationProps(id: String, status: String, annotationType: String, annotationInfo: scala.collection.immutable.Map[String, Object], wbId: String, userId: String, position: Int)
\ No newline at end of file
+case class AnnotationVO(id: String, status: String, annotationType: String, annotationInfo: scala.collection.immutable.Map[String, Object], wbId: String, userId: String, position: Int)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/CreateMeetingReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/CreateMeetingReqMsg.scala
new file mode 100755
index 0000000000..a8e4ba392d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/CreateMeetingReqMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages
+
+import org.bigbluebutton.common2.domain.DefaultProps
+
+object CreateMeetingReqMsg { val NAME = "CreateMeetingReqMsg" }
+case class CreateMeetingReqMsg(header: BbbCoreBaseHeader,
+ body: CreateMeetingReqMsgBody) extends BbbCoreMsg
+
+case class CreateMeetingReqMsgBody(props: DefaultProps)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GetGuestsWaitingApprovalRespMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GetGuestsWaitingApprovalRespMsg.scala
index 8d987cdfe6..25d6ed6771 100755
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GetGuestsWaitingApprovalRespMsg.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GetGuestsWaitingApprovalRespMsg.scala
@@ -3,16 +3,16 @@ package org.bigbluebutton.common2.messages
object GetGuestsWaitingApprovalRespMsg {
val NAME = "GetGuestsWaitingApprovalRespMsg"
- def apply(meetingId: String, userId: String, users: Vector[WebUser]): GetGuestsWaitingApprovalRespMsg = {
+ def apply(meetingId: String, userId: String, guests: Vector[GuestWaitingVO]): GetGuestsWaitingApprovalRespMsg = {
val header = BbbClientMsgHeader(GetGuestsWaitingApprovalRespMsg.NAME, meetingId, userId)
- val body = GetGuestsWaitingApprovalRespMsgBody(users)
+ val body = GetGuestsWaitingApprovalRespMsgBody(guests)
GetGuestsWaitingApprovalRespMsg(header, body)
}
-
}
-case class GetGuestsWaitingApprovalRespMsg(header: BbbClientMsgHeader, body: GetGuestsWaitingApprovalRespMsgBody) extends BbbCoreMsg
-case class GetGuestsWaitingApprovalRespMsgBody(users: Vector[WebUser])
+case class GetGuestsWaitingApprovalRespMsg(header: BbbClientMsgHeader,
+ body: GetGuestsWaitingApprovalRespMsgBody) extends BbbCoreMsg
+case class GetGuestsWaitingApprovalRespMsgBody(guests: Vector[GuestWaitingVO])
-case class Guest(intId: String, name: String, role: String)
\ No newline at end of file
+case class GuestWaitingVO(intId: String, name: String, role: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovalEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovalEvtMsg.scala
new file mode 100755
index 0000000000..9be99b6334
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovalEvtMsg.scala
@@ -0,0 +1,17 @@
+package org.bigbluebutton.common2.messages
+
+object GuestsWaitingApprovalEvtMsg {
+ val NAME = "GuestsWaitingApprovalEvtMsg"
+
+ def apply(meetingId: String, userId: String, guests: Vector[GuestWaitingVO]): GuestsWaitingApprovalEvtMsg = {
+ val header = BbbClientMsgHeader(GetGuestsWaitingApprovalRespMsg.NAME, meetingId, userId)
+
+ val body = GuestsWaitingApprovalEvtMsgBody(guests)
+ GuestsWaitingApprovalEvtMsg(header, body)
+ }
+}
+
+case class GuestsWaitingApprovalEvtMsg(header: BbbClientMsgHeader,
+ body: GuestsWaitingApprovalEvtMsgBody) extends BbbCoreMsg
+case class GuestsWaitingApprovalEvtMsgBody(guests: Vector[GuestWaitingVO])
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovedEvtMsg.scala
new file mode 100755
index 0000000000..b0f5957e74
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovedEvtMsg.scala
@@ -0,0 +1,17 @@
+package org.bigbluebutton.common2.messages
+
+object GuestsWaitingApprovedEvtMsg {
+ val NAME = "GuestsWaitingApprovedEvtMsg"
+
+ def apply(meetingId: String, userId: String, guests: Vector[GuestWaitingVO]): GuestsWaitingApprovedEvtMsg = {
+ val header = BbbClientMsgHeader(GetGuestsWaitingApprovalRespMsg.NAME, meetingId, userId)
+
+ val body = GuestsWaitingApprovedEvtMsgBody(guests)
+ GuestsWaitingApprovedEvtMsg(header, body)
+ }
+}
+
+case class GuestsWaitingApprovedEvtMsg(header: BbbClientMsgHeader,
+ body: GuestsWaitingApprovedEvtMsgBody) extends BbbCoreMsg
+case class GuestsWaitingApprovedEvtMsgBody(guests: Vector[GuestWaitingVO])
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovedMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovedMsg.scala
new file mode 100755
index 0000000000..2ccdb8b764
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/GuestsWaitingApprovedMsg.scala
@@ -0,0 +1,17 @@
+package org.bigbluebutton.common2.messages
+
+object GuestsWaitingApprovedMsg {
+ val NAME = "GuestsWaitingApprovedMsg"
+
+ def apply(meetingId: String, userId: String, guests: Vector[String]): GuestsWaitingApprovedMsg = {
+ val header = BbbClientMsgHeader(GetGuestsWaitingApprovalRespMsg.NAME, meetingId, userId)
+
+ val body = GuestsWaitingApprovedMsgBody(guests)
+ GuestsWaitingApprovedMsg(header, body)
+ }
+}
+
+case class GuestsWaitingApprovedMsg(header: BbbClientMsgHeader,
+ body: GuestsWaitingApprovedMsgBody) extends BbbCoreMsg
+case class GuestsWaitingApprovedMsgBody(guests: Vector[String])
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/MeetingCreatedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/MeetingCreatedEvtMsg.scala
new file mode 100755
index 0000000000..e99f62c551
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/MeetingCreatedEvtMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages
+
+import org.bigbluebutton.common2.domain.DefaultProps
+
+object MeetingCreatedEvtMsg { val NAME = "MeetingCreatedEvtMsg"}
+case class MeetingCreatedEvtMsg(header: BbbCoreBaseHeader,
+ body: MeetingCreatedEvtBody) extends BbbCoreMsg
+case class MeetingCreatedEvtBody(props: DefaultProps)
+
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/MessageBody.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/MessageBody.scala
index a956e65d11..7d34872462 100755
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/MessageBody.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/MessageBody.scala
@@ -1,52 +1,32 @@
package org.bigbluebutton.common2.messages
-import org.bigbluebutton.common2.domain.DefaultProps
-import org.bigbluebutton.common2.domain.AnnotationProps
import org.bigbluebutton.common2.domain._
object MessageBody {
- case class CreateMeetingReqMsgBody(props: DefaultProps)
- case class MeetingCreatedEvtBody(props: DefaultProps)
- case class ValidateAuthTokenReqMsgBody(userId: String, authToken: String)
- case class RegisterUserReqMsgBody(meetingId: String, intUserId: String, name: String, role: String,
- extUserId: String, authToken: String, avatarURL: String,
- guest: Boolean, authed: Boolean)
- case class ValidateAuthTokenRespMsgBody(userId: String, authToken: String, valid: Boolean)
- case class UserLeaveReqMsgBody(userId: String, sessionId: String)
- case class GetUsersReqMsgBody(requesterId: String)
case class UserEmojiStatusChangeReqMsgBody(userId: String, emoji: String)
case class EjectUserFromMeetingReqMsgBody(userId: String, requesterId: String)
- case class UserBroadcastCamStartMsgBody(stream: String)
- case class UserBroadcastCamStopMsgBody(stream: String)
+
+
case class ChangeUserStatusReqMsgBody(userId: String, status: String, value: String)
case class ChangeUserRoleReqMsgBody(userId: String, role: String)
case class AssignPresenterReqMsgBody(userId: String, requesterId: String)
case class SetRecordingReqMsgBody(recording: Boolean, requesterId: String)
case class GetRecordingStatusReqMsgBody(requesterId: String)
case class AllowUserToShareDesktopReqMsgBody(userId: String)
- case class StartPollReqMsgBody(requesterId: String, pollId: String, pollType: String)
- case class StartCustomPollReqMsgBody(requesterId: String, pollId: String, pollType: String, answers: Seq[String])
- case class StopPollReqMsgBody(requesterId: String)
- case class ShowPollResultReqMsgBody(requesterId: String, pollId: String)
- case class HidePollResultReqMsgBody(requesterId: String, pollId: String)
- case class GetCurrentPollReqMsgBody(requesterId: String)
- case class RespondToPollReqMsgBody(requesterId: String, pollId: String, questionId: Int, answerId: Int)
- // Whiteboard Message Bodies
- case class SendCursorPositionPubMsgBody(xPercent: Double, yPercent: Double)
- case class SendWhiteboardAnnotationPubMsgBody(annotation: AnnotationProps)
- case class GetWhiteboardAnnotationsReqMsgBody(whiteboardId: String)
- case class ClearWhiteboardPubMsgBody(whiteboardId: String)
- case class UndoWhiteboardPubMsgBody(whiteboardId: String)
- case class ModifyWhiteboardAccessPubMsgBody(multiUser: Boolean)
- case class GetWhiteboardAccessReqMsgBody(requesterId: String)
+ // Presentation Message Bodies
+ case class SetCurrentPresentationPubMsgBody(presentationId: String)
+ case class SetCurrentPagePubMsgBody(presentationId: String, pageId: String)
+ case class ResizeAndMovePagePubMsgBody(presentationId: String, pageId: String, xOffset: Double, yOffset: Double, widthRatio: Double, heightRatio: Double)
+ case class RemovePresentationPubMsgBody(presentationId: String)
+ case class PreuploadedPresentationsPubMsgBody(presentations: Vector[PresentationVO])
+ case class PresentationConversionUpdatePubMsgBody(messageKey: String, code: String, presentationId: String, presName: String)
+ case class PresentationPageCountErrorPubMsgBody(messageKey: String, code: String, presentationId: String, numberOfPages: Int, maxNumberPages: Int, presName: String)
+ case class PresentationPageGeneratedPubMsgBody(messageKey: String, code: String, presentationId: String, numberOfPages: Int, pagesCompleted: Int, presName: String)
+ case class PresentationConversionCompletedPubMsgBody(messageKey: String, code: String, presentation: PresentationVO)
- // Caption Message Bodies
- case class EditCaptionHistoryPubMsgBody(startIndex: Integer, endIndex: Integer, locale: String, localeCode: String, text: String)
- case class UpdateCaptionOwnerPubMsgBody(locale: String, localeCode: String, ownerId: String)
- case class SendCaptionHistoryReqMsgBody()
//
/** Event messages sent by Akka apps as result of receiving incoming messages ***/
//
@@ -54,29 +34,17 @@ object MessageBody {
///////////////////////////////////////////
// Out Message Bodies
///////////////////////////////////////////
-
- case class UserBroadcastCamStartedEvtMsgBody(userId: String, stream: String)
- case class UserBroadcastCamStoppedEvtMsgBody(userId: String, stream: String)
-
- // Whiteboard Message Bodies
- case class SendCursorPositionEvtMsgBody(xPercent: Double, yPercent: Double)
- case class SendWhiteboardAnnotationEvtMsgBody(annotation: AnnotationProps)
- case class GetWhiteboardAnnotationsRespMsgBody(whiteboardId: String, annotations: Array[AnnotationProps])
- case class ClearWhiteboardEvtMsgBody(whiteboardId: String, userId: String, fullClear: Boolean)
- case class UndoWhiteboardEvtMsgBody(whiteboardId: String, userId: String, annotationId: String)
- case class ModifyWhiteboardAccessEvtMsgBody(multiUser: Boolean)
- case class GetWhiteboardAccessRespMsgBody(multiUser: Boolean)
+ // Presentation Message Bodies
+ case class NewPresentationEvtMsgBody(presentation: PresentationVO)
+ case class SetCurrentPresentationEvtMsgBody(presentationId: String)
+ case class GetPresentationInfoRespMsgBody(presentations: Vector[PresentationVO])
+ case class SetCurrentPageEvtMsgBody(presentationId: String, pageId: String)
+ case class ResizeAndMovePageEvtMsgBody(presentationId: String, pageId: String, xOffset: Double, yOffset: Double, widthRatio: Double, heightRatio: Double)
+ case class RemovePresentationEvtMsgBody(presentationId: String)
+ case class PresentationConversionUpdateEvtMsgBody(messageKey: String, code: String, presentationId: String, presName: String)
+ case class PresentationPageCountErrorEvtMsgBody(messageKey: String, code: String, presentationId: String, numberOfPages: Int, maxNumberPages: Int, presName: String)
+ case class PresentationPageGeneratedEvtMsgBody(messageKey: String, code: String, presentationId: String, numberOfPages: Int, pagesCompleted: Int, presName: String)
+ case class PresentationConversionCompletedEvtMsgBody(messageKey: String, code: String, presentation: PresentationVO)
- case class PollStartedEvtMsgBody(userId: String, pollId: String, poll: SimplePollOutVO)
- case class PollStoppedEvtMsgBody(userId: String, pollId: String)
- case class PollShowResultEvtMsgBody(userId: String, pollId: String, poll: SimplePollResultOutVO)
- case class PollHideResultEvtMsgBody(userId: String, pollId: String)
- case class GetCurrentPollRespMsgBody(userId: String, hasPoll: Boolean, poll: Option[PollVO])
- case class UserRespondedToPollEvtMsgBody(presenterId: String, pollId: String, poll: SimplePollResultOutVO)
-
- // Caption Message Bodies
- case class SendCaptionHistoryRespMsgBody(history: Map[String, TranscriptVO])
- case class EditCaptionHistoryEvtMsgBody(startIndex: Integer, endIndex: Integer, locale: String, localeCode: String, text: String)
- case class UpdateCaptionOwnerEvtMsgBody(locale: String, localeCode: String, ownerId: String)
}
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/Messages.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/Messages.scala
index 9b8ce417a5..115e3fdd5a 100755
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/Messages.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/Messages.scala
@@ -1,6 +1,7 @@
package org.bigbluebutton.common2.messages
import com.fasterxml.jackson.databind.JsonNode
+import org.bigbluebutton.common2.domain._
import org.bigbluebutton.common2.messages.MessageBody._
object MessageTypes {
@@ -31,162 +32,70 @@ case class BbbCoreMessageFromClient(header: BbbClientMsgHeader, body: JsonNode)
case class BbbCoreHeaderBody(header: BbbCoreHeader, body: JsonNode)
-object CreateMeetingReqMsg { val NAME = "CreateMeetingReqMsg" }
-case class CreateMeetingReqMsg(header: BbbCoreBaseHeader,
- body: CreateMeetingReqMsgBody) extends BbbCoreMsg
-object RegisterUserReqMsg { val NAME = "RegisterUserReqMsg" }
-case class RegisterUserReqMsg(header: BbbCoreHeaderWithMeetingId,
- body: RegisterUserReqMsgBody) extends BbbCoreMsg
+/** Presentation Messages */
+object SetCurrentPresentationPubMsg { val NAME = "SetCurrentPresentationPubMsg"}
+case class SetCurrentPresentationPubMsg(header: BbbClientMsgHeader, body: SetCurrentPresentationPubMsgBody) extends StandardMsg
-object ValidateAuthTokenReqMsg { val NAME = "ValidateAuthTokenReqMsg" }
-case class ValidateAuthTokenReqMsg(header: BbbClientMsgHeader,
- body: ValidateAuthTokenReqMsgBody) extends BbbCoreMsg
+object GetPresentationInfoReqMsg { val NAME = "GetPresentationInfoReqMsg"}
+case class GetPresentationInfoReqMsg(header: BbbClientMsgHeader, body: GetPresentationInfoReqMsgBody) extends StandardMsg
+case class GetPresentationInfoReqMsgBody(userId: String)
+
+object SetCurrentPagePubMsg { val NAME = "SetCurrentPagePubMsg"}
+case class SetCurrentPagePubMsg(header: BbbClientMsgHeader, body: SetCurrentPagePubMsgBody) extends StandardMsg
+
+object ResizeAndMovePagePubMsg { val NAME = "ResizeAndMovePagePubMsg"}
+case class ResizeAndMovePagePubMsg(header: BbbClientMsgHeader, body: ResizeAndMovePagePubMsgBody) extends StandardMsg
+
+object RemovePresentationPubMsg { val NAME = "RemovePresentationPubMsg"}
+case class RemovePresentationPubMsg(header: BbbClientMsgHeader, body: RemovePresentationPubMsgBody) extends StandardMsg
+
+object PreuploadedPresentationsPubMsg { val NAME = "PreuploadedPresentationsPubMsg"}
+case class PreuploadedPresentationsPubMsg(header: BbbClientMsgHeader, body: PreuploadedPresentationsPubMsgBody) extends StandardMsg
+
+object PresentationConversionUpdatePubMsg { val NAME = "PresentationConversionUpdatePubMsg"}
+case class PresentationConversionUpdatePubMsg(header: BbbClientMsgHeader, body: PresentationConversionUpdatePubMsgBody) extends StandardMsg
+
+object PresentationPageCountErrorPubMsg { val NAME = "PresentationPageCountErrorPubMsg"}
+case class PresentationPageCountErrorPubMsg(header: BbbClientMsgHeader, body: PresentationPageCountErrorPubMsgBody) extends StandardMsg
+
+object PresentationPageGeneratedPubMsg { val NAME = "PresentationPageGeneratedPubMsg"}
+case class PresentationPageGeneratedPubMsg(header: BbbClientMsgHeader, body: PresentationPageGeneratedPubMsgBody) extends StandardMsg
+
+object PresentationConversionCompletedPubMsg { val NAME = "PresentationConversionCompletedPubMsg"}
+case class PresentationConversionCompletedPubMsg(header: BbbClientMsgHeader, body: PresentationConversionCompletedPubMsgBody) extends StandardMsg
-object UserJoinMeetingReqMsg { val NAME = "UserJoinMeetingReqMsg" }
-case class UserJoinMeetingReqMsg(header: BbbClientMsgHeader, body: UserJoinMeetingReqMsgBody) extends BbbCoreMsg
-case class UserJoinMeetingReqMsgBody(userId: String, authToken: String)
+/** Presentation Messages */
+object NewPresentationEvtMsg { val NAME = "NewPresentationEvtMsg"}
+case class NewPresentationEvtMsg(header: BbbClientMsgHeader, body: NewPresentationEvtMsgBody) extends BbbCoreMsg
-object UserLeaveReqMsg { val NAME = "UserLeaveReqMsg" }
-case class UserLeaveReqMsg(header: BbbClientMsgHeader, body: UserLeaveReqMsgBody) extends BbbCoreMsg
+object SetCurrentPresentationEvtMsg { val NAME = "SetCurrentPresentationEvtMsg"}
+case class SetCurrentPresentationEvtMsg(header: BbbClientMsgHeader, body: SetCurrentPresentationEvtMsgBody) extends BbbCoreMsg
-object GetUsersReqMsg { val NAME = "GetUsersReqMsg" }
-case class GetUsersReqMsg(header: BbbClientMsgHeader, body: GetUsersReqMsgBody) extends BbbCoreMsg
+object GetPresentationInfoRespMsg { val NAME = "GetPresentationInfoRespMsg"}
+case class GetPresentationInfoRespMsg(header: BbbClientMsgHeader, body: GetPresentationInfoRespMsgBody) extends BbbCoreMsg
-object UserBroadcastCamStartMsg { val NAME = "UserBroadcastCamStartMsg" }
-case class UserBroadcastCamStartMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStartMsgBody) extends BbbCoreMsg
+object SetCurrentPageEvtMsg { val NAME = "SetCurrentPageEvtMsg"}
+case class SetCurrentPageEvtMsg(header: BbbClientMsgHeader, body: SetCurrentPageEvtMsgBody) extends BbbCoreMsg
-object UserBroadcastCamStopMsg { val NAME = "UserBroadcastCamStopMsg" }
-case class UserBroadcastCamStopMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStopMsgBody) extends BbbCoreMsg
+object ResizeAndMovePageEvtMsg { val NAME = "ResizeAndMovePageEvtMsg"}
+case class ResizeAndMovePageEvtMsg(header: BbbClientMsgHeader, body: ResizeAndMovePageEvtMsgBody) extends BbbCoreMsg
-/** Whiteboard Messages */
-object SendCursorPositionPubMsg { val NAME = "SendCursorPositionPubMsg"}
-case class SendCursorPositionPubMsg(header: BbbClientMsgHeader, body: SendCursorPositionPubMsgBody) extends StandardMsg
+object RemovePresentationEvtMsg { val NAME = "RemovePresentationEvtMsg"}
+case class RemovePresentationEvtMsg(header: BbbClientMsgHeader, body: RemovePresentationEvtMsgBody) extends BbbCoreMsg
-object SendWhiteboardAnnotationPubMsg { val NAME = "SendWhiteboardAnnotationPubMsg"}
-case class SendWhiteboardAnnotationPubMsg(header: BbbClientMsgHeader, body: SendWhiteboardAnnotationPubMsgBody) extends StandardMsg
+object PresentationConversionUpdateEvtMsg { val NAME = "PresentationConversionUpdateEvtMsg"}
+case class PresentationConversionUpdateEvtMsg(header: BbbClientMsgHeader, body: PresentationConversionUpdateEvtMsgBody) extends BbbCoreMsg
-object GetWhiteboardAnnotationsReqMsg { val NAME = "GetWhiteboardAnnotationsReqMsg"}
-case class GetWhiteboardAnnotationsReqMsg(header: BbbClientMsgHeader, body: GetWhiteboardAnnotationsReqMsgBody) extends StandardMsg
+object PresentationPageCountErrorEvtMsg { val NAME = "PresentationPageCountErrorEvtMsg"}
+case class PresentationPageCountErrorEvtMsg(header: BbbClientMsgHeader, body: PresentationPageCountErrorEvtMsgBody) extends BbbCoreMsg
-object ClearWhiteboardPubMsg { val NAME = "ClearWhiteboardPubMsg"}
-case class ClearWhiteboardPubMsg(header: BbbClientMsgHeader, body: ClearWhiteboardPubMsgBody) extends StandardMsg
-
-object UndoWhiteboardPubMsg { val NAME = "UndoWhiteboardPubMsg"}
-case class UndoWhiteboardPubMsg(header: BbbClientMsgHeader, body: UndoWhiteboardPubMsgBody) extends StandardMsg
-
-object ModifyWhiteboardAccessPubMsg { val NAME = "ModifyWhiteboardAccessPubMsg"}
-case class ModifyWhiteboardAccessPubMsg(header: BbbClientMsgHeader, body: ModifyWhiteboardAccessPubMsgBody) extends StandardMsg
-
-object GetWhiteboardAccessReqMsg { val NAME = "GetWhiteboardAccessReqMsg"}
-case class GetWhiteboardAccessReqMsg(header: BbbClientMsgHeader, body: GetWhiteboardAccessReqMsgBody) extends StandardMsg
-
-object StartPollReqMsg { val NAME = "StartPollReqMsg"}
-case class StartPollReqMsg(header: BbbClientMsgHeader, body: StartPollReqMsgBody) extends BbbCoreMsg
-
-object StartCustomPollReqMsg { val NAME = "StartCustomPollReqMsg"}
-case class StartCustomPollReqMsg(header: BbbClientMsgHeader, body: StartCustomPollReqMsgBody) extends BbbCoreMsg
-
-object StopPollReqMsg { val NAME = "StopPollReqMsg"}
-case class StopPollReqMsg(header: BbbClientMsgHeader, body: StopPollReqMsgBody) extends BbbCoreMsg
-
-object ShowPollResultReqMsg { val NAME = "ShowPollResultReqMsg"}
-case class ShowPollResultReqMsg(header: BbbClientMsgHeader, body: ShowPollResultReqMsgBody) extends BbbCoreMsg
-
-object HidePollResultReqMsg { val NAME = "HidePollResultReqMsg"}
-case class HidePollResultReqMsg(header: BbbClientMsgHeader, body: HidePollResultReqMsgBody) extends BbbCoreMsg
-
-object GetCurrentPollReqMsg { val NAME = "GetCurrentPollReqMsg"}
-case class GetCurrentPollReqMsg(header: BbbClientMsgHeader, body: GetCurrentPollReqMsgBody) extends BbbCoreMsg
-
-object RespondToPollReqMsg { val NAME = "RespondToPollReqMsg"}
-case class RespondToPollReqMsg(header: BbbClientMsgHeader, body: RespondToPollReqMsgBody) extends BbbCoreMsg
-
-/** Caption Messages */
-object EditCaptionHistoryPubMsg { val NAME = "EditCaptionHistoryPubMsg"}
-case class EditCaptionHistoryPubMsg(header: BbbClientMsgHeader, body: EditCaptionHistoryPubMsgBody) extends StandardMsg
-
-object UpdateCaptionOwnerPubMsg { val NAME = "UpdateCaptionOwnerPubMsg"}
-case class UpdateCaptionOwnerPubMsg(header: BbbClientMsgHeader, body: UpdateCaptionOwnerPubMsgBody) extends StandardMsg
-
-object SendCaptionHistoryReqMsg { val NAME = "SendCaptionHistoryReqMsg"}
-case class SendCaptionHistoryReqMsg(header: BbbClientMsgHeader, body: SendCaptionHistoryReqMsgBody) extends StandardMsg
-
-
-//
-/** Event messages sent by Akka apps as result of receiving incoming messages ***/
-//
-
-object MeetingCreatedEvtMsg { val NAME = "MeetingCreatedEvtMsg"}
-case class MeetingCreatedEvtMsg(header: BbbCoreBaseHeader,
- body: MeetingCreatedEvtBody) extends BbbCoreMsg
-
-object ValidateAuthTokenRespMsg { val NAME = "ValidateAuthTokenRespMsg" }
-case class ValidateAuthTokenRespMsg(header: BbbClientMsgHeader,
- body: ValidateAuthTokenRespMsgBody) extends BbbCoreMsg
-
-
-
-
-
-object UserBroadcastCamStartedEvtMsg { val NAME = "UserBroadcastCamStartedEvtMsg" }
-case class UserBroadcastCamStartedEvtMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStartedEvtMsgBody) extends BbbCoreMsg
-
-object UserBroadcastCamStoppedEvtMsg { val NAME = "UserBroadcastCamStoppedEvtMsg" }
-case class UserBroadcastCamStoppedEvtMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStoppedEvtMsgBody) extends BbbCoreMsg
-
-
-/** Whiteboard Messages */
-object SendCursorPositionEvtMsg { val NAME = "SendCursorPositionEvtMsg" }
-case class SendCursorPositionEvtMsg(header: BbbClientMsgHeader, body: SendCursorPositionEvtMsgBody) extends BbbCoreMsg
-
-object SendWhiteboardAnnotationEvtMsg { val NAME = "SendWhiteboardAnnotationEvtMsg" }
-case class SendWhiteboardAnnotationEvtMsg(header: BbbClientMsgHeader, body: SendWhiteboardAnnotationEvtMsgBody) extends BbbCoreMsg
-
-object GetWhiteboardAnnotationsRespMsg { val NAME = "GetWhiteboardAnnotationsRespMsg" }
-case class GetWhiteboardAnnotationsRespMsg(header: BbbClientMsgHeader, body: GetWhiteboardAnnotationsRespMsgBody) extends BbbCoreMsg
-
-object ClearWhiteboardEvtMsg { val NAME = "ClearWhiteboardEvtMsg" }
-case class ClearWhiteboardEvtMsg(header: BbbClientMsgHeader, body: ClearWhiteboardEvtMsgBody) extends BbbCoreMsg
-
-object UndoWhiteboardEvtMsg { val NAME = "UndoWhiteboardEvtMsg" }
-case class UndoWhiteboardEvtMsg(header: BbbClientMsgHeader, body: UndoWhiteboardEvtMsgBody) extends BbbCoreMsg
-
-object ModifyWhiteboardAccessEvtMsg { val NAME = "ModifyWhiteboardAccessEvtMsg" }
-case class ModifyWhiteboardAccessEvtMsg(header: BbbClientMsgHeader, body: ModifyWhiteboardAccessEvtMsgBody) extends BbbCoreMsg
-
-object GetWhiteboardAccessRespMsg { val NAME = "GetWhiteboardAccessRespMsg" }
-case class GetWhiteboardAccessRespMsg(header: BbbClientMsgHeader, body: GetWhiteboardAccessRespMsgBody) extends BbbCoreMsg
-
-object PollStartedEvtMsg { val NAME = "PollStartedEvtMsg" }
-case class PollStartedEvtMsg(header: BbbClientMsgHeader, body: PollStartedEvtMsgBody) extends BbbCoreMsg
-
-object PollStoppedEvtMsg { val NAME = "PollStoppedEvtMsg" }
-case class PollStoppedEvtMsg(header: BbbClientMsgHeader, body: PollStoppedEvtMsgBody) extends BbbCoreMsg
-
-object PollShowResultEvtMsg { val NAME = "PollShowResultEvtMsg" }
-case class PollShowResultEvtMsg(header: BbbClientMsgHeader, body: PollShowResultEvtMsgBody) extends BbbCoreMsg
-
-object PollHideResultEvtMsg { val NAME = "PollHideResultEvtMsg" }
-case class PollHideResultEvtMsg(header: BbbClientMsgHeader, body: PollHideResultEvtMsgBody) extends BbbCoreMsg
-
-object GetCurrentPollRespMsg { val NAME = "GetCurrentPollRespMsg"}
-case class GetCurrentPollRespMsg(header: BbbClientMsgHeader, body: GetCurrentPollRespMsgBody) extends BbbCoreMsg
-
-object UserRespondedToPollEvtMsg { val NAME = "UserRespondedToPollEvtMsg"}
-case class UserRespondedToPollEvtMsg(header: BbbClientMsgHeader, body: UserRespondedToPollEvtMsgBody) extends BbbCoreMsg
-
-/** Caption Messages */
-object EditCaptionHistoryEvtMsg { val NAME = "EditCaptionHistoryEvtMsg"}
-case class EditCaptionHistoryEvtMsg(header: BbbClientMsgHeader, body: EditCaptionHistoryEvtMsgBody) extends StandardMsg
-
-object UpdateCaptionOwnerEvtMsg { val NAME = "UpdateCaptionOwnerEvtMsg"}
-case class UpdateCaptionOwnerEvtMsg(header: BbbClientMsgHeader, body: UpdateCaptionOwnerEvtMsgBody) extends StandardMsg
-
-object SendCaptionHistoryRespMsg { val NAME = "SendCaptionHistoryRespMsg"}
-case class SendCaptionHistoryRespMsg(header: BbbClientMsgHeader, body: SendCaptionHistoryRespMsgBody) extends StandardMsg
+object PresentationPageGeneratedEvtMsg { val NAME = "PresentationPageGeneratedEvtMsg"}
+case class PresentationPageGeneratedEvtMsg(header: BbbClientMsgHeader, body: PresentationPageGeneratedEvtMsgBody) extends BbbCoreMsg
+object PresentationConversionCompletedEvtMsg { val NAME = "PresentationConversionCompletedEvtMsg"}
+case class PresentationConversionCompletedEvtMsg(header: BbbClientMsgHeader, body: PresentationConversionCompletedEvtMsgBody) extends BbbCoreMsg
/** System Messages **/
case class AkkaAppsCheckAliveReqBody(timestamp: Long)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomCreatedMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomCreatedMsg.scala
new file mode 100755
index 0000000000..1264e7f5c7
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomCreatedMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object BreakoutRoomCreatedMsg { val NAME = "BreakoutRoomCreatedMsg" }
+case class BreakoutRoomCreatedMsg(header: BbbClientMsgHeader, body: BreakoutRoomCreatedMsgBody) extends BbbCoreMsg
+case class BreakoutRoomCreatedMsgBody(meetingId: String, breakoutRoomId: String)
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomEndedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomEndedEvtMsg.scala
new file mode 100755
index 0000000000..7ed740de11
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomEndedEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object BreakoutRoomEndedEvtMsg { val NAME = "BreakoutRoomEndedEvtMsg" }
+case class BreakoutRoomEndedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedEvtMsgBody) extends BbbCoreMsg
+case class BreakoutRoomEndedEvtMsgBody(parentMeetingId: String, meetingId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomEndedMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomEndedMsg.scala
new file mode 100755
index 0000000000..7ee2fb3696
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomEndedMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+// Sent by breakout actor to tell meeting actor that breakout room has been ended
+object BreakoutRoomEndedMsg { val NAME = "BreakoutRoomEndedMsg" }
+case class BreakoutRoomEndedMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedMsgBody) extends BbbCoreMsg
+case class BreakoutRoomEndedMsgBody(meetingId: String, breakoutRoomId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomJoinURLEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomJoinURLEvtMsg.scala
new file mode 100755
index 0000000000..297615fe64
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomJoinURLEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object BreakoutRoomJoinURLEvtMsg { val NAME = "BreakoutRoomJoinURLEvtMsg" }
+case class BreakoutRoomJoinURLEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomJoinURLEvtMsgBody) extends BbbCoreMsg
+case class BreakoutRoomJoinURLEvtMsgBody(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, userId: String, redirectJoinURL: String, noRedirectJoinURL: String)
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomStartedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomStartedEvtMsg.scala
new file mode 100755
index 0000000000..b64fadfffd
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomStartedEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object BreakoutRoomStartedEvtMsg { val NAME = "BreakoutRoomStartedEvtMsg" }
+case class BreakoutRoomStartedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomStartedEvtMsgBody) extends BbbCoreMsg
+case class BreakoutRoomStartedEvtMsgBody(parentMeetingId: String, recorded: Boolean, breakout: BreakoutRoomInfo)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomUsersUpdateMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomUsersUpdateMsg.scala
new file mode 100755
index 0000000000..ce0722fa6d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomUsersUpdateMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+// Sent by breakout actor to tell meeting actor the list of users in the breakout room.
+object BreakoutRoomUsersUpdateMsg { val NAME = "BreakoutRoomUsersUpdateMsg" }
+case class BreakoutRoomUsersUpdateMsg(header: BbbClientMsgHeader, body: BreakoutRoomUsersUpdateMsgBody) extends BbbCoreMsg
+case class BreakoutRoomUsersUpdateMsgBody(meetingId: String, breakoutMeetingId: String, users: Vector[BreakoutUserVO])
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsListEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsListEvtMsg.scala
new file mode 100755
index 0000000000..4180f3bf49
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsListEvtMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+// Outgoing messages
+object BreakoutRoomsListEvtMsg { val NAME = "BreakoutRoomsListEvtMsg" }
+case class BreakoutRoomsListEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListEvtMsgBody) extends BbbCoreMsg
+case class BreakoutRoomsListEvtMsgBody(meetingId: String, rooms: Vector[BreakoutRoomInfo], roomsReady: Boolean)
+case class BreakoutRoomInfo(name: String, externalMeetingId: String, meetingId: String, sequence: Int)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsListMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsListMsg.scala
new file mode 100755
index 0000000000..92039d3e08
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsListMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object BreakoutRoomsListMsg { val NAME = "BreakoutRoomsListMsg" }
+case class BreakoutRoomsListMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListMsgBody) extends BbbCoreMsg
+case class BreakoutRoomsListMsgBody(meetingId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsTimeRemainingUpdateEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsTimeRemainingUpdateEvtMsg.scala
new file mode 100755
index 0000000000..cc96d29858
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/BreakoutRoomsTimeRemainingUpdateEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object BreakoutRoomsTimeRemainingUpdateEvtMsg { val NAME = "BreakoutRoomsTimeRemainingUpdateEvtMsg" }
+case class BreakoutRoomsTimeRemainingUpdateEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomsTimeRemainingUpdateEvtMsgBody) extends BbbCoreMsg
+case class BreakoutRoomsTimeRemainingUpdateEvtMsgBody(meetingId: String, recorded: Boolean, timeRemaining: Int)
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/CreateBreakoutRoomEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/CreateBreakoutRoomEvtMsg.scala
new file mode 100755
index 0000000000..ec3a805a65
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/CreateBreakoutRoomEvtMsg.scala
@@ -0,0 +1,11 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object CreateBreakoutRoomEvtMsg { val NAME = "CreateBreakoutRoomEvtMsg" }
+case class CreateBreakoutRoomEvtMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomEvtMsgBody) extends BbbCoreMsg
+case class CreateBreakoutRoomEvtMsgBody(meetingId: String, room: BreakoutRoomDetail)
+case class BreakoutRoomDetail(breakoutMeetingId: String, name: String, parentId: String, sequence: Integer,
+ voiceConfId: String, durationInMinutes: Int, moderatorPassword: String, viewerPassword: String,
+ sourcePresentationId: String, sourcePresentationSlide: Int, record: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/CreateBreakoutRoomsMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/CreateBreakoutRoomsMsg.scala
new file mode 100755
index 0000000000..06e9882ed9
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/CreateBreakoutRoomsMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object CreateBreakoutRoomsMsg { val NAME = "CreateBreakoutRoomsMsg" }
+case class CreateBreakoutRoomsMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsMsgBody) extends BbbCoreMsg
+case class CreateBreakoutRoomsMsgBody(meetingId: String, durationInMinutes: Int, record: Boolean, rooms: Vector[BreakoutRoomMsgBody])
+case class BreakoutRoomMsgBody(name: String, sequence: Int, users: Vector[String])
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/EndAllBreakoutRoomsMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/EndAllBreakoutRoomsMsg.scala
new file mode 100755
index 0000000000..eec03fc62f
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/EndAllBreakoutRoomsMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+// Sent by user to request ending all the breakout rooms
+object EndAllBreakoutRoomsMsg { val NAME = "EndAllBreakoutRoomsMsg" }
+case class EndAllBreakoutRoomsMsg(header: BbbClientMsgHeader, body: EndAllBreakoutRoomsMsgBody) extends BbbCoreMsg
+case class EndAllBreakoutRoomsMsgBody(meetingId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/EndBreakoutRoomEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/EndBreakoutRoomEvtMsg.scala
new file mode 100755
index 0000000000..79cca48271
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/EndBreakoutRoomEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object EndBreakoutRoomEvtMsg { val NAME = "EndBreakoutRoomEvtMsg" }
+case class EndBreakoutRoomEvtMsg(header: BbbClientMsgHeader, body: EndBreakoutRoomEvtMsgBody) extends BbbCoreMsg
+case class EndBreakoutRoomEvtMsgBody(breakoutMeetingId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/MeetingTimeRemainingUpdateEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/MeetingTimeRemainingUpdateEvtMsg.scala
new file mode 100755
index 0000000000..40c629b661
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/MeetingTimeRemainingUpdateEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object MeetingTimeRemainingUpdateEvtMsg { val NAME = "MeetingTimeRemainingUpdateEvtMsg" }
+case class MeetingTimeRemainingUpdateEvtMsg(header: BbbClientMsgHeader, body: MeetingTimeRemainingUpdateEvtMsgBody) extends BbbCoreMsg
+case class MeetingTimeRemainingUpdateEvtMsgBody(meetingId: String, recorded: Boolean, timeRemaining: Int)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/Messages.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/Messages.scala
old mode 100644
new mode 100755
index 1c6d15eb71..d6a2d1875d
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/Messages.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/Messages.scala
@@ -3,96 +3,7 @@ package org.bigbluebutton.common2.messages.breakoutrooms
import org.bigbluebutton.common2.messages.BbbClientMsgHeader
import org.bigbluebutton.common2.messages.BbbCoreMsg
-// Iconming messages
-// Sent by user to request the breakout rooms list of a room
-object BreakoutRoomsListMsg { val NAME = "BreakoutRoomsListMsg" }
-case class BreakoutRoomsListMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListMsgBody) extends BbbCoreMsg
-case class BreakoutRoomsListMsgBody(meetingId: String)
-// Sent by user to request creation of breakout rooms
-object CreateBreakoutRoomsMsg { val NAME = "CreateBreakoutRoomsMsg" }
-case class CreateBreakoutRoomsMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsMsgBody) extends BbbCoreMsg
-case class CreateBreakoutRoomsMsgBody(meetingId: String, durationInMinutes: Int, record: Boolean, rooms: Vector[BreakoutRoomMsgBody])
-case class BreakoutRoomMsgBody(name: String, sequence: Int, users: Vector[String])
-
-object RequestBreakoutJoinURLMsg { val NAME = "RequestBreakoutJoinURLMsg" }
-case class RequestBreakoutJoinURLMsg(header: BbbClientMsgHeader, body: RequestBreakoutJoinURLMsgBody) extends BbbCoreMsg
-case class RequestBreakoutJoinURLMsgBody(meetingId: String, breakoutMeetingId: String, userId: String)
-
-// Sent by breakout actor to tell meeting actor that breakout room has been created.
-object BreakoutRoomCreatedMsg { val NAME = "BreakoutRoomCreatedMsg" }
-case class BreakoutRoomCreatedMsg(header: BbbClientMsgHeader, body: BreakoutRoomCreatedMsgBody) extends BbbCoreMsg
-case class BreakoutRoomCreatedMsgBody(meetingId: String, breakoutRoomId: String)
-
-// Sent by breakout actor to tell meeting actor the list of users in the breakout room.
-object BreakoutRoomUsersUpdateMsg { val NAME = "BreakoutRoomUsersUpdateMsg" }
-case class BreakoutRoomUsersUpdateMsg(header: BbbClientMsgHeader, body: BreakoutRoomUsersUpdateMsgBody) extends BbbCoreMsg
-case class BreakoutRoomUsersUpdateMsgBody(meetingId: String, breakoutMeetingId: String, users: Vector[BreakoutUserVO])
-
-// Send by internal actor to tell the breakout actor to send it's list of users to the main meeting actor.
-object SendBreakoutUsersUpdateMsg { val NAME = "SendBreakoutUsersUpdateMsg" }
-case class SendBreakoutUsersUpdateMsg(header: BbbClientMsgHeader, body: SendBreakoutUsersUpdateMsgBody) extends BbbCoreMsg
-case class SendBreakoutUsersUpdateMsgBody(meetingId: String)
-
-// Sent by user to request ending all the breakout rooms
-object EndAllBreakoutRoomsMsg { val NAME = "EndAllBreakoutRoomsMsg" }
-case class EndAllBreakoutRoomsMsg(header: BbbClientMsgHeader, body: EndAllBreakoutRoomsMsgBody) extends BbbCoreMsg
-case class EndAllBreakoutRoomsMsgBody(meetingId: String)
-
-// Sent by breakout actor to tell meeting actor that breakout room has been ended
-object BreakoutRoomEndedMsg { val NAME = "BreakoutRoomEndedMsg" }
-case class BreakoutRoomEndedMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedMsgBody) extends BbbCoreMsg
-case class BreakoutRoomEndedMsgBody(meetingId: String, breakoutRoomId: String)
-
-// Sent by user actor to ask for voice conference transfer
-object TransferUserToMeetingRequestMsg { val NAME = "TransferUserToMeetingRequestMsg" }
-case class TransferUserToMeetingRequestMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingRequestMsgBody) extends BbbCoreMsg
-case class TransferUserToMeetingRequestMsgBody(meetingId: String, targetMeetingId: String, userId: String)
-
-// Outgoing messages
-object BreakoutRoomsListEvtMsg { val NAME = "BreakoutRoomsListEvtMsg" }
-case class BreakoutRoomsListEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListEvtMsgBody) extends BbbCoreMsg
-case class BreakoutRoomsListEvtMsgBody(meetingId: String, rooms: Vector[BreakoutRoomInfo], roomsReady: Boolean)
-case class BreakoutRoomInfo(name: String, externalMeetingId: String, meetingId: String, sequence: Int)
-
-object CreateBreakoutRoomEvtMsg { val NAME = "CreateBreakoutRoomEvtMsg" }
-case class CreateBreakoutRoomEvtMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomEvtMsgBody) extends BbbCoreMsg
-case class CreateBreakoutRoomEvtMsgBody(meetingId: String, room: BreakoutRoomDetail)
-case class BreakoutRoomDetail(breakoutMeetingId: String, name: String, parentId: String, sequence: Integer,
- voiceConfId: String, durationInMinutes: Int, moderatorPassword: String, viewerPassword: String,
- sourcePresentationId: String, sourcePresentationSlide: Int, record: Boolean)
-
-object EndBreakoutRoomEvtMsg { val NAME = "EndBreakoutRoomEvtMsg" }
-case class EndBreakoutRoomEvtMsg(header: BbbClientMsgHeader, body: EndBreakoutRoomEvtMsgBody) extends BbbCoreMsg
-case class EndBreakoutRoomEvtMsgBody(breakoutMeetingId: String)
-
-object BreakoutRoomJoinURLEvtMsg { val NAME = "BreakoutRoomJoinURLEvtMsg" }
-case class BreakoutRoomJoinURLEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomJoinURLEvtMsgBody) extends BbbCoreMsg
-case class BreakoutRoomJoinURLEvtMsgBody(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, userId: String, redirectJoinURL: String, noRedirectJoinURL: String)
-
-object BreakoutRoomStartedEvtMsg { val NAME = "BreakoutRoomStartedEvtMsg" }
-case class BreakoutRoomStartedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomStartedEvtMsgBody) extends BbbCoreMsg
-case class BreakoutRoomStartedEvtMsgBody(parentMeetingId: String, recorded: Boolean, breakout: BreakoutRoomInfo)
-
-object UpdateBreakoutUsersEvtMsg { val NAME = "UpdateBreakoutUsersEvtMsg" }
-case class UpdateBreakoutUsersEvtMsg(header: BbbClientMsgHeader, body: UpdateBreakoutUsersEvtMsgBody) extends BbbCoreMsg
-case class UpdateBreakoutUsersEvtMsgBody(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, users: Vector[BreakoutUserVO])
-
-object MeetingTimeRemainingUpdateEvtMsg { val NAME = "MeetingTimeRemainingUpdateEvtMsg" }
-case class MeetingTimeRemainingUpdateEvtMsg(header: BbbClientMsgHeader, body: MeetingTimeRemainingUpdateEvtMsgBody) extends BbbCoreMsg
-case class MeetingTimeRemainingUpdateEvtMsgBody(meetingId: String, recorded: Boolean, timeRemaining: Int)
-
-object BreakoutRoomsTimeRemainingUpdateEvtMsg { val NAME = "BreakoutRoomsTimeRemainingUpdateEvtMsg" }
-case class BreakoutRoomsTimeRemainingUpdateEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomsTimeRemainingUpdateEvtMsgBody) extends BbbCoreMsg
-case class BreakoutRoomsTimeRemainingUpdateEvtMsgBody(meetingId: String, recorded: Boolean, timeRemaining: Int)
-
-object BreakoutRoomEndedEvtMsg { val NAME = "BreakoutRoomEndedEvtMsg" }
-case class BreakoutRoomEndedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedEvtMsgBody) extends BbbCoreMsg
-case class BreakoutRoomEndedEvtMsgBody(parentMeetingId: String, meetingId: String)
-
-object TransferUserToMeetingEvtMsg { val NAME = "TransferUserToMeetingEvtMsg" }
-case class TransferUserToMeetingEvtMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingEvtMsgBody) extends BbbCoreMsg
-case class TransferUserToMeetingEvtMsgBody(voiceConfId: String, targetVoiceConfId: String, userId: String)
// Common Value objects
case class BreakoutUserVO(id: String, name: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/RequestBreakoutJoinURLMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/RequestBreakoutJoinURLMsg.scala
new file mode 100755
index 0000000000..f5c645dc64
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/RequestBreakoutJoinURLMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object RequestBreakoutJoinURLMsg { val NAME = "RequestBreakoutJoinURLMsg" }
+case class RequestBreakoutJoinURLMsg(header: BbbClientMsgHeader, body: RequestBreakoutJoinURLMsgBody) extends BbbCoreMsg
+case class RequestBreakoutJoinURLMsgBody(meetingId: String, breakoutMeetingId: String, userId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/SendBreakoutUsersUpdateMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/SendBreakoutUsersUpdateMsg.scala
new file mode 100755
index 0000000000..e955658a5d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/SendBreakoutUsersUpdateMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+// Send by internal actor to tell the breakout actor to send it's list of users to the main meeting actor.
+object SendBreakoutUsersUpdateMsg { val NAME = "SendBreakoutUsersUpdateMsg" }
+case class SendBreakoutUsersUpdateMsg(header: BbbClientMsgHeader, body: SendBreakoutUsersUpdateMsgBody) extends BbbCoreMsg
+case class SendBreakoutUsersUpdateMsgBody(meetingId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/TransferUserToMeetingEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/TransferUserToMeetingEvtMsg.scala
new file mode 100755
index 0000000000..0531a604e8
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/TransferUserToMeetingEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object TransferUserToMeetingEvtMsg { val NAME = "TransferUserToMeetingEvtMsg" }
+case class TransferUserToMeetingEvtMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingEvtMsgBody) extends BbbCoreMsg
+case class TransferUserToMeetingEvtMsgBody(voiceConfId: String, targetVoiceConfId: String, userId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/TransferUserToMeetingRequestMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/TransferUserToMeetingRequestMsg.scala
new file mode 100755
index 0000000000..0c89dad10c
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/TransferUserToMeetingRequestMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+// Sent by user actor to ask for voice conference transfer
+object TransferUserToMeetingRequestMsg { val NAME = "TransferUserToMeetingRequestMsg" }
+case class TransferUserToMeetingRequestMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingRequestMsgBody) extends BbbCoreMsg
+case class TransferUserToMeetingRequestMsgBody(meetingId: String, targetMeetingId: String, userId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/UpdateBreakoutUsersEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/UpdateBreakoutUsersEvtMsg.scala
new file mode 100755
index 0000000000..6531ae5a5b
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/breakoutrooms/UpdateBreakoutUsersEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.breakoutrooms
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object UpdateBreakoutUsersEvtMsg { val NAME = "UpdateBreakoutUsersEvtMsg" }
+case class UpdateBreakoutUsersEvtMsg(header: BbbClientMsgHeader, body: UpdateBreakoutUsersEvtMsgBody) extends BbbCoreMsg
+case class UpdateBreakoutUsersEvtMsgBody(parentMeetingId: String, recorded: Boolean, breakoutMeetingId: String, users: Vector[BreakoutUserVO])
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/caption/CaptionMessages.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/caption/CaptionMessages.scala
new file mode 100755
index 0000000000..660241aa86
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/caption/CaptionMessages.scala
@@ -0,0 +1,30 @@
+package org.bigbluebutton.common2.messages.caption
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+/* In Messages */
+object EditCaptionHistoryPubMsg { val NAME = "EditCaptionHistoryPubMsg"}
+case class EditCaptionHistoryPubMsg(header: BbbClientMsgHeader, body: EditCaptionHistoryPubMsgBody) extends StandardMsg
+case class EditCaptionHistoryPubMsgBody(startIndex: Integer, endIndex: Integer, locale: String, localeCode: String, text: String)
+
+object UpdateCaptionOwnerPubMsg { val NAME = "UpdateCaptionOwnerPubMsg"}
+case class UpdateCaptionOwnerPubMsg(header: BbbClientMsgHeader, body: UpdateCaptionOwnerPubMsgBody) extends StandardMsg
+case class UpdateCaptionOwnerPubMsgBody(locale: String, localeCode: String, ownerId: String)
+
+object SendCaptionHistoryReqMsg { val NAME = "SendCaptionHistoryReqMsg"}
+case class SendCaptionHistoryReqMsg(header: BbbClientMsgHeader, body: SendCaptionHistoryReqMsgBody) extends StandardMsg
+case class SendCaptionHistoryReqMsgBody()
+
+
+/* Out Messages */
+object EditCaptionHistoryEvtMsg { val NAME = "EditCaptionHistoryEvtMsg"}
+case class EditCaptionHistoryEvtMsg(header: BbbClientMsgHeader, body: EditCaptionHistoryEvtMsgBody) extends StandardMsg
+case class EditCaptionHistoryEvtMsgBody(startIndex: Integer, endIndex: Integer, locale: String, localeCode: String, text: String)
+
+object UpdateCaptionOwnerEvtMsg { val NAME = "UpdateCaptionOwnerEvtMsg"}
+case class UpdateCaptionOwnerEvtMsg(header: BbbClientMsgHeader, body: UpdateCaptionOwnerEvtMsgBody) extends StandardMsg
+case class UpdateCaptionOwnerEvtMsgBody(locale: String, localeCode: String, ownerId: String)
+
+object SendCaptionHistoryRespMsg { val NAME = "SendCaptionHistoryRespMsg"}
+case class SendCaptionHistoryRespMsg(header: BbbClientMsgHeader, body: SendCaptionHistoryRespMsgBody) extends StandardMsg
+case class SendCaptionHistoryRespMsgBody(history: Map[String, TranscriptVO])
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Caption.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/caption/CaptionVO.scala
similarity index 58%
rename from bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Caption.scala
rename to bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/caption/CaptionVO.scala
index 65190f7788..c450948a24 100755
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Caption.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/caption/CaptionVO.scala
@@ -1,3 +1,3 @@
-package org.bigbluebutton.common2.domain
+package org.bigbluebutton.common2.messages.caption
case class TranscriptVO(ownerId: String, text: String, localeCode: String)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/layout/Messages.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/layout/Messages.scala
new file mode 100644
index 0000000000..6f2dbf2325
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/layout/Messages.scala
@@ -0,0 +1,35 @@
+package org.bigbluebutton.common2.messages.layout
+
+import org.bigbluebutton.common2.domain.UserVO
+import org.bigbluebutton.common2.messages.BbbClientMsgHeader
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+// In messages
+object GetCurrentLayoutMsg { val NAME = "GetCurrentLayoutMsg" }
+case class GetCurrentLayoutMsg(header: BbbClientMsgHeader, body: GetCurrentLayoutMsgBody) extends BbbCoreMsg
+case class GetCurrentLayoutMsgBody(meetingId: String, requesterId: String)
+
+object LockLayoutMsg { val NAME = "LockLayoutMsg" }
+case class LockLayoutMsg(header: BbbClientMsgHeader, body: LockLayoutMsgBody) extends BbbCoreMsg
+case class LockLayoutMsgBody(meetingId: String, setById: String, lock: Boolean, viewersOnly: Boolean,
+ layout: Option[String])
+
+object BroadcastLayoutMsg { val NAME = "BroadcastLayoutMsg" }
+case class BroadcastLayoutMsg(header: BbbClientMsgHeader, body: BroadcastLayoutMsgBody) extends BbbCoreMsg
+case class BroadcastLayoutMsgBody(meetingId: String, requesterId: String, layout: String)
+
+// Out messages
+object GetCurrentLayoutEvtMsg { val NAME = "GetCurrentLayoutEvtMsg" }
+case class GetCurrentLayoutEvtMsg(header: BbbClientMsgHeader, body: GetCurrentLayoutEvtMsgBody) extends BbbCoreMsg
+case class GetCurrentLayoutEvtMsgBody(meetingId: String, recorded: Boolean, requesterId: String, layoutId: String,
+ locked: Boolean, setByUserId: String)
+
+object BroadcastLayoutEvtMsg { val NAME = "BroadcastLayoutEvtMsg" }
+case class BroadcastLayoutEvtMsg(header: BbbClientMsgHeader, body: BroadcastLayoutEvtMsgBody) extends BbbCoreMsg
+case class BroadcastLayoutEvtMsgBody(meetingId: String, recorded: Boolean, requesterId: String,
+ layoutId: String, locked: Boolean, setByUserId: String, applyTo: Array[UserVO])
+
+object LockLayoutEvtMsg { val NAME = "LockLayoutEvtMsg" }
+case class LockLayoutEvtMsg(header: BbbClientMsgHeader, body: LockLayoutEvtMsgBody) extends BbbCoreMsg
+case class LockLayoutEvtMsgBody(meetingId: String, recorded: Boolean, setById: String, locked: Boolean,
+ applyTo: Array[UserVO])
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/GetCurrentPollReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/GetCurrentPollReqMsg.scala
new file mode 100755
index 0000000000..318e255e3d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/GetCurrentPollReqMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object GetCurrentPollReqMsg { val NAME = "GetCurrentPollReqMsg"}
+case class GetCurrentPollReqMsg(header: BbbClientMsgHeader, body: GetCurrentPollReqMsgBody) extends BbbCoreMsg
+case class GetCurrentPollReqMsgBody(requesterId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/GetCurrentPollRespMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/GetCurrentPollRespMsg.scala
new file mode 100755
index 0000000000..753bd326b1
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/GetCurrentPollRespMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.domain.PollVO
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object GetCurrentPollRespMsg { val NAME = "GetCurrentPollRespMsg"}
+case class GetCurrentPollRespMsg(header: BbbClientMsgHeader, body: GetCurrentPollRespMsgBody) extends BbbCoreMsg
+case class GetCurrentPollRespMsgBody(userId: String, hasPoll: Boolean, poll: Option[PollVO])
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/HidePollResultReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/HidePollResultReqMsg.scala
new file mode 100755
index 0000000000..dea02f7d2d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/HidePollResultReqMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object HidePollResultReqMsg { val NAME = "HidePollResultReqMsg"}
+case class HidePollResultReqMsg(header: BbbClientMsgHeader, body: HidePollResultReqMsgBody) extends BbbCoreMsg
+case class HidePollResultReqMsgBody(requesterId: String, pollId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollHideResultEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollHideResultEvtMsg.scala
new file mode 100755
index 0000000000..7c343d2ccf
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollHideResultEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object PollHideResultEvtMsg { val NAME = "PollHideResultEvtMsg" }
+case class PollHideResultEvtMsg(header: BbbClientMsgHeader, body: PollHideResultEvtMsgBody) extends BbbCoreMsg
+case class PollHideResultEvtMsgBody(userId: String, pollId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollShowResultEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollShowResultEvtMsg.scala
new file mode 100755
index 0000000000..5e36923b97
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollShowResultEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.domain.SimplePollResultOutVO
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object PollShowResultEvtMsg { val NAME = "PollShowResultEvtMsg" }
+case class PollShowResultEvtMsg(header: BbbClientMsgHeader, body: PollShowResultEvtMsgBody) extends BbbCoreMsg
+case class PollShowResultEvtMsgBody(userId: String, pollId: String, poll: SimplePollResultOutVO)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollStartedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollStartedEvtMsg.scala
new file mode 100755
index 0000000000..a65b9c9a86
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollStartedEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.domain.SimplePollOutVO
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object PollStartedEvtMsg { val NAME = "PollStartedEvtMsg" }
+case class PollStartedEvtMsg(header: BbbClientMsgHeader, body: PollStartedEvtMsgBody) extends BbbCoreMsg
+case class PollStartedEvtMsgBody(userId: String, pollId: String, poll: SimplePollOutVO)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollStoppedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollStoppedEvtMsg.scala
new file mode 100755
index 0000000000..ee6a49def3
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/PollStoppedEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object PollStoppedEvtMsg { val NAME = "PollStoppedEvtMsg" }
+case class PollStoppedEvtMsg(header: BbbClientMsgHeader, body: PollStoppedEvtMsgBody) extends BbbCoreMsg
+case class PollStoppedEvtMsgBody(userId: String, pollId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/RespondToPollReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/RespondToPollReqMsg.scala
new file mode 100755
index 0000000000..1be8fe94b3
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/RespondToPollReqMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object RespondToPollReqMsg { val NAME = "RespondToPollReqMsg"}
+case class RespondToPollReqMsg(header: BbbClientMsgHeader, body: RespondToPollReqMsgBody) extends BbbCoreMsg
+case class RespondToPollReqMsgBody(requesterId: String, pollId: String, questionId: Int, answerId: Int)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/ShowPollResultReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/ShowPollResultReqMsg.scala
new file mode 100755
index 0000000000..791c972bea
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/ShowPollResultReqMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object ShowPollResultReqMsg { val NAME = "ShowPollResultReqMsg"}
+case class ShowPollResultReqMsg(header: BbbClientMsgHeader, body: ShowPollResultReqMsgBody) extends BbbCoreMsg
+case class ShowPollResultReqMsgBody(requesterId: String, pollId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StartCustomPollReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StartCustomPollReqMsg.scala
new file mode 100755
index 0000000000..0d78d5d917
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StartCustomPollReqMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object StartCustomPollReqMsg { val NAME = "StartCustomPollReqMsg"}
+case class StartCustomPollReqMsg(header: BbbClientMsgHeader, body: StartCustomPollReqMsgBody) extends BbbCoreMsg
+case class StartCustomPollReqMsgBody(requesterId: String, pollId: String, pollType: String, answers: Seq[String])
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StartPollReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StartPollReqMsg.scala
new file mode 100755
index 0000000000..dba660238e
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StartPollReqMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object StartPollReqMsg { val NAME = "StartPollReqMsg"}
+case class StartPollReqMsg(header: BbbClientMsgHeader, body: StartPollReqMsgBody) extends BbbCoreMsg
+case class StartPollReqMsgBody(requesterId: String, pollId: String, pollType: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StopPollReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StopPollReqMsg.scala
new file mode 100755
index 0000000000..e292f2954f
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/StopPollReqMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object StopPollReqMsg { val NAME = "StopPollReqMsg"}
+case class StopPollReqMsg(header: BbbClientMsgHeader, body: StopPollReqMsgBody) extends BbbCoreMsg
+case class StopPollReqMsgBody(requesterId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/UserRespondedToPollEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/UserRespondedToPollEvtMsg.scala
new file mode 100755
index 0000000000..1b6fced7bc
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/polls/UserRespondedToPollEvtMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.polls
+
+import org.bigbluebutton.common2.domain.SimplePollResultOutVO
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object UserRespondedToPollEvtMsg { val NAME = "UserRespondedToPollEvtMsg"}
+case class UserRespondedToPollEvtMsg(header: BbbClientMsgHeader, body: UserRespondedToPollEvtMsgBody) extends BbbCoreMsg
+case class UserRespondedToPollEvtMsgBody(presenterId: String, pollId: String, poll: SimplePollResultOutVO)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/GetUsersReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/GetUsersReqMsg.scala
new file mode 100755
index 0000000000..c881da7344
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/GetUsersReqMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object GetUsersReqMsg { val NAME = "GetUsersReqMsg" }
+case class GetUsersReqMsg(header: BbbClientMsgHeader, body: GetUsersReqMsgBody) extends BbbCoreMsg
+case class GetUsersReqMsgBody(requesterId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/PresenterAssignedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/PresenterAssignedEvtMsg.scala
new file mode 100755
index 0000000000..8637a48cf6
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/PresenterAssignedEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object PresenterAssignedEvtMsg { val NAME = "PresenterAssignedEvtMsg" }
+case class PresenterAssignedEvtMsg(header: BbbClientMsgHeader, body: PresenterAssignedEvtMsgBody) extends BbbCoreMsg
+case class PresenterAssignedEvtMsgBody(presenterId: String, presenterName: String, assignedBy: String)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/PresenterUnassignedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/PresenterUnassignedEvtMsg.scala
new file mode 100755
index 0000000000..00d77b4bee
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/PresenterUnassignedEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object PresenterUnassignedEvtMsg { val NAME = "PresenterUnassignedEvtMsg" }
+case class PresenterUnassignedEvtMsg(header: BbbClientMsgHeader, body: PresenterUnassignedEvtMsgBody) extends BbbCoreMsg
+case class PresenterUnassignedEvtMsgBody(intId: String, name: String, assignedBy: String)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/RegisterUserReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/RegisterUserReqMsg.scala
new file mode 100755
index 0000000000..08926c9b84
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/RegisterUserReqMsg.scala
@@ -0,0 +1,11 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object RegisterUserReqMsg { val NAME = "RegisterUserReqMsg" }
+case class RegisterUserReqMsg(header: BbbCoreHeaderWithMeetingId,
+ body: RegisterUserReqMsgBody) extends BbbCoreMsg
+
+case class RegisterUserReqMsgBody(meetingId: String, intUserId: String, name: String, role: String,
+ extUserId: String, authToken: String, avatarURL: String,
+ guest: Boolean, authed: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStartMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStartMsg.scala
new file mode 100755
index 0000000000..0f7ee4a325
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStartMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object UserBroadcastCamStartMsg { val NAME = "UserBroadcastCamStartMsg" }
+case class UserBroadcastCamStartMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStartMsgBody) extends BbbCoreMsg
+case class UserBroadcastCamStartMsgBody(stream: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStartedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStartedEvtMsg.scala
new file mode 100755
index 0000000000..6a78f1a092
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStartedEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object UserBroadcastCamStartedEvtMsg { val NAME = "UserBroadcastCamStartedEvtMsg" }
+case class UserBroadcastCamStartedEvtMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStartedEvtMsgBody) extends BbbCoreMsg
+case class UserBroadcastCamStartedEvtMsgBody(userId: String, stream: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStopMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStopMsg.scala
new file mode 100755
index 0000000000..8887c48f24
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStopMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object UserBroadcastCamStopMsg { val NAME = "UserBroadcastCamStopMsg" }
+case class UserBroadcastCamStopMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStopMsgBody) extends BbbCoreMsg
+case class UserBroadcastCamStopMsgBody(stream: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStoppedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStoppedEvtMsg.scala
new file mode 100755
index 0000000000..cc9524067d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserBroadcastCamStoppedEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object UserBroadcastCamStoppedEvtMsg { val NAME = "UserBroadcastCamStoppedEvtMsg" }
+case class UserBroadcastCamStoppedEvtMsg(header: BbbClientMsgHeader, body: UserBroadcastCamStoppedEvtMsgBody) extends BbbCoreMsg
+case class UserBroadcastCamStoppedEvtMsgBody(userId: String, stream: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserEmojiChangedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserEmojiChangedEvtMsg.scala
new file mode 100755
index 0000000000..c0c87ea0ad
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserEmojiChangedEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object UserEmojiChangedEvtMsg { val NAME = "UserEmojiChangedEvtMsg" }
+case class UserEmojiChangedEvtMsg(header: BbbClientMsgHeader, body: UserEmojiChangedEvtMsgBody) extends BbbCoreMsg
+case class UserEmojiChangedEvtMsgBody(userId: String, emoji: String)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserJoinMeetingReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserJoinMeetingReqMsg.scala
new file mode 100755
index 0000000000..e8dcc63694
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserJoinMeetingReqMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+
+object UserJoinMeetingReqMsg { val NAME = "UserJoinMeetingReqMsg" }
+case class UserJoinMeetingReqMsg(header: BbbClientMsgHeader, body: UserJoinMeetingReqMsgBody) extends BbbCoreMsg
+case class UserJoinMeetingReqMsgBody(userId: String, authToken: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserLeaveReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserLeaveReqMsg.scala
new file mode 100755
index 0000000000..92e016d478
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/UserLeaveReqMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object UserLeaveReqMsg { val NAME = "UserLeaveReqMsg" }
+case class UserLeaveReqMsg(header: BbbClientMsgHeader, body: UserLeaveReqMsgBody) extends BbbCoreMsg
+case class UserLeaveReqMsgBody(userId: String, sessionId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/ValidateAuthTokenReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/ValidateAuthTokenReqMsg.scala
new file mode 100755
index 0000000000..fe9c0c4086
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/ValidateAuthTokenReqMsg.scala
@@ -0,0 +1,19 @@
+package org.bigbluebutton.common2.messages.users
+
+
+import org.bigbluebutton.common2.messages._
+
+object ValidateAuthTokenReqMsg {
+ val NAME = "ValidateAuthTokenReqMsg"
+
+ def apply(meetingId: String, userId: String, authToken: String): ValidateAuthTokenReqMsg = {
+ val header = BbbClientMsgHeader(GetGuestsWaitingApprovalRespMsg.NAME, meetingId, userId)
+
+ val body = ValidateAuthTokenReqMsgBody(userId, authToken)
+ ValidateAuthTokenReqMsg(header, body)
+ }
+}
+
+case class ValidateAuthTokenReqMsg(header: BbbClientMsgHeader,
+ body: ValidateAuthTokenReqMsgBody) extends BbbCoreMsg
+case class ValidateAuthTokenReqMsgBody(userId: String, authToken: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/ValidateAuthTokenRespMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/ValidateAuthTokenRespMsg.scala
new file mode 100755
index 0000000000..902b9a23ac
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/users/ValidateAuthTokenRespMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages.users
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object ValidateAuthTokenRespMsg { val NAME = "ValidateAuthTokenRespMsg" }
+case class ValidateAuthTokenRespMsg(header: BbbClientMsgHeader,
+ body: ValidateAuthTokenRespMsgBody) extends BbbCoreMsg
+case class ValidateAuthTokenRespMsgBody(userId: String, authToken: String, valid: Boolean, waitForApproval: Boolean)
+
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareHangUpVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareHangUpVoiceConfMsg.scala
new file mode 100755
index 0000000000..dc21f12da4
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareHangUpVoiceConfMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object DeskshareHangUpVoiceConfMsg { val NAME = "DeskshareHangUpVoiceConfMsg" }
+case class DeskshareHangUpVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: DeskshareHangUpVoiceConfMsgBody) extends BbbCoreMsg
+case class DeskshareHangUpVoiceConfMsgBody(voiceConf: String, deskshareConf: String, timestamp: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareRtmpBroadcastStartedVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareRtmpBroadcastStartedVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..0bb4606bbe
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareRtmpBroadcastStartedVoiceConfEvtMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object DeskshareRtmpBroadcastStartedVoiceConfEvtMsg { val NAME = "DeskshareRtmpBroadcastStartedVoiceConfEvtMsg"}
+case class DeskshareRtmpBroadcastStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: DeskshareRtmpBroadcastStartedVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class DeskshareRtmpBroadcastStartedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
+ stream: String, vidWidth: String, vidHeight: String,
+ timestamp: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..6596d3774b
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg.scala
@@ -0,0 +1,11 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+
+object DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg { val NAME = "DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg"}
+case class DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
+ stream: String, vidWidth: String, vidHeight: String,
+ timestamp: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStartRtmpBroadcastVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStartRtmpBroadcastVoiceConfMsg.scala
new file mode 100755
index 0000000000..2c4491a1a3
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStartRtmpBroadcastVoiceConfMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object DeskshareStartRtmpBroadcastVoiceConfMsg { val NAME = "DeskshareStartRtmpBroadcastVoiceConfMsg" }
+case class DeskshareStartRtmpBroadcastVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: DeskshareStartRtmpBroadcastVoiceConfMsgBody) extends BbbCoreMsg
+case class DeskshareStartRtmpBroadcastVoiceConfMsgBody(voiceConf: String, deskshareConf: String, url: String, timestamp: String)
+
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStartedVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStartedVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..6a8c458bb1
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStartedVoiceConfEvtMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object DeskshareStartedVoiceConfEvtMsg { val NAME = "DeskshareStartedVoiceConfEvtMsg" }
+case class DeskshareStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: DeskshareStartedVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class DeskshareStartedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
+ callerIdNum: String, callerIdName: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStopRtmpBroadcastVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStopRtmpBroadcastVoiceConfMsg.scala
new file mode 100755
index 0000000000..924742a82d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStopRtmpBroadcastVoiceConfMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object DeskshareStopRtmpBroadcastVoiceConfMsg { val NAME = "DeskshareStopRtmpBroadcastVoiceConfMsg" }
+case class DeskshareStopRtmpBroadcastVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: DeskshareStopRtmpBroadcastVoiceConfMsgBody) extends BbbCoreMsg
+case class DeskshareStopRtmpBroadcastVoiceConfMsgBody(voiceConf: String, deskshareConf: String, url: String, timestamp: String)
+
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStoppedVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStoppedVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..555f4f2fe7
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/DeskshareStoppedVoiceConfEvtMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object DeskshareStoppedVoiceConfEvtMsg { val NAME = "DeskshareStoppedVoiceConfEvtMsg"}
+case class DeskshareStoppedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: DeskshareStoppedVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class DeskshareStoppedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
+ callerIdNum: String, callerIdName: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/EjectAllFromVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/EjectAllFromVoiceConfMsg.scala
new file mode 100755
index 0000000000..6ea56f3d73
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/EjectAllFromVoiceConfMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object EjectAllFromVoiceConfMsg { val NAME = "EjectAllFromVoiceConfMsg" }
+case class EjectAllFromVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: EjectAllFromVoiceConfMsgBody) extends BbbCoreMsg
+case class EjectAllFromVoiceConfMsgBody(voiceConf: String)
+
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/EjectUserFromVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/EjectUserFromVoiceConfMsg.scala
new file mode 100755
index 0000000000..5bf2eeb87c
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/EjectUserFromVoiceConfMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object EjectUserFromVoiceConfMsg { val NAME = "EjectUserFromVoiceConfMsg"}
+case class EjectUserFromVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: EjectUserFromVoiceConfMsgBody) extends BbbCoreMsg
+case class EjectUserFromVoiceConfMsgBody(voiceConf: String, voiceUserId: String)
+
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/Messages.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/Messages.scala
index a21f27cf10..6d08361487 100755
--- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/Messages.scala
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/Messages.scala
@@ -1,117 +1,6 @@
package org.bigbluebutton.common2.messages.voiceconf
-import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreHeader, BbbCoreHeaderWithMeetingId, BbbCoreMsg}
-
-/*** Message from Akka Apps to FS Conference ***/
-object EjectAllFromVoiceConfMsg { val NAME = "EjectAllFromVoiceConfMsg" }
-case class EjectAllFromVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: EjectAllFromVoiceConfMsgBody) extends BbbCoreMsg
-case class EjectAllFromVoiceConfMsgBody(voiceConf: String)
-
-object EjectUserFromVoiceConfMsg { val NAME = "EjectUserFromVoiceConfMsg"}
-case class EjectUserFromVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: EjectUserFromVoiceConfMsgBody) extends BbbCoreMsg
-case class EjectUserFromVoiceConfMsgBody(voiceConf: String, voiceUserId: String)
-
-object MuteUserInVoiceConfMsg { val NAME = "MuteUserInVoiceConfMsg" }
-case class MuteUserInVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: MuteUserInVoiceConfMsgBody) extends BbbCoreMsg
-case class MuteUserInVoiceConfMsgBody(voiceConf: String, voiceUserId: String, mute: Boolean)
-
-object TransferUserToVoiceConfMsg { val NAME = "TransferUserToVoiceConfMsg" }
-case class TransferUserToVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: TransferUserToVoiceConfMsgBody) extends BbbCoreMsg
-case class TransferUserToVoiceConfMsgBody(fromVoiceConf: String, toVoiceConf: String, voiceUserId: String)
-
-object StartRecordingVoiceConfMsg { val NAME = "StartRecordingVoiceConfMsg" }
-case class StartRecordingVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: StartRecordingVoiceConfMsgBody) extends BbbCoreMsg
-case class StartRecordingVoiceConfMsgBody(voiceConf: String, meetingId: String)
-
-object StopRecordingVoiceConfMsg { val NAME = "StopRecordingVoiceConfMsg" }
-case class StopRecordingVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: StopRecordingVoiceConfMsgBody) extends BbbCoreMsg
-case class StopRecordingVoiceConfMsgBody(voiceConf: String, meetingId: String, stream: String)
-
-object DeskshareStartRtmpBroadcastVoiceConfMsg { val NAME = "DeskshareStartRtmpBroadcastVoiceConfMsg" }
-case class DeskshareStartRtmpBroadcastVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: DeskshareStartRtmpBroadcastVoiceConfMsgBody) extends BbbCoreMsg
-case class DeskshareStartRtmpBroadcastVoiceConfMsgBody(voiceConf: String, deskshareConf: String, url: String, timestamp: String)
-
-object DeskshareStopRtmpBroadcastVoiceConfMsg { val NAME = "DeskshareStopRtmpBroadcastVoiceConfMsg" }
-case class DeskshareStopRtmpBroadcastVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: DeskshareStopRtmpBroadcastVoiceConfMsgBody) extends BbbCoreMsg
-case class DeskshareStopRtmpBroadcastVoiceConfMsgBody(voiceConf: String, deskshareConf: String, url: String, timestamp: String)
-
-object DeskshareHangUpVoiceConfMsg { val NAME = "DeskshareHangUpVoiceConfMsg" }
-case class DeskshareHangUpVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
- body: DeskshareHangUpVoiceConfMsgBody) extends BbbCoreMsg
-case class DeskshareHangUpVoiceConfMsgBody(voiceConf: String, deskshareConf: String, timestamp: String)
+import org.bigbluebutton.common2.messages.{ BbbCoreHeader}
-/*** Message from FS Conference to Akka Apps ***/
case class BbbCoreVoiceConfHeader(name: String, voiceConf: String) extends BbbCoreHeader
-
-object RecordingStartedVoiceConfEvtMsg { val NAME = "RecordingStartedVoiceConfEvtMsg" }
-case class RecordingStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: RecordingStartedVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class RecordingStartedVoiceConfEvtMsgBody(voiceConf: String, stream: String, recording: Boolean, timestamp: String)
-
-object UserJoinedVoiceConfEvtMsg { val NAME = "UserJoinedVoiceConfEvtMsg" }
-case class UserJoinedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: UserJoinedVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class UserJoinedVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String, intId: String,
- callerIdName: String, callerIdNum: String, muted: Boolean,
- talking: Boolean, callingWith: String)
-
-object UserLeftVoiceConfEvtMsg { val NAME = "UserLeftVoiceConfEvtMsg" }
-case class UserLeftVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: UserLeftVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class UserLeftVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String)
-
-
-object UserMutedInVoiceConfEvtMsg { val NAME = "UserMutedInVoiceConfEvtMsg" }
-case class UserMutedInVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: UserMutedInVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class UserMutedInVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String, muted: Boolean)
-
-object UserTalkingInVoiceConfEvtMsg { val NAME = "UserTalkingInVoiceConfEvtMsg" }
-case class UserTalkingInVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: UserTalkingInVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class UserTalkingInVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String, talking: Boolean)
-
-object DeskshareStartedVoiceConfEvtMsg { val NAME = "DeskshareStartedVoiceConfEvtMsg" }
-case class DeskshareStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: DeskshareStartedVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class DeskshareStartedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
- callerIdNum: String, callerIdName: String)
-
-object DeskshareStoppedVoiceConfEvtMsg { val NAME = "DeskshareStoppedVoiceConfEvtMsg"}
-case class DeskshareStoppedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: DeskshareStoppedVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class DeskshareStoppedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
- callerIdNum: String, callerIdName: String)
-
-object DeskshareRtmpBroadcastStartedVoiceConfEvtMsg { val NAME = "DeskshareRtmpBroadcastStartedVoiceConfEvtMsg"}
-case class DeskshareRtmpBroadcastStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: DeskshareRtmpBroadcastStartedVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class DeskshareRtmpBroadcastStartedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
- stream: String, vidWidth: String, vidHeight: String,
- timestamp: String)
-
-object DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg { val NAME = "DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg"}
-case class DeskshareRtmpBroadcastStoppedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
- body: DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgBody) extends BbbCoreMsg
-case class DeskshareRtmpBroadcastStoppedVoiceConfEvtMsgBody(voiceConf: String, deskshareConf: String,
- stream: String, vidWidth: String, vidHeight: String,
- timestamp: String)
-
-/*** Message going to clients from Akka Apps ***/
-object UserJoinedVoiceConfToClientEvtMsg { val NAME = "UserJoinedVoiceConfToClientEvtMsg" }
-case class UserJoinedVoiceConfToClientEvtMsg(header: BbbClientMsgHeader, body: UserJoinedVoiceConfToClientEvtMsgBody) extends BbbCoreMsg
-case class UserJoinedVoiceConfToClientEvtMsgBody(intId: String, voiceUserId: String, callerName: String,
- callerNum: String, muted: Boolean,
- talking: Boolean, callingWith: String, listenOnly: Boolean)
-object UserLeftVoiceConfToClientEvtMsg { val NAME = "UserLeftVoiceConfToClientEvtMsg" }
-case class UserLeftVoiceConfToClientEvtMsg(header: BbbClientMsgHeader, body: UserLeftVoiceConfToClientEvtMsgBody) extends BbbCoreMsg
-case class UserLeftVoiceConfToClientEvtMsgBody(intId: String, voiceUserId: String)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/MuteUserInVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/MuteUserInVoiceConfMsg.scala
new file mode 100755
index 0000000000..96ab1e9440
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/MuteUserInVoiceConfMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object MuteUserInVoiceConfMsg { val NAME = "MuteUserInVoiceConfMsg" }
+case class MuteUserInVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: MuteUserInVoiceConfMsgBody) extends BbbCoreMsg
+case class MuteUserInVoiceConfMsgBody(voiceConf: String, voiceUserId: String, mute: Boolean)
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/RecordingStartedVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/RecordingStartedVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..00d8330219
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/RecordingStartedVoiceConfEvtMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object RecordingStartedVoiceConfEvtMsg { val NAME = "RecordingStartedVoiceConfEvtMsg" }
+case class RecordingStartedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: RecordingStartedVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class RecordingStartedVoiceConfEvtMsgBody(voiceConf: String, stream: String, recording: Boolean, timestamp: String)
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/StartRecordingVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/StartRecordingVoiceConfMsg.scala
new file mode 100755
index 0000000000..b65b6785b7
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/StartRecordingVoiceConfMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object StartRecordingVoiceConfMsg { val NAME = "StartRecordingVoiceConfMsg" }
+case class StartRecordingVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: StartRecordingVoiceConfMsgBody) extends BbbCoreMsg
+case class StartRecordingVoiceConfMsgBody(voiceConf: String, meetingId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/StopRecordingVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/StopRecordingVoiceConfMsg.scala
new file mode 100755
index 0000000000..8ff5e45928
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/StopRecordingVoiceConfMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object StopRecordingVoiceConfMsg { val NAME = "StopRecordingVoiceConfMsg" }
+case class StopRecordingVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: StopRecordingVoiceConfMsgBody) extends BbbCoreMsg
+case class StopRecordingVoiceConfMsgBody(voiceConf: String, meetingId: String, stream: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/TransferUserToVoiceConfMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/TransferUserToVoiceConfMsg.scala
new file mode 100755
index 0000000000..dda4ec8f68
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/TransferUserToVoiceConfMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbCoreHeaderWithMeetingId, BbbCoreMsg}
+
+object TransferUserToVoiceConfMsg { val NAME = "TransferUserToVoiceConfMsg" }
+case class TransferUserToVoiceConfMsg(header: BbbCoreHeaderWithMeetingId,
+ body: TransferUserToVoiceConfMsgBody) extends BbbCoreMsg
+case class TransferUserToVoiceConfMsgBody(fromVoiceConf: String, toVoiceConf: String, voiceUserId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserJoinedVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserJoinedVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..ea9729a03f
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserJoinedVoiceConfEvtMsg.scala
@@ -0,0 +1,11 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object UserJoinedVoiceConfEvtMsg { val NAME = "UserJoinedVoiceConfEvtMsg" }
+case class UserJoinedVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: UserJoinedVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class UserJoinedVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String, intId: String,
+ callerIdName: String, callerIdNum: String, muted: Boolean,
+ talking: Boolean, callingWith: String)
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserJoinedVoiceConfToClientEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserJoinedVoiceConfToClientEvtMsg.scala
new file mode 100755
index 0000000000..cc430b3921
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserJoinedVoiceConfToClientEvtMsg.scala
@@ -0,0 +1,9 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object UserJoinedVoiceConfToClientEvtMsg { val NAME = "UserJoinedVoiceConfToClientEvtMsg" }
+case class UserJoinedVoiceConfToClientEvtMsg(header: BbbClientMsgHeader, body: UserJoinedVoiceConfToClientEvtMsgBody) extends BbbCoreMsg
+case class UserJoinedVoiceConfToClientEvtMsgBody(intId: String, voiceUserId: String, callerName: String,
+ callerNum: String, muted: Boolean,
+ talking: Boolean, callingWith: String, listenOnly: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserLeftVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserLeftVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..b24a22b4e9
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserLeftVoiceConfEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object UserLeftVoiceConfEvtMsg { val NAME = "UserLeftVoiceConfEvtMsg" }
+case class UserLeftVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: UserLeftVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class UserLeftVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserLeftVoiceConfToClientEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserLeftVoiceConfToClientEvtMsg.scala
new file mode 100755
index 0000000000..f1d58dcfef
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserLeftVoiceConfToClientEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object UserLeftVoiceConfToClientEvtMsg { val NAME = "UserLeftVoiceConfToClientEvtMsg" }
+case class UserLeftVoiceConfToClientEvtMsg(header: BbbClientMsgHeader, body: UserLeftVoiceConfToClientEvtMsgBody) extends BbbCoreMsg
+case class UserLeftVoiceConfToClientEvtMsgBody(intId: String, voiceUserId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserMutedEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserMutedEvtMsg.scala
new file mode 100755
index 0000000000..20d33c71bb
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserMutedEvtMsg.scala
@@ -0,0 +1,11 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+/**
+ * Message sent to clients that the user is muted.
+ */
+
+object UserMutedEvtMsg { val NAME = "UserMutedEvtMsg" }
+case class UserMutedEvtMsg(header: BbbClientMsgHeader, body: UserMutedEvtMsgBody) extends BbbCoreMsg
+case class UserMutedEvtMsgBody(intId: String, voiceUserId: String, muted: Boolean)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserMutedInVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserMutedInVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..87fcd4b2ec
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserMutedInVoiceConfEvtMsg.scala
@@ -0,0 +1,10 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object UserMutedInVoiceConfEvtMsg { val NAME = "UserMutedInVoiceConfEvtMsg" }
+case class UserMutedInVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: UserMutedInVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class UserMutedInVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String, muted: Boolean)
+
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserTalkingEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserTalkingEvtMsg.scala
new file mode 100755
index 0000000000..c69a86afeb
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserTalkingEvtMsg.scala
@@ -0,0 +1,11 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+/**
+ * Message sent to clients that the user is talking.
+ */
+
+object UserTalkingEvtMsg { val NAME = "UserTalkingEvtMsg" }
+case class UserTalkingEvtMsg(header: BbbClientMsgHeader, body: UserTalkingEvtMsgBody) extends BbbCoreMsg
+case class UserTalkingEvtMsgBody(intId: String, voiceUserId: String, talking: Boolean)
\ No newline at end of file
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserTalkingInVoiceConfEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserTalkingInVoiceConfEvtMsg.scala
new file mode 100755
index 0000000000..a58c18031c
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/voiceconf/UserTalkingInVoiceConfEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.voiceconf
+
+import org.bigbluebutton.common2.messages.BbbCoreMsg
+
+object UserTalkingInVoiceConfEvtMsg { val NAME = "UserTalkingInVoiceConfEvtMsg" }
+case class UserTalkingInVoiceConfEvtMsg(header: BbbCoreVoiceConfHeader,
+ body: UserTalkingInVoiceConfEvtMsgBody) extends BbbCoreMsg
+case class UserTalkingInVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String, talking: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ClearWhiteboardEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ClearWhiteboardEvtMsg.scala
new file mode 100755
index 0000000000..80db3955da
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ClearWhiteboardEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object ClearWhiteboardEvtMsg { val NAME = "ClearWhiteboardEvtMsg" }
+case class ClearWhiteboardEvtMsg(header: BbbClientMsgHeader, body: ClearWhiteboardEvtMsgBody) extends BbbCoreMsg
+case class ClearWhiteboardEvtMsgBody(whiteboardId: String, userId: String, fullClear: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ClearWhiteboardPubMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ClearWhiteboardPubMsg.scala
new file mode 100755
index 0000000000..aa0824ee2d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ClearWhiteboardPubMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+object ClearWhiteboardPubMsg { val NAME = "ClearWhiteboardPubMsg"}
+case class ClearWhiteboardPubMsg(header: BbbClientMsgHeader, body: ClearWhiteboardPubMsgBody) extends StandardMsg
+case class ClearWhiteboardPubMsgBody(whiteboardId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAccessReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAccessReqMsg.scala
new file mode 100755
index 0000000000..36e1da2f18
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAccessReqMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+object GetWhiteboardAccessReqMsg { val NAME = "GetWhiteboardAccessReqMsg"}
+case class GetWhiteboardAccessReqMsg(header: BbbClientMsgHeader, body: GetWhiteboardAccessReqMsgBody) extends StandardMsg
+case class GetWhiteboardAccessReqMsgBody(requesterId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAccessRespMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAccessRespMsg.scala
new file mode 100755
index 0000000000..abacf96ea0
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAccessRespMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object GetWhiteboardAccessRespMsg { val NAME = "GetWhiteboardAccessRespMsg" }
+case class GetWhiteboardAccessRespMsg(header: BbbClientMsgHeader, body: GetWhiteboardAccessRespMsgBody) extends BbbCoreMsg
+case class GetWhiteboardAccessRespMsgBody(multiUser: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAnnotationsReqMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAnnotationsReqMsg.scala
new file mode 100755
index 0000000000..d4a84dea55
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAnnotationsReqMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+
+object GetWhiteboardAnnotationsReqMsg { val NAME = "GetWhiteboardAnnotationsReqMsg"}
+case class GetWhiteboardAnnotationsReqMsg(header: BbbClientMsgHeader, body: GetWhiteboardAnnotationsReqMsgBody) extends StandardMsg
+case class GetWhiteboardAnnotationsReqMsgBody(whiteboardId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAnnotationsRespMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAnnotationsRespMsg.scala
new file mode 100755
index 0000000000..38b4c254d9
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/GetWhiteboardAnnotationsRespMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.domain.AnnotationVO
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object GetWhiteboardAnnotationsRespMsg { val NAME = "GetWhiteboardAnnotationsRespMsg" }
+case class GetWhiteboardAnnotationsRespMsg(header: BbbClientMsgHeader, body: GetWhiteboardAnnotationsRespMsgBody) extends BbbCoreMsg
+case class GetWhiteboardAnnotationsRespMsgBody(whiteboardId: String, annotations: Array[AnnotationVO])
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ModifyWhiteboardAccessEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ModifyWhiteboardAccessEvtMsg.scala
new file mode 100755
index 0000000000..84a5815ce8
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ModifyWhiteboardAccessEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object ModifyWhiteboardAccessEvtMsg { val NAME = "ModifyWhiteboardAccessEvtMsg" }
+case class ModifyWhiteboardAccessEvtMsg(header: BbbClientMsgHeader, body: ModifyWhiteboardAccessEvtMsgBody) extends BbbCoreMsg
+
+case class ModifyWhiteboardAccessEvtMsgBody(multiUser: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ModifyWhiteboardAccessPubMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ModifyWhiteboardAccessPubMsg.scala
new file mode 100755
index 0000000000..e96d85b860
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/ModifyWhiteboardAccessPubMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+object ModifyWhiteboardAccessPubMsg { val NAME = "ModifyWhiteboardAccessPubMsg"}
+case class ModifyWhiteboardAccessPubMsg(header: BbbClientMsgHeader, body: ModifyWhiteboardAccessPubMsgBody) extends StandardMsg
+case class ModifyWhiteboardAccessPubMsgBody(multiUser: Boolean)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendCursorPositionEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendCursorPositionEvtMsg.scala
new file mode 100755
index 0000000000..050ace6fc7
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendCursorPositionEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object SendCursorPositionEvtMsg { val NAME = "SendCursorPositionEvtMsg" }
+case class SendCursorPositionEvtMsg(header: BbbClientMsgHeader, body: SendCursorPositionEvtMsgBody) extends BbbCoreMsg
+case class SendCursorPositionEvtMsgBody(xPercent: Double, yPercent: Double)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendCursorPositionPubMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendCursorPositionPubMsg.scala
new file mode 100755
index 0000000000..5ca6fed48d
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendCursorPositionPubMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+object SendCursorPositionPubMsg { val NAME = "SendCursorPositionPubMsg"}
+case class SendCursorPositionPubMsg(header: BbbClientMsgHeader, body: SendCursorPositionPubMsgBody) extends StandardMsg
+case class SendCursorPositionPubMsgBody(xPercent: Double, yPercent: Double)
+
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendWhiteboardAnnotationEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendWhiteboardAnnotationEvtMsg.scala
new file mode 100755
index 0000000000..894585d3a4
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendWhiteboardAnnotationEvtMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.domain.AnnotationVO
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object SendWhiteboardAnnotationEvtMsg { val NAME = "SendWhiteboardAnnotationEvtMsg" }
+case class SendWhiteboardAnnotationEvtMsg(header: BbbClientMsgHeader, body: SendWhiteboardAnnotationEvtMsgBody) extends BbbCoreMsg
+case class SendWhiteboardAnnotationEvtMsgBody(annotation: AnnotationVO)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendWhiteboardAnnotationPubMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendWhiteboardAnnotationPubMsg.scala
new file mode 100755
index 0000000000..12e1d5dc27
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/SendWhiteboardAnnotationPubMsg.scala
@@ -0,0 +1,8 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.domain.AnnotationVO
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+object SendWhiteboardAnnotationPubMsg { val NAME = "SendWhiteboardAnnotationPubMsg"}
+case class SendWhiteboardAnnotationPubMsg(header: BbbClientMsgHeader, body: SendWhiteboardAnnotationPubMsgBody) extends StandardMsg
+case class SendWhiteboardAnnotationPubMsgBody(annotation: AnnotationVO)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/UndoWhiteboardEvtMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/UndoWhiteboardEvtMsg.scala
new file mode 100755
index 0000000000..4c9fe31b88
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/UndoWhiteboardEvtMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, BbbCoreMsg}
+
+object UndoWhiteboardEvtMsg { val NAME = "UndoWhiteboardEvtMsg" }
+case class UndoWhiteboardEvtMsg(header: BbbClientMsgHeader, body: UndoWhiteboardEvtMsgBody) extends BbbCoreMsg
+case class UndoWhiteboardEvtMsgBody(whiteboardId: String, userId: String, annotationId: String)
diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/UndoWhiteboardPubMsg.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/UndoWhiteboardPubMsg.scala
new file mode 100755
index 0000000000..484dbac561
--- /dev/null
+++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/messages/whiteboard/UndoWhiteboardPubMsg.scala
@@ -0,0 +1,7 @@
+package org.bigbluebutton.common2.messages.whiteboard
+
+import org.bigbluebutton.common2.messages.{BbbClientMsgHeader, StandardMsg}
+
+object UndoWhiteboardPubMsg { val NAME = "UndoWhiteboardPubMsg"}
+case class UndoWhiteboardPubMsg(header: BbbClientMsgHeader, body: UndoWhiteboardPubMsgBody) extends StandardMsg
+case class UndoWhiteboardPubMsgBody(whiteboardId: String)
diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala
index 5075b4b839..870abe8d63 100755
--- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala
+++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala
@@ -1,10 +1,10 @@
package org.bigbluebutton.api2.meeting
import org.bigbluebutton.api2.SystemConfiguration
-import org.bigbluebutton.api2.bus.{ MsgToAkkaApps, MsgToAkkaAppsEventBus }
+import org.bigbluebutton.api2.bus.{MsgToAkkaApps, MsgToAkkaAppsEventBus}
import org.bigbluebutton.common2.domain.DefaultProps
-import org.bigbluebutton.common2.messages.MessageBody.{ CreateMeetingReqMsgBody, RegisterUserReqMsgBody }
import org.bigbluebutton.common2.messages._
+import org.bigbluebutton.common2.messages.users.{RegisterUserReqMsg, RegisterUserReqMsgBody}
trait ToAkkaAppsSendersTrait extends SystemConfiguration {
val msgToAkkaAppsEventBus: MsgToAkkaAppsEventBus
diff --git a/bigbluebutton-apps/src/main/webapp/WEB-INF/classes/application.conf b/bigbluebutton-apps/src/main/webapp/WEB-INF/classes/application.conf
index f5ba5981ea..74183500ea 100755
--- a/bigbluebutton-apps/src/main/webapp/WEB-INF/classes/application.conf
+++ b/bigbluebutton-apps/src/main/webapp/WEB-INF/classes/application.conf
@@ -36,7 +36,7 @@ redis {
}
eventBus {
- meetingManagerChannel = "MeetingManagerChannel"
+ meetingManagerChannel = "FROM APPLICATION.CONF MeetingManagerChannel"
outMessageChannel = "OutgoingMessageChannel"
incomingJsonMsgChannel = "IncomingJsonMsgChannel"
outBbbMsgMsgChannel = "OutBbbMsgChannel"
diff --git a/bigbluebutton-client/locale/en_US/bbbResources.properties b/bigbluebutton-client/locale/en_US/bbbResources.properties
index 081341061b..b896acab79 100755
--- a/bigbluebutton-client/locale/en_US/bbbResources.properties
+++ b/bigbluebutton-client/locale/en_US/bbbResources.properties
@@ -179,6 +179,7 @@ bbb.users.usersGrid.statusItemRenderer = Status
bbb.users.usersGrid.statusItemRenderer.changePresenter = Click To Make Presenter
bbb.users.usersGrid.statusItemRenderer.presenter = Presenter
bbb.users.usersGrid.statusItemRenderer.moderator = Moderator
+bbb.users.usersGrid.statusItemRenderer.voiceOnlyUser = Voice Only
bbb.users.usersGrid.statusItemRenderer.raiseHand = Hand Raised
bbb.users.usersGrid.statusItemRenderer.agree = Agree
bbb.users.usersGrid.statusItemRenderer.disagree = Disagree
diff --git a/bigbluebutton-client/src/org/bigbluebutton/common/Role.as b/bigbluebutton-client/src/org/bigbluebutton/common/Role.as
index 5f2685d792..403afbc459 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/common/Role.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/common/Role.as
@@ -1,54 +1,55 @@
/**
-* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
-*
-* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
-*
-* This program is free software; you can redistribute it and/or modify it under the
-* terms of the GNU Lesser General Public License as published by the Free Software
-* Foundation; either version 3.0 of the License, or (at your option) any later
-* version.
-*
-* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
-* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License along
-* with BigBlueButton; if not, see .
-*
-*/
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
package org.bigbluebutton.common
{
- import org.as3commons.logging.api.ILogger;
- import org.as3commons.logging.api.getClassLogger;
-
- public class Role
- {
- private static const LOGGER:ILogger = getClassLogger(Role);
-
- public static const VIEWER:String = "VIEWER";
- public static const PRESENTER:String = "PRESENTER";
- public static const MODERATOR:String = "MODERATOR";
-
- private static var userrole:String;
-
- [Bindable] public static var isPresenter:Boolean;
-
- /**
- * Set the role of the user, with the role being one of the constants defined in this class.
- * @param role
- *
- */
- public static function setRole(role:String):void{
- if (role == VIEWER){
- Role.userrole = VIEWER;
- Role.isPresenter = false;
- } else if (role == MODERATOR){
- Role.userrole = MODERATOR;
- } else if (role == PRESENTER){
- Role.userrole = PRESENTER;
- Role.isPresenter = true;
- }
- }
-
- }
+ import org.as3commons.logging.api.ILogger;
+ import org.as3commons.logging.api.getClassLogger;
+
+ public class Role
+ {
+ private static const LOGGER:ILogger = getClassLogger(Role);
+
+ public static const VIEWER:String = "VIEWER";
+ public static const PRESENTER:String = "PRESENTER";
+ public static const MODERATOR:String = "MODERATOR";
+ public static const VOICE_ONLY:String = "MODERATOR";
+
+ private static var userrole:String;
+
+ [Bindable] public static var isPresenter:Boolean;
+
+ /**
+ * Set the role of the user, with the role being one of the constants defined in this class.
+ * @param role
+ *
+ */
+ public static function setRole(role:String):void{
+ if (role == VIEWER){
+ Role.userrole = VIEWER;
+ Role.isPresenter = false;
+ } else if (role == MODERATOR){
+ Role.userrole = MODERATOR;
+ } else if (role == PRESENTER){
+ Role.userrole = PRESENTER;
+ Role.isPresenter = true;
+ }
+ }
+
+ }
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as b/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as
index 1aed69d116..51354ab874 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/UsersUtil.as
@@ -23,12 +23,12 @@ package org.bigbluebutton.core
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.Role;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.LiveMeeting;
+ import org.bigbluebutton.core.model.users.User2x;
+ import org.bigbluebutton.core.model.users.VoiceUser2x;
import org.bigbluebutton.core.vo.CameraSettingsVO;
import org.bigbluebutton.core.vo.LockSettingsVO;
import org.bigbluebutton.main.model.options.LockOptions;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.BreakoutRoom;
import org.bigbluebutton.util.SessionTokenUtil;
@@ -38,7 +38,7 @@ package org.bigbluebutton.core
private static const LOGGER:ILogger = getClassLogger(UsersUtil);
public static function isUserLeaving(userID:String):Boolean {
- var user:BBBUser = getUser(userID);
+ var user:User2x = getUser2x(userID);
if (user != null) {
return user.isLeavingFlag;
}
@@ -47,29 +47,33 @@ package org.bigbluebutton.core
}
public static function getPresenterUserID():String {
- var presenter:BBBUser = UserManager.getInstance().getConference().getPresenter();
+ var presenter:User2x = LiveMeeting.inst().users.getPresenter();
if (presenter != null) {
- return presenter.userID;
+ return presenter.intId;
}
return "";
}
- public static function isUserJoinedToVoice(userID:String):Boolean {
- var u:BBBUser = getUser(userID);
+ public static function getPresenter(): User2x {
+ return LiveMeeting.inst().users.getPresenter();
+ }
+
+ public static function isUserJoinedToVoice(userId:String):Boolean {
+ var u:VoiceUser2x = LiveMeeting.inst().voiceUsers.getUser(userId);
if (u != null) {
- return u.voiceJoined;
+ return true;
}
return false;
}
public static function setUserEjected():void {
- LiveMeeting.inst().myStatus.userEjectedFromMeeting = true;
+ LiveMeeting.inst().me.ejectedFromMeeting = true;
}
public static function isUserEjected():Boolean {
- return LiveMeeting.inst().myStatus.userEjectedFromMeeting;
+ return LiveMeeting.inst().me.ejectedFromMeeting;
}
public static function isRecorded():Boolean {
@@ -77,33 +81,28 @@ package org.bigbluebutton.core
}
public static function myCamSettings():ArrayCollection {
- return LiveMeeting.inst().myStatus.myCamSettings() as ArrayCollection;
+ return LiveMeeting.inst().me.myCamSettings() as ArrayCollection;
}
public static function addCameraSettings(camSettings:CameraSettingsVO):void {
- LiveMeeting.inst().myStatus.addCameraSettings(camSettings);
+ LiveMeeting.inst().me.addCameraSettings(camSettings);
}
public static function removeCameraSettings(camIndex:int):void {
- LiveMeeting.inst().myStatus.removeCameraSettings(camIndex);
+ LiveMeeting.inst().me.removeCameraSettings(camIndex);
}
- public static function hasWebcamStream(userID:String):Boolean {
- var u:BBBUser = getUser(userID);
- if (u != null) {
- return u.hasStream;
+ public static function hasWebcamStream(userId:String):Boolean {
+ var streams:Array = LiveMeeting.inst().webcams.getStreamsForUser(userId);
+ if (streams.length > 0) {
+ return true;
}
return false;
}
- public static function getWebcamStream(userID:String):Array {
- var u:BBBUser = getUser(userID);
- if (u != null && u.hasStream) {
- return u.streamNames;
- }
-
- return null;
+ public static function getWebcamStreamsFor(userId:String):Array {
+ return LiveMeeting.inst().webcams.getStreamsForUser(userId);
}
public static function setDefaultLayout(defaultLayout:String):void {
@@ -114,8 +113,8 @@ package org.bigbluebutton.core
return LiveMeeting.inst().meeting.defaultLayout;
}
- public static function getUserIDs():ArrayCollection {
- return UserManager.getInstance().getConference().getUserIDs();
+ public static function getUserIDs():Array {
+ return LiveMeeting.inst().users.getUserIds();
}
public static function getInternalMeetingID():String {
@@ -126,8 +125,8 @@ package org.bigbluebutton.core
return LiveMeeting.inst().me.avatarURL;
}
- public static function getUserAvatarURL(userID:String):String {
- return UserManager.getInstance().getConference().getUserAvatarURL(userID);
+ public static function getUserAvatarURL(userId:String):String {
+ return LiveMeeting.inst().users.getAvatar(userId);
}
public static function getVoiceBridge():String {
@@ -155,45 +154,69 @@ package org.bigbluebutton.core
}
public static function amIPresenter():Boolean {
- return LiveMeeting.inst().myStatus.isPresenter;
+ return LiveMeeting.inst().me.isPresenter;
}
public static function isBreakout():Boolean {
return LiveMeeting.inst().meeting.isBreakout;
}
- public static function isMyVoiceMuted():Boolean {
- return LiveMeeting.inst().myStatus.voiceMuted;
+ public static function amIMuted():Boolean {
+ return LiveMeeting.inst().me.muted;
}
public static function iAskedToLogout():Boolean {
- return LiveMeeting.inst().myStatus.iAskedToLogout;
+ return LiveMeeting.inst().me.iAskedToLogout;
+ }
+
+ public static function newUserRoleForUser(userId: String, role: String): void {
+ LiveMeeting.inst().users.setRoleForUser(userId, role);
+ }
+
+ public static function setMyRole(role: String): void {
+ LiveMeeting.inst().me.role = role;
}
public static function setIAskedToLogout(value:Boolean): void {
- LiveMeeting.inst().myStatus.iAskedToLogout = value;
+ LiveMeeting.inst().me.iAskedToLogout = value;
}
public static function setMeAsPresenter(value: Boolean): void {
- LiveMeeting.inst().myStatus.isPresenter = value;
+ LiveMeeting.inst().me.isPresenter = value;
+ var user: User2x = LiveMeeting.inst().users.getUser(LiveMeeting.inst().me.id)
+ user.presenter = value;
applyLockSettings();
}
- public static function amIWaitingForAcceptance():Boolean {
- return LiveMeeting.inst().myStatus.waitingForAcceptance;
- }
-
- public static function hasUser(userID:String):Boolean {
- return UserManager.getInstance().getConference().hasUser(userID);
+ public static function amIinVoiceConf(): Boolean {
+ var myVoiceUser: VoiceUser2x = LiveMeeting.inst().voiceUsers.getUser(LiveMeeting.inst().me.id);
+ if (myVoiceUser != null) return true;
+ return false;
}
- public static function getUser(userID:String):BBBUser {
- return UserManager.getInstance().getConference().getUser(userID);
+ public static function amIWaitingForAcceptance():Boolean {
+ return LiveMeeting.inst().me.waitingForApproval;
+ }
+
+ public static function hasUser(userId:String):Boolean {
+ return getUser(userId) != null;
+ }
+
+ public static function getUsers(): ArrayCollection {
+ return LiveMeeting.inst().users.getUsers();
+ }
+
+ public static function getUser(userID:String):User2x {
+ return LiveMeeting.inst().users.getUser(userID);
+ }
+
+ public static function getUser2x(userId:String):User2x {
+ return LiveMeeting.inst().users.getUser(userId);
}
- public static function getMyself():BBBUser {
- return UserManager.getInstance().getConference().getMyUser();
+ public static function getMyself():User2x {
+ return getUser2x(LiveMeeting.inst().me.id);
}
public static function isMe(userID:String):Boolean {
@@ -212,22 +235,26 @@ package org.bigbluebutton.core
return LiveMeeting.inst().me.role;
}
+ public static function setMeMuted(muted: Boolean): void {
+ LiveMeeting.inst().me.muted = muted;
+ }
+
public static function getMyUsername():String {
return LiveMeeting.inst().me.name;
}
public static function myEmoji():String {
- return LiveMeeting.inst().myStatus.myEmojiStatus;
+ return LiveMeeting.inst().me.emoji;
}
public static function setMyEmoji(value: String):void {
- LiveMeeting.inst().myStatus.myEmojiStatus = value;
+ LiveMeeting.inst().me.emoji = value;
}
public static function internalUserIDToExternalUserID(userID:String):String {
- var user:BBBUser = UserManager.getInstance().getConference().getUser(userID);
+ var user:User2x = LiveMeeting.inst().users.getUser(userID);
if (user != null) {
- return user.externUserID;
+ return user.extId;
}
var logData:Object = UsersUtil.initLogData();
logData.tags = ["user-util"];
@@ -237,9 +264,9 @@ package org.bigbluebutton.core
}
public static function externalUserIDToInternalUserID(externUserID:String):String {
- var user:BBBUser = UserManager.getInstance().getConference().getUserWithExternUserID(externUserID);
+ var user:User2x = LiveMeeting.inst().users.getUserWithExtId(externUserID);
if (user != null) {
- return user.userID;
+ return user.intId;
}
var logData:Object = UsersUtil.initLogData();
logData.tags = ["user-util"];
@@ -249,7 +276,7 @@ package org.bigbluebutton.core
}
public static function getUserName(userID:String):String {
- var user:BBBUser = UserManager.getInstance().getConference().getUser(userID);
+ var user:User2x = LiveMeeting.inst().users.getUser(userID);
if (user != null) {
return user.name;
}
@@ -268,13 +295,7 @@ package org.bigbluebutton.core
}
public static function isAnyoneLocked():Boolean {
- var users:ArrayCollection = UserManager.getInstance().getConference().users;
- for(var i:uint = 0; i.
+ *
+ */
+package org.bigbluebutton.core.connection.messages.layout {
+ import org.bigbluebutton.core.connection.messages.BbbCommonMsg;
+
+ public class BroadcastLayoutMsg extends BbbCommonMsg {
+ public var body:BroadcastLayoutMsgBody;
+
+ public function BroadcastLayoutMsg(body:BroadcastLayoutMsgBody) {
+ super();
+ this.body = body;
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/BroadcastLayoutMsgBody.as b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/BroadcastLayoutMsgBody.as
new file mode 100644
index 0000000000..b5c6639273
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/BroadcastLayoutMsgBody.as
@@ -0,0 +1,35 @@
+/**
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2017 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
+package org.bigbluebutton.core.connection.messages.layout {
+
+ public class BroadcastLayoutMsgBody {
+
+ public var meetingId:String;
+
+ public var requesterId:String;
+
+ public var layout:String;
+
+ public function BroadcastLayoutMsgBody(meetingId:String, requesterId:String, layout:String) {
+ this.meetingId = meetingId;
+ this.requesterId = requesterId;
+ this.layout = layout;
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/GetCurrentLayoutMsg.as b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/GetCurrentLayoutMsg.as
new file mode 100644
index 0000000000..92f97bc667
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/GetCurrentLayoutMsg.as
@@ -0,0 +1,30 @@
+/**
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2017 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
+package org.bigbluebutton.core.connection.messages.layout {
+ import org.bigbluebutton.core.connection.messages.BbbCommonMsg;
+
+ public class GetCurrentLayoutMsg extends BbbCommonMsg {
+ public var body:GetCurrentLayoutMsgBody;
+
+ public function GetCurrentLayoutMsg(body:GetCurrentLayoutMsgBody) {
+ super();
+ this.body = body;
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/GetCurrentLayoutMsgBody.as b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/GetCurrentLayoutMsgBody.as
new file mode 100644
index 0000000000..62f29088cd
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/GetCurrentLayoutMsgBody.as
@@ -0,0 +1,32 @@
+/**
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2017 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
+package org.bigbluebutton.core.connection.messages.layout {
+
+ public class GetCurrentLayoutMsgBody {
+
+ public var meetingId:String;
+
+ public var requesterId:String;
+
+ public function GetCurrentLayoutMsgBody(meetingId:String, requesterId:String) {
+ this.meetingId = meetingId;
+ this.requesterId = requesterId;
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/LockLayoutMsg.as b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/LockLayoutMsg.as
new file mode 100644
index 0000000000..b6d4d54257
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/LockLayoutMsg.as
@@ -0,0 +1,30 @@
+/**
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2017 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
+package org.bigbluebutton.core.connection.messages.layout {
+ import org.bigbluebutton.core.connection.messages.BbbCommonMsg;
+
+ public class LockLayoutMsg extends BbbCommonMsg {
+ public var body:LockLayoutMsgBody;
+
+ public function LockLayoutMsg(body:LockLayoutMsgBody) {
+ super();
+ this.body = body;
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/LockLayoutMsgBody.as b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/LockLayoutMsgBody.as
new file mode 100644
index 0000000000..6f1eb6c4aa
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/connection/messages/layout/LockLayoutMsgBody.as
@@ -0,0 +1,41 @@
+/**
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2017 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
+package org.bigbluebutton.core.connection.messages.layout {
+
+ public class LockLayoutMsgBody {
+
+ public var meetingId:String;
+
+ public var setById:String;
+
+ public var lock:Boolean;
+
+ public var viewersOnly:Boolean;
+
+ public var layout:String;
+
+ public function LockLayoutMsgBody(meetingId:String, setById:String, lock:Boolean, viewersOnly:Boolean, layout:String) {
+ this.meetingId = meetingId;
+ this.setById = setById;
+ this.lock = lock;
+ this.viewersOnly = viewersOnly;
+ this.layout = layout;
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/events/UserEmojiChangedEvent.as b/bigbluebutton-client/src/org/bigbluebutton/core/events/UserEmojiChangedEvent.as
new file mode 100755
index 0000000000..c675471142
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/events/UserEmojiChangedEvent.as
@@ -0,0 +1,19 @@
+package org.bigbluebutton.core.events
+{
+ import flash.events.Event;
+
+ public class UserEmojiChangedEvent extends Event
+ {
+ public static const USER_EMOJI_CHANGED: String = "user emoji changed event";
+
+ public var userId: String;
+ public var emoji: String;
+
+ public function UserEmojiChangedEvent(userId: String, emoji: String)
+ {
+ super(USER_EMOJI_CHANGED, false, false);
+ this.userId = userId;
+ this.emoji = emoji;
+ }
+ }
+}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/events/UserStatusChangedEvent.as b/bigbluebutton-client/src/org/bigbluebutton/core/events/UserStatusChangedEvent.as
new file mode 100755
index 0000000000..e7d70e6617
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/events/UserStatusChangedEvent.as
@@ -0,0 +1,17 @@
+package org.bigbluebutton.core.events
+{
+ import flash.events.Event;
+
+ public class UserStatusChangedEvent extends Event
+ {
+ public static const USER_STATUS_CHANGED: String = "user status changed event";
+
+ public var userId: String;
+
+ public function UserStatusChangedEvent(userId: String)
+ {
+ super(USER_STATUS_CHANGED, false, false);
+ this.userId = userId;
+ }
+ }
+}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/managers/UserManager.as b/bigbluebutton-client/src/org/bigbluebutton/core/managers/UserManager.as
deleted file mode 100755
index b7371046e3..0000000000
--- a/bigbluebutton-client/src/org/bigbluebutton/core/managers/UserManager.as
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
-* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
-*
-* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
-*
-* This program is free software; you can redistribute it and/or modify it under the
-* terms of the GNU Lesser General Public License as published by the Free Software
-* Foundation; either version 3.0 of the License, or (at your option) any later
-* version.
-*
-* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
-* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License along
-* with BigBlueButton; if not, see .
-*
-*/
-package org.bigbluebutton.core.managers {
- import mx.collections.ArrayCollection;
- import org.bigbluebutton.main.model.users.Conference;
-
- /**
- * The UserManager allows you to interact with the user data of those currently logged in to the conference.
- *
- */
- public class UserManager {
- private static var instance:UserManager = null;
- private var listeners:ArrayCollection;
- private var conference:Conference = new Conference();
-
- /**
- * This class is a singleton. Please initialize it using the getInstance() method.
- *
- */
- public function UserManager(enforcer:SingletonEnforcer) {
- if (enforcer == null){
- throw new Error("There can only be 1 UserManager instance");
- }
- initialize();
- }
-
- private function initialize():void{
- listeners = new ArrayCollection();
- }
-
- /**
- * Return the single instance of the UserManager class
- */
- public static function getInstance():UserManager{
- if (instance == null){
- instance = new UserManager(new SingletonEnforcer());
- }
- return instance;
- }
-
- public function getConference():Conference{
- return this.conference;
- }
- }
-}
-
-class SingletonEnforcer{}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/LiveMeeting.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/LiveMeeting.as
index 8261d6684e..d943b278e2 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/LiveMeeting.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/LiveMeeting.as
@@ -9,7 +9,6 @@ package org.bigbluebutton.core.model
private static var instance: LiveMeeting = null;
public var me: Me = new Me();
- public var myStatus: MyStatus = new MyStatus();
public var webcams: Webcams = new Webcams();
public var voiceUsers: VoiceUsers2x = new VoiceUsers2x();
public var users: Users2x = new Users2x();
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/Me.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/Me.as
index 5384a23f84..6d51044bf5 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/Me.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/Me.as
@@ -1,5 +1,17 @@
package org.bigbluebutton.core.model
{
+ import com.asfusion.mate.events.Dispatcher;
+
+ import mx.collections.ArrayCollection;
+
+ import org.bigbluebutton.core.UsersUtil;
+ import org.bigbluebutton.core.events.LockControlEvent;
+ import org.bigbluebutton.core.events.VoiceConfEvent;
+ import org.bigbluebutton.core.model.users.VoiceUser2x;
+ import org.bigbluebutton.core.vo.CameraSettingsVO;
+ import org.bigbluebutton.core.vo.LockSettingsVO;
+ import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
+
public class Me
{
public var id:String = "";
@@ -17,9 +29,30 @@ package org.bigbluebutton.core.model
public var authed:Boolean = false;
public var customData:Object = new Object();
- private var _role:String = "viewer";
+ // Flag to tell that user is in the process of leaving the meeting.
+ public var isLeavingFlag:Boolean = false;
+
+ public var disableMyCam:Boolean = false;
+ public var disableMyMic:Boolean = false;
+ public var disableMyPrivateChat:Boolean = false;
+ public var disableMyPublicChat:Boolean = false;
+ public var lockedLayout:Boolean = false;
+
+ public var iAskedToLogout:Boolean;
+ public var ejectedFromMeeting:Boolean = false;
+
+ public var locked: Boolean = false;
+ public var inVoiceConf: Boolean = false;
+ public var muted: Boolean = false;
+
+ public var isPresenter: Boolean = false;
+ public var emoji: String = "none";
+
+ public var authTokenValid: Boolean = false;
+ public var waitingForApproval: Boolean;
+ private var _role:String = "viewer";
public function get role():String {
return _role.toUpperCase();
}
@@ -27,5 +60,60 @@ package org.bigbluebutton.core.model
public function set role(value: String):void {
_role = value;
}
+
+
+ private var _myCamSettings:ArrayCollection = new ArrayCollection();
+ public function addCameraSettings(camSettings: CameraSettingsVO): void {
+ if(!_myCamSettings.contains(camSettings)) {
+ _myCamSettings.addItem(camSettings);
+ }
+ }
+
+ public function removeCameraSettings(camIndex:int): void {
+ if (camIndex != -1) {
+ for(var i:int = 0; i < _myCamSettings.length; i++) {
+ if (_myCamSettings.getItemAt(i) != null && _myCamSettings.getItemAt(i).camIndex == camIndex) {
+ _myCamSettings.removeItemAt(i);
+ return;
+ }
+ }
+ }
+ }
+
+ public function myCamSettings():ArrayCollection {
+ return _myCamSettings;
+ }
+
+ public function applyLockSettings():void {
+ var lockSettings:LockSettingsVO = UsersUtil.getLockSettings();
+ var amNotModerator:Boolean = !UsersUtil.amIModerator();
+ var amNotPresenter:Boolean = !UsersUtil.amIPresenter();
+ var lockAppliesToMe:Boolean = amNotModerator && amNotPresenter && locked;
+
+ disableMyCam = lockAppliesToMe && lockSettings.getDisableCam();
+ disableMyMic = lockAppliesToMe && lockSettings.getDisableMic();
+ disableMyPrivateChat = lockAppliesToMe && lockSettings.getDisablePrivateChat();
+ disableMyPublicChat = lockAppliesToMe && lockSettings.getDisablePublicChat();
+ lockedLayout = lockAppliesToMe && lockSettings.getLockedLayout();
+
+ var dispatcher:Dispatcher = new Dispatcher();
+ dispatcher.dispatchEvent(new LockControlEvent(LockControlEvent.CHANGED_LOCK_SETTINGS));
+
+ if (lockAppliesToMe) {
+ //If it's sharing webcam, stop it
+ if (disableMyCam && LiveMeeting.inst().webcams.getStreamsForUser(LiveMeeting.inst().me.id)) {
+ dispatcher.dispatchEvent(new ClosePublishWindowEvent());
+ }
+ //If it's sharing microphone, mute it
+ var myVoiceUser: VoiceUser2x = LiveMeeting.inst().voiceUsers.getUser(LiveMeeting.inst().me.id);
+
+ if (disableMyMic && (myVoiceUser != null) && ! myVoiceUser.muted) {
+ var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
+ e.userid = UsersUtil.getMyUserID();
+ e.mute = true;
+ dispatcher.dispatchEvent(e);
+ }
+ }
+ }
}
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/MediaStream.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/MediaStream.as
index ba3bc7ac75..54fdd29d97 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/MediaStream.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/MediaStream.as
@@ -1,16 +1,17 @@
package org.bigbluebutton.core.model
{
- import mx.collections.ArrayCollection;
- public class MediaStream
- {
- public var streamId: String;
- public var intId: String;
- public var attributes: ArrayCollection = new ArrayCollection();
- public var viewers:ArrayCollection = new ArrayCollection();
-
- public function MediaStream()
- {
- }
- }
+ public class MediaStream
+ {
+ public var streamId: String;
+ public var userId: String;
+ public var attributes: Object = new Object();
+ public var viewers:Array = new Array();
+
+ public function MediaStream(streamId: String, userId: String)
+ {
+ this.streamId = streamId;
+ this.userId = userId;
+ }
+ }
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/MyStatus.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/MyStatus.as
index 6dc747bfef..5138a09799 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/MyStatus.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/MyStatus.as
@@ -18,9 +18,15 @@
*/
package org.bigbluebutton.core.model
{
- import mx.collections.ArrayCollection;
-
+ import com.asfusion.mate.events.Dispatcher;
+ import mx.collections.ArrayCollection;
+ import org.bigbluebutton.core.UsersUtil;
+ import org.bigbluebutton.core.events.LockControlEvent;
+ import org.bigbluebutton.core.events.VoiceConfEvent;
+ import org.bigbluebutton.core.model.users.VoiceUser2x;
import org.bigbluebutton.core.vo.CameraSettingsVO;
+ import org.bigbluebutton.core.vo.LockSettingsVO;
+ import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
public class MyStatus {
@@ -35,7 +41,6 @@ package org.bigbluebutton.core.model
public var iAskedToLogout:Boolean;
public var userEjectedFromMeeting:Boolean = false;
- public var waitingForAcceptance: Boolean;
public var userLocked: Boolean = false;
public var voiceJoined: Boolean = false;
@@ -45,6 +50,7 @@ package org.bigbluebutton.core.model
public var myEmojiStatus: String = "none";
public var authTokenValid: Boolean = false;
+ public var waitingForApproval: Boolean;
private var _myCamSettings:ArrayCollection = new ArrayCollection();
@@ -69,6 +75,37 @@ package org.bigbluebutton.core.model
return _myCamSettings;
}
+ public function applyLockSettings():void {
+ var lockSettings:LockSettingsVO = UsersUtil.getLockSettings();
+ var amNotModerator:Boolean = !UsersUtil.amIModerator();
+ var amNotPresenter:Boolean = !UsersUtil.amIPresenter();
+ var lockAppliesToMe:Boolean = amNotModerator && amNotPresenter && userLocked;
+
+ disableMyCam = lockAppliesToMe && lockSettings.getDisableCam();
+ disableMyMic = lockAppliesToMe && lockSettings.getDisableMic();
+ disableMyPrivateChat = lockAppliesToMe && lockSettings.getDisablePrivateChat();
+ disableMyPublicChat = lockAppliesToMe && lockSettings.getDisablePublicChat();
+ lockedLayout = lockAppliesToMe && lockSettings.getLockedLayout();
+
+ var dispatcher:Dispatcher = new Dispatcher();
+ dispatcher.dispatchEvent(new LockControlEvent(LockControlEvent.CHANGED_LOCK_SETTINGS));
+
+ if (lockAppliesToMe) {
+ //If it's sharing webcam, stop it
+ if (disableMyCam && LiveMeeting.inst().webcams.getStreamsForUser(LiveMeeting.inst().me.id)) {
+ dispatcher.dispatchEvent(new ClosePublishWindowEvent());
+ }
+ //If it's sharing microphone, mute it
+ var myVoiceUser: VoiceUser2x = LiveMeeting.inst().voiceUsers.getUser(LiveMeeting.inst().me.id);
+
+ if (disableMyMic && (myVoiceUser != null) && ! myVoiceUser.muted) {
+ var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
+ e.userid = UsersUtil.getMyUserID();
+ e.mute = true;
+ dispatcher.dispatchEvent(e);
+ }
+ }
+ }
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/Webcams.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/Webcams.as
index e0f43b74a7..1cbe721ed3 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/Webcams.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/Webcams.as
@@ -58,5 +58,62 @@ package org.bigbluebutton.core.model
return -1;
}
+
+ public function getStreamsForUser(userId: String): Array {
+ var tempArray: Array = new Array();
+
+ for (var i:int = 0; i < _webcams.length; i++) {
+ var stream:MediaStream = _webcams.getItemAt(i) as MediaStream;
+
+ if (stream.userId == userId) {
+ tempArray.push(stream);
+ }
+ }
+ return tempArray;
+ }
+
+ public function getStreamIdsForUser(userId: String): Array {
+ var tempArray: Array = new Array();
+
+ for (var i:int = 0; i < _webcams.length; i++) {
+ var stream:MediaStream = _webcams.getItemAt(i) as MediaStream;
+
+ if (stream.userId == userId) {
+ tempArray.push(stream.streamId);
+ }
+ }
+ return tempArray;
+ }
+
+ public function getStreamIdsViewingForUser(userId: String): Array {
+ var tempArray: Array = new Array();
+
+ for (var i:int = 0; i < _webcams.length; i++) {
+ var stream:MediaStream = _webcams.getItemAt(i) as MediaStream;
+
+ if (stream.userId == userId) {
+ var viewers: Array = stream.viewers;
+ for (var v:int = 0; v < viewers.length; v++) {
+ var viewer: String = viewers[v] as String;
+ if (viewer == LiveMeeting.inst().me.id) {
+ tempArray.push(stream.streamId);
+ }
+ }
+ }
+ }
+ return tempArray;
+ }
+
+ public function isViewingStream(userId: String, streamId: String): Boolean {
+ var stream: MediaStream = getStream(streamId);
+ if (stream != null) {
+ for (var i: int = 0; i < stream.viewers.length; i++) {
+ var viewer: String = stream.viewers[i] as String;
+ if (viewer == userId) return true;
+ }
+ }
+
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/User2x.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/User2x.as
index 24d3866182..c77edc3997 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/User2x.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/User2x.as
@@ -13,5 +13,84 @@ package org.bigbluebutton.core.model.users
public var locked: Boolean;
public var presenter: Boolean;
public var avatar: String;
+
+ public var breakoutRooms: Array = new Array();
+
+ // Flag to tell that user is in the process of leaving the meeting.
+ public var isLeavingFlag:Boolean = false;
+
+ [Bindable] private var _viewingStream:Array = new Array();
+
+ [Bindable]
+ public function get viewingStream():Array {
+ return _viewingStream;
+ }
+ public function set viewingStream(v:Array):void {
+ throw new Error("Please use the helpers addViewingStream or removeViewingStream to handle viewingStream");
+ }
+ public function addViewingStream(streamName:String):Boolean {
+ if (isViewingStream(streamName)) {
+ return false;
+ }
+
+ _viewingStream.push(streamName);
+ return true;
+ }
+ public function removeViewingStream(streamName:String):Boolean {
+ if (!isViewingStream(streamName)) {
+ return false;
+ }
+
+ _viewingStream = _viewingStream.filter(function(item:*, index:int, array:Array):Boolean { return item != streamName; });
+ return true;
+ }
+ private function isViewingStream(streamName:String):Boolean {
+ return _viewingStream.some(function(item:*, index:int, array:Array):Boolean { return item == streamName; });
+ }
+ public function isViewingAllStreams():Boolean {
+ return _viewingStream.length == streamNames.length;
+ }
+
+ [Bindable] public var streamNames:Array = new Array();
+
+ [Bindable]
+ public function get streamName():String {
+ var streams:String = "";
+ for each(var stream:String in streamNames) {
+ streams = streams + stream + "|";
+ }
+ //Remove last |
+ streams = streams.slice(0, streams.length-1);
+ return streams;
+ }
+
+ private function hasThisStream(streamName:String):Boolean {
+ return streamNames.some(function(item:*, index:int, array:Array):Boolean { return item == streamName; });
+ }
+
+ public function set streamName(streamNames:String):void {
+ if(streamNames) {
+ var streamNamesList:Array = streamNames.split("|");
+ }
+ }
+
+ public static function copy(source: User2x):User2x {
+ var dest: User2x = new User2x();
+ dest.intId = source.intId;
+ dest.extId = source.extId;
+ dest.name = source.name;
+ dest.role = source.role;
+ dest.guest = source.guest;
+ dest.authed = source.authed;
+ dest.waitingForAcceptance = source.waitingForAcceptance;
+ dest.emoji = source.emoji;
+ dest.locked = source.locked;
+ dest.presenter = source.presenter;
+ dest.avatar = source.avatar;
+ dest.breakoutRooms = new Array();
+ dest.isLeavingFlag = source.isLeavingFlag;
+
+ return dest;
+ }
}
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/Users2x.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/Users2x.as
index 3886e5ebc9..b8160e57f1 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/Users2x.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/Users2x.as
@@ -1,17 +1,21 @@
package org.bigbluebutton.core.model.users
{
- import mx.collections.ArrayCollection;
-
+ import mx.collections.ArrayCollection;
+
public class Users2x
{
-
+
private var _users:ArrayCollection = new ArrayCollection();
-
- public function add(user: User2x):void {
+
+ public function getUsers(): ArrayCollection {
+ return new ArrayCollection(_users.toArray());
+ }
+
+ public function add(user: User2x):void {
_users.addItem(user);
}
- public function remove(userId: String):User2x {
+ public function remove(userId: String):User2x {
var index:int = getIndex(userId);
if (index >= 0) {
return _users.removeItemAt(index) as User2x;
@@ -20,7 +24,7 @@ package org.bigbluebutton.core.model.users
return null;
}
- public function getUserAndIndex(userId: String):Object {
+ public function getUserAndIndex(userId: String):Object {
var user:User2x;
for (var i:int = 0; i < _users.length; i++) {
user = _users.getItemAt(i) as User2x;
@@ -33,7 +37,7 @@ package org.bigbluebutton.core.model.users
return null;
}
- public function getUser(userId:String):User2x {
+ public function getUser(userId:String):User2x {
var user:User2x;
for (var i:int = 0; i < _users.length; i++) {
@@ -42,12 +46,28 @@ package org.bigbluebutton.core.model.users
if (user.intId == userId) {
return user;
}
- }
+ }
return null;
}
- public function getIndex(userId: String):int {
+ public function getUserWithExtId(extId:String):User2x {
+ var user:User2x;
+
+ for (var i:int = 0; i < _users.length; i++) {
+ user = _users.getItemAt(i) as User2x;
+
+ if (user.extId == extId) {
+ return user;
+ }
+ }
+
+ return null;
+ }
+
+
+
+ public function getIndex(userId: String):int {
var user:User2x;
for (var i:int = 0; i < _users.length; i++) {
user = _users.getItemAt(i) as User2x;
@@ -59,15 +79,73 @@ package org.bigbluebutton.core.model.users
return -1;
}
+
+ public function getPresenter():User2x {
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:User2x = _users.getItemAt(i) as User2x;
- public function userJoined(vu: User2x):void {
- add(vu);
+ if (user.presenter) {
+ return user;
+ }
+ }
+
+ return null;
}
-
- public function userLeft(intId: String):User2x {
- return remove(intId);
+
+ public function getUserIds():Array {
+ var temp:Array = new Array();
+
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:User2x = _users.getItemAt(i) as User2x;
+ temp.push(user.intId);
+ }
+
+ return temp;
+ }
+
+ public function getAvatar(userId:String):String {
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:User2x = _users.getItemAt(i) as User2x;
+
+ if (user.intId == userId) {
+ return user.avatar;
+ }
+ }
+
+ return null;
+ }
+
+ public function getPresenters(): Array {
+ var temp: Array = new Array();
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:User2x = _users.getItemAt(i) as User2x;
+ if (user.presenter) {
+ temp.push(user.intId);
+ }
+ }
+
+ return temp;
+ }
+
+ public function isAnyUserLocked(): Boolean {
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:User2x = _users.getItemAt(i) as User2x;
+ if (user.locked) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function setRoleForUser(userId: String, role: String): void {
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:User2x = _users.getItemAt(i) as User2x;
+ if (user.intId == userId) {
+ user.role = role;
+ }
+ }
}
-
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/UsersModel.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/UsersModel.as
index 7004baadbf..d7d052b64c 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/UsersModel.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/UsersModel.as
@@ -1,8 +1,6 @@
package org.bigbluebutton.core.model.users
{
import mx.collections.ArrayCollection;
-
- import org.bigbluebutton.core.model.Me;
import org.bigbluebutton.core.vo.UserVO;
import org.bigbluebutton.core.vo.VoiceUserVO;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUser2x.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUser2x.as
index 852285e52b..476d65e35b 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUser2x.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUser2x.as
@@ -10,5 +10,16 @@ package org.bigbluebutton.core.model.users
public var muted: Boolean;
public var talking: Boolean;
public var listenOnly: Boolean;
+
+ public function get voiceOnlyUser(): Boolean {
+ if (startsWith(intId, "v_")) {
+ return true;
+ }
+ return false;
+ }
+
+ private function startsWith(userId:String, voiceUserPrefix:String):Boolean {
+ return userId.indexOf(voiceUserPrefix) == 0;
+ }
}
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUsers2x.as b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUsers2x.as
index bb473f6382..3c6d549d7e 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUsers2x.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/core/model/users/VoiceUsers2x.as
@@ -7,11 +7,11 @@ package org.bigbluebutton.core.model.users
private var _users:ArrayCollection = new ArrayCollection();
- private function add(user: VoiceUser2x):void {
+ public function add(user: VoiceUser2x):void {
_users.addItem(user);
}
- private function remove(userId: String):VoiceUser2x {
+ public function remove(userId: String):VoiceUser2x {
var index:int = getIndex(userId);
if (index >= 0) {
return _users.removeItemAt(index) as VoiceUser2x;
@@ -20,7 +20,7 @@ package org.bigbluebutton.core.model.users
return null;
}
- private function getUserAndIndex(userId: String):Object {
+ public function getUserAndIndex(userId: String):Object {
var user:VoiceUser2x;
for (var i:int = 0; i < _users.length; i++) {
user = _users.getItemAt(i) as VoiceUser2x;
@@ -33,7 +33,7 @@ package org.bigbluebutton.core.model.users
return null;
}
- private function getUser(userId:String):VoiceUser2x {
+ public function getUser(userId:String):VoiceUser2x {
var user:VoiceUser2x;
for (var i:int = 0; i < _users.length; i++) {
@@ -47,7 +47,7 @@ package org.bigbluebutton.core.model.users
return null;
}
- private function getIndex(userId: String):int {
+ public function getIndex(userId: String):int {
var user:VoiceUser2x;
for (var i:int = 0; i < _users.length; i++) {
user = _users.getItemAt(i) as VoiceUser2x;
@@ -59,15 +59,49 @@ package org.bigbluebutton.core.model.users
return -1;
}
+
+ public function getVoiceOnlyUsers():Array {
+ var temp: Array = new Array();
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:VoiceUser2x = _users.getItemAt(i) as VoiceUser2x;
+
+ if (user.voiceOnlyUser) {
+ temp.push(user);
+ }
+ }
+ return temp;
+ }
- public function userJoined(vu: VoiceUser2x):void {
- add(vu);
+ public function setListenOnlyForUser(userId: String, listenOnly: Boolean): void {
+
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:VoiceUser2x = _users.getItemAt(i) as VoiceUser2x;
+
+ if (user.intId == userId) {
+ user.listenOnly = listenOnly;
+ }
+ }
}
- public function userLeft(intId: String):VoiceUser2x {
- return remove(intId);
+ public function setMutedForUser(userId: String, muted: Boolean): void {
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:VoiceUser2x = _users.getItemAt(i) as VoiceUser2x;
+
+ if (user.intId == userId) {
+ user.muted = muted;
+ }
+ }
}
+ public function setTalkingForUser(userId: String, talking: Boolean): void {
+ for (var i:int = 0; i < _users.length; i++) {
+ var user:VoiceUser2x = _users.getItemAt(i) as VoiceUser2x;
+
+ if (user.intId == userId) {
+ user.talking = talking;
+ }
+ }
+ }
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/core/services/UsersService.as b/bigbluebutton-client/src/org/bigbluebutton/core/services/UsersService.as
deleted file mode 100644
index 032546c282..0000000000
--- a/bigbluebutton-client/src/org/bigbluebutton/core/services/UsersService.as
+++ /dev/null
@@ -1,100 +0,0 @@
-package org.bigbluebutton.core.services
-{
- import org.as3commons.logging.api.ILogger;
- import org.as3commons.logging.api.getClassLogger;
- import org.bigbluebutton.core.model.users.UsersModel;
- import org.bigbluebutton.core.vo.UserVO;
- import org.bigbluebutton.core.vo.VoiceUserVO;
-
- public class UsersService
- {
- private static const LOGGER:ILogger = getClassLogger(UsersService);
-
- private static var instance:UsersService = null;
-
- private var msgProc: UsersMessageProcessor = new UsersMessageProcessor();
-
- public function UsersService(enforcer: UsersServiceSingletonEnforcer) {
- if (enforcer == null){
- throw new Error("There can only be 1 UsersService instance");
- }
- }
-
- public static function getInstance():UsersService{
- if (instance == null){
- instance = new UsersService(new UsersServiceSingletonEnforcer());
- }
- return instance;
- }
-
-
- public function userJoinedVoice(user:Object):void {
- var vu: VoiceUserVO = msgProc.processUserJoinedVoiceMessage(user);
-
- if (vu != null) {
- var u: UserVO = UsersModel.getInstance().userJoinedVoice(vu);
- if (u != null) {
- // dispatch event
- }
- }
- }
-
- public function userLeftVoice(user: Object):void {
- var vu: VoiceUserVO = msgProc.processUserLeftVoiceMessage(user);
-
- if (vu != null) {
- var u: UserVO = UsersModel.getInstance().userLeftVoice(vu);
- if (u != null) {
- // dispatch event
- }
- }
- }
-
- public function userJoined(user: Object):void {
- var vu: UserVO = msgProc.processUserJoinedMessage(user);
-
- if (vu != null) {
- var u: UserVO = UsersModel.getInstance().userJoined(vu);
- if (u != null) {
- // dispatch event
- }
- }
- }
-
- public function userLeft(user: Object):void {
- var vu:UserVO = msgProc.processUserLeftMessage(user);
-
- if (vu != null) {
- var u: UserVO = UsersModel.getInstance().userLeft(vu);
- if (u != null) {
- // dispatch event
- }
- }
- }
-
- public function userMuted(msg: Object):void {
- var vu: Object = msgProc.processUserMutedMessage(msg);
-
- if (vu != null) {
- var u: UserVO = UsersModel.getInstance().userMuted(vu.userId, vu.voiceId, vu.muted);
- if (u != null) {
- // dispatch event
- }
- }
- }
-
- public function userTalking(msg: Object):void {
- var vu: Object = msgProc.processUserTalkingMessage(msg);
-
- if (vu != null) {
- var u: UserVO = UsersModel.getInstance().userTalking(vu.userId, vu.voiceId, vu.talking);
- if (u != null) {
- // dispatch event
- }
- }
- }
-
- }
-}
-
-class UsersServiceSingletonEnforcer{}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as
index c87691b5aa..e334921905 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as
@@ -154,7 +154,7 @@ package org.bigbluebutton.main.api
var obj:Object = new Object();
var isUserPublishing:Boolean = false;
- var streamNames:Array = UsersUtil.getWebcamStream(userID);
+ var streamNames:Array = UsersUtil.getWebcamStreamsFor(userID);
if (streamNames && streamNames.length > 0) {
isUserPublishing = true;
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as
index ffaf0ce8d9..3a4ae4e93f 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as
@@ -34,14 +34,14 @@ package org.bigbluebutton.main.api
import org.bigbluebutton.core.events.GetMyUserInfoRequestEvent;
import org.bigbluebutton.core.events.IsUserPublishingCamRequest;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
- import org.bigbluebutton.core.managers.UserManager;
+ import org.bigbluebutton.core.model.LiveMeeting;
+ import org.bigbluebutton.core.model.users.User2x;
import org.bigbluebutton.core.vo.CameraSettingsVO;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.events.UserJoinedEvent;
import org.bigbluebutton.main.events.UserLeftEvent;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent;
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
@@ -57,7 +57,7 @@ package org.bigbluebutton.main.api
import org.bigbluebutton.modules.present.events.OfficeDocConvertInvalidEvent;
import org.bigbluebutton.modules.present.events.OfficeDocConvertSuccessEvent;
import org.bigbluebutton.modules.present.events.UploadEvent;
- import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
+ import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
public class ExternalApiCalls {
private static const LOGGER:ILogger = getClassLogger(ExternalApiCalls);
@@ -81,7 +81,7 @@ package org.bigbluebutton.main.api
var payload:Object = new Object();
var isUserPublishing:Boolean = false;
- var streamNames:Array = UsersUtil.getWebcamStream(event.userID);
+ var streamNames:Array = UsersUtil.getWebcamStreamsFor(event.userID);
if (streamNames && streamNames.length > 0) {
isUserPublishing = true;
}
@@ -294,7 +294,7 @@ package org.bigbluebutton.main.api
public function handleUserJoinedEvent(event:UserJoinedEvent):void {
var payload:Object = new Object();
- var user:BBBUser = UserManager.getInstance().getConference().getUser(event.userID);
+ var user:User2x = LiveMeeting.inst().users.getUser(event.userID);
if (user == null) {
LOGGER.warn("[ExternalApiCall:handleParticipantJoinEvent] Cannot find user with ID [{0}]", [event.userID]);
@@ -302,7 +302,7 @@ package org.bigbluebutton.main.api
}
payload.eventName = EventConstants.USER_JOINED;
- payload.userID = user.userID;
+ payload.userID = user.intId;
payload.userName = user.name;
broadcastEvent(payload);
@@ -310,7 +310,7 @@ package org.bigbluebutton.main.api
public function handleUserLeftEvent(event:UserLeftEvent):void {
var payload:Object = new Object();
- var user:BBBUser = UserManager.getInstance().getConference().getUser(event.userID);
+ var user:User2x = LiveMeeting.inst().users.getUser(event.userID);
if (user == null) {
LOGGER.warn("[ExternalApiCall:handleParticipantJoinEvent] Cannot find user with ID [{0}]", [event.userID]);
@@ -318,7 +318,7 @@ package org.bigbluebutton.main.api
}
payload.eventName = EventConstants.USER_LEFT;
- payload.userID = user.userID;
+ payload.userID = user.intId;
broadcastEvent(payload);
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/maps/ApplicationEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/maps/ApplicationEventMap.mxml
index 01158bddc2..6b5a592ae4 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/maps/ApplicationEventMap.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/maps/ApplicationEventMap.mxml
@@ -32,6 +32,7 @@ with BigBlueButton; if not, see .
+
@@ -94,25 +95,31 @@ with BigBlueButton; if not, see .
+
+
+
+
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as
index 5ed3324fc4..fb16089808 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as
@@ -29,7 +29,6 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.LockControlEvent;
import org.bigbluebutton.core.events.VoiceConfEvent;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.vo.LockSettingsVO;
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as
index 8242623d0c..63bbbfda13 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as
@@ -119,22 +119,32 @@ package org.bigbluebutton.main.model.users
}
}
- private function handleValidateAuthTokenReply2x(body: Object):void {
+ private function handleValidateAuthTokenReply2x(body: Object):void {
+ LOGGER.debug("handleValidateAuthTokenReply2x");
stopValidateTokenTimer();
var tokenValid: Boolean = body.valid as Boolean;
var userId: String = body.userId as String;
+ var waitForApproval: Boolean = body.waitForApproval as Boolean;
+
var logData:Object = UsersUtil.initLogData();
logData.tags = ["apps", "connected"];
logData.tokenValid = tokenValid;
+ logData.waitForApproval = waitForApproval;
logData.status = "validate_token_response_received";
logData.message = "Received validate token response from server. 2x";
LOGGER.info(JSON.stringify(logData));
if (tokenValid) {
- LiveMeeting.inst().myStatus.authTokenValid = true;
- dispatcher.dispatchEvent(new TokenValidEvent());
+ LiveMeeting.inst().me.authTokenValid = true;
+ if (waitForApproval) {
+ var waitCommand:BBBEvent = new BBBEvent(BBBEvent.WAITING_FOR_MODERATOR_ACCEPTANCE);
+ dispatcher.dispatchEvent(waitCommand);
+ } else {
+ LiveMeeting.inst().me.waitingForApproval = false;
+ sendConnectionSuccessEvent(userId);
+ }
} else {
dispatcher.dispatchEvent(new InvalidAuthTokenEvent());
}
@@ -146,17 +156,23 @@ package org.bigbluebutton.main.model.users
}
public function onMessageFromServer2x(messageName:String, msg:String):void {
+ if (messageName != "SendCursorPositionEvtMsg") {
LOGGER.debug("onMessageFromServer2x - " + msg);
+ }
+
var map:Object = JSON.parse(msg);
var header: Object = map.header as Object;
var body: Object = map.body as Object;
var msgName: String = header.name
- if (!LiveMeeting.inst().myStatus.authTokenValid && (messageName == "ValidateAuthTokenRespMsg")) {
+
+ LOGGER.debug("authTokenValid=" + LiveMeeting.inst().me.authTokenValid + " messageName=" + messageName);
+
+ if (!LiveMeeting.inst().me.authTokenValid && (messageName == "ValidateAuthTokenRespMsg")) {
handleValidateAuthTokenReply2x(body)
} else if (messageName == "validateAuthTokenTimedOut") {
handleValidateAuthTokenTimedOut(msg)
- } else if (LiveMeeting.inst().myStatus.authTokenValid) {
+ } else if (LiveMeeting.inst().me.authTokenValid) {
notifyListeners(messageName, map);
} else {
LOGGER.debug("Ignoring message=[{0}] as our token hasn't been validated yet.", [messageName]);
@@ -168,11 +184,11 @@ package org.bigbluebutton.main.model.users
}
public function onMessageFromServer(messageName:String, msg:Object):void {
- if (!LiveMeeting.inst().myStatus.authTokenValid && (messageName == "validateAuthTokenReply")) {
+ if (!LiveMeeting.inst().me.authTokenValid && (messageName == "validateAuthTokenReply")) {
handleValidateAuthTokenReply(msg)
} else if (messageName == "validateAuthTokenTimedOut") {
handleValidateAuthTokenTimedOut(msg)
- } else if (LiveMeeting.inst().myStatus.authTokenValid) {
+ } else if (LiveMeeting.inst().me.authTokenValid) {
notifyListeners(messageName, msg);
} else {
LOGGER.debug("Ignoring message=[{0}] as our token hasn't been validated yet.", [messageName]);
@@ -296,7 +312,7 @@ package org.bigbluebutton.main.model.users
LOGGER.info(JSON.stringify(logData));
if (tokenValid) {
- LiveMeeting.inst().myStatus.authTokenValid = true;
+ LiveMeeting.inst().me.authTokenValid = true;
} else {
dispatcher.dispatchEvent(new InvalidAuthTokenEvent());
}
@@ -322,7 +338,7 @@ package org.bigbluebutton.main.model.users
LOGGER.info(JSON.stringify(logData));
if (tokenValid) {
- LiveMeeting.inst().myStatus.authTokenValid = true;
+// LiveMeeting.inst().me.authTokenValid = true;
} else {
dispatcher.dispatchEvent(new InvalidAuthTokenEvent());
}
@@ -334,7 +350,7 @@ package org.bigbluebutton.main.model.users
}
private function onReconnect():void {
- if (LiveMeeting.inst().myStatus.authTokenValid) {
+ if (LiveMeeting.inst().me.authTokenValid) {
onReconnectSuccess();
} else {
onReconnectFailed();
@@ -351,7 +367,8 @@ package org.bigbluebutton.main.model.users
sendUserLoggedOutEvent();
}
- private function sendConnectionSuccessEvent(userid:String):void{
+ private function sendConnectionSuccessEvent(userid:String):void{
+ LOGGER.debug("Sending UsersConnectionEvent.CONNECTION_SUCCESS event");
var e:UsersConnectionEvent = new UsersConnectionEvent(UsersConnectionEvent.CONNECTION_SUCCESS);
e.userid = userid;
dispatcher.dispatchEvent(e);
@@ -494,7 +511,6 @@ package org.bigbluebutton.main.model.users
connectAttemptCount = 0;
logData.message = "Successfully connected to bbb-apps.";
LOGGER.info(JSON.stringify(logData));
- validateToken();
validateToken2x();
break;
@@ -593,7 +609,7 @@ package org.bigbluebutton.main.model.users
dispatcher.dispatchEvent(attemptFailedEvent);
} else {
reconnecting = true;
- LiveMeeting.inst().myStatus.authTokenValid = false;
+ LiveMeeting.inst().me.authTokenValid = false;
var disconnectedEvent:BBBEvent = new BBBEvent(BBBEvent.RECONNECT_DISCONNECTED_EVENT);
disconnectedEvent.payload.type = ReconnectionManager.BIGBLUEBUTTON_CONNECTION;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
index b7a0d5758b..f07ace32c1 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
@@ -18,10 +18,10 @@
*/
package org.bigbluebutton.main.model.users
{
- import com.asfusion.mate.events.Dispatcher;
+ import com.asfusion.mate.events.Dispatcher;
+
import flash.external.ExternalInterface;
- import flash.net.NetConnection;
- import mx.collections.ArrayCollection;
+ import flash.net.NetConnection;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
@@ -31,7 +31,6 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.core.events.TokenValidEvent;
import org.bigbluebutton.core.events.VoiceConfEvent;
import org.bigbluebutton.core.managers.ConnectionManager;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.BreakoutRoomEvent;
@@ -133,7 +132,6 @@ package org.bigbluebutton.main.model.users
ExternalInterface.call("setTitle", result.meetingName);
var e:ConferenceCreatedEvent = new ConferenceCreatedEvent(ConferenceCreatedEvent.CONFERENCE_CREATED_EVENT);
- e.conference = UserManager.getInstance().getConference();
dispatcher.dispatchEvent(e);
connect();
@@ -182,17 +180,14 @@ package org.bigbluebutton.main.model.users
}
public function userLoggedIn(e:UsersConnectionEvent):void {
- var waitingForAcceptance:Boolean = true;
- if (UserManager.getInstance().getConference().hasUser(e.userid)) {
- LOGGER.debug("userLoggedIn - conference has this user");
- waitingForAcceptance = UserManager.getInstance().getConference().getUser(e.userid).waitingForAcceptance;
- }
-
- if (reconnecting && !waitingForAcceptance) {
+ LOGGER.debug("In userLoggedIn - reconnecting and allowed to join");
+ if (reconnecting && ! LiveMeeting.inst().me.waitingForApproval) {
LOGGER.debug("userLoggedIn - reconnecting and allowed to join");
onAllowedToJoin();
reconnecting = false;
- }
+ } else {
+ onAllowedToJoin();
+ }
}
public function denyGuest():void {
@@ -210,10 +205,6 @@ package org.bigbluebutton.main.model.users
public function isModerator():Boolean {
return UsersUtil.amIModerator();
}
-
- public function get participants():ArrayCollection {
- return UserManager.getInstance().getConference().users;
- }
public function addStream(e:BroadcastStartedEvent):void {
sender.addStream(e.userid, e.stream);
@@ -310,8 +301,8 @@ package org.bigbluebutton.main.model.users
}
public function lockAlmostAllUsers(command:LockControlEvent):void {
- var pres:BBBUser = UserManager.getInstance().getConference().getPresenter();
- sender.setAllUsersLock(true, [pres.userID]);
+ var pres:Array = LiveMeeting.inst().users.getPresenters();
+ sender.setAllUsersLock(true, pres);
}
public function lockUser(command:LockControlEvent):void {
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/ConferenceCreatedEvent.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/ConferenceCreatedEvent.as
index e00e8b798c..1635c761ac 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/ConferenceCreatedEvent.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/events/ConferenceCreatedEvent.as
@@ -20,14 +20,10 @@ package org.bigbluebutton.main.model.users.events
{
import flash.events.Event;
- import org.bigbluebutton.main.model.users.Conference;
-
public class ConferenceCreatedEvent extends Event
{
public static const CONFERENCE_CREATED_EVENT:String = "conferenceCreated";
- public var conference:Conference;
-
public function ConferenceCreatedEvent(type:String)
{
super(type, true, false);
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/GuestItem.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/GuestItem.mxml
old mode 100644
new mode 100755
index 8b453bc41a..ffcba46aba
--- a/bigbluebutton-client/src/org/bigbluebutton/main/views/GuestItem.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/GuestItem.mxml
@@ -26,19 +26,12 @@
.
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.PopUpUtil;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.ExitApplicationEvent;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml
index f218a75e7d..8f9580638b 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainApplicationShell.mxml
@@ -119,7 +119,6 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.LockControlEvent;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.vo.LockSettingsVO;
import org.bigbluebutton.main.events.AppVersionEvent;
import org.bigbluebutton.main.events.BBBEvent;
@@ -139,7 +138,6 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.main.model.options.BrowserVersionsOptions;
import org.bigbluebutton.main.model.options.LanguageOptions;
import org.bigbluebutton.main.model.options.LayoutOptions;
- import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
import org.bigbluebutton.modules.phone.events.AudioSelectionWindowEvent;
import org.bigbluebutton.modules.phone.events.FlashMicSettingsEvent;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml
index cf3a7e3c90..146172c1d8 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MainToolbar.mxml
@@ -71,7 +71,6 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.Config;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.main.events.BBBEvent;
@@ -193,12 +192,9 @@ with BigBlueButton; if not, see .
}
private function refreshModeratorButtonsVisibility(e:*):void {
- var userLoaded:Boolean = UserManager.getInstance().getConference().getMyUser() != null
- && ! UserManager.getInstance().getConference().getMyUser().waitingForAcceptance;
+ showGuestSettingsButton = UsersUtil.amIModerator();
- showGuestSettingsButton = userLoaded && UsersUtil.amIModerator();
-
- showRecordButton = userLoaded;
+ showRecordButton = UsersUtil.amIModerator();
}
private function getFlashPlayerCapabilities():Object {
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/MuteMeButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/MuteMeButton.mxml
index 91a25f5c9f..dbf14b009a 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/views/MuteMeButton.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/MuteMeButton.mxml
@@ -28,7 +28,7 @@ $Id: $
visible="false"
includeInLayout="false"
creationComplete="onCreationComplete()"
- toolTip="{UserManager.getInstance().getConference().voiceMuted ? ResourceUtil.getInstance().getString('bbb.users.pushToTalk.toolTip') : ResourceUtil.getInstance().getString('bbb.users.pushToMute.toolTip')}"
+ toolTip="{UsersUtil.amIMuted() ? ResourceUtil.getInstance().getString('bbb.users.pushToTalk.toolTip') : ResourceUtil.getInstance().getString('bbb.users.pushToMute.toolTip')}"
click="toggleMuteMeState()" width="140" maxWidth="180"
mouseOver="mouseOverHandler()"
mouseOut="mouseOutHandler()"
@@ -48,26 +48,25 @@ $Id: $
.
import flexlib.controls.tabBarClasses.SuperTab;
- import melomel.core.UI;
-
import mx.binding.utils.BindingUtils;
import mx.binding.utils.ChangeWatcher;
import mx.collections.ArrayCollection;
@@ -50,9 +48,8 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
+ import org.bigbluebutton.core.model.users.User2x;
import org.bigbluebutton.main.events.ShortcutEvent;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.caption.events.RequestTranscriptsEvent;
import org.bigbluebutton.modules.caption.model.CaptionOptions;
@@ -198,7 +195,7 @@ with BigBlueButton; if not, see .
ownerText = ResourceUtil.getInstance().getString('bbb.caption.transcript.youowner');
} else {
//claimed by other
- var user:BBBUser = UserManager.getInstance().getConference().getUser(ownerId);
+ var user:User2x = UsersUtil.getUser(ownerId)
if (user != null) {
ownerText = user.name;
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AddChatTabBox.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AddChatTabBox.mxml
index e9a108fb72..2453b3d685 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AddChatTabBox.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/AddChatTabBox.mxml
@@ -34,25 +34,23 @@ with BigBlueButton; if not, see .
.
[Bindable] public var chatOptions:ChatOptions;
private function onCreationComplete():void{
- users = UserManager.getInstance().getConference().users;
+ users = UsersUtil.getUsers();
chatOptions = Options.getOptions(ChatOptions) as ChatOptions;
if (!chatOptions.privateEnabled) {
@@ -143,12 +141,8 @@ with BigBlueButton; if not, see .
private function refreshListStatus():void {
if (UsersUtil.amIModerator() || UsersUtil.amIPresenter()) return; // Settings only affect viewers.
-
- var userManager:UserManager = UserManager.getInstance();
- var conference:Conference = userManager.getConference();
- var me:BBBUser = conference.getMyUser();
-
- usersList.enabled = !me.disableMyPrivateChat;
+
+ usersList.enabled = ! LiveMeeting.inst().me.disableMyPrivateChat;
}
]]>
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml
index 0ae75755dd..e1f7cd113f 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml
@@ -67,43 +67,41 @@ with BigBlueButton; if not, see .
.
}
private function applyLockSettings():void {
- var userManager:UserManager = UserManager.getInstance();
- var conference:Conference = userManager.getConference();
- var me:BBBUser = conference.getMyUser();
if (publicChat) {
- txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPublicChat;
+ txtMsgArea.enabled = sendBtn.enabled = !LiveMeeting.inst().me.disableMyPublicChat;
} else {
- txtMsgArea.enabled = sendBtn.enabled = !me.disableMyPrivateChat;
+ txtMsgArea.enabled = sendBtn.enabled = !LiveMeeting.inst().me.disableMyPrivateChat;
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as
old mode 100644
new mode 100755
index ed5654315c..58fa1f7672
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as
@@ -23,15 +23,14 @@ package org.bigbluebutton.modules.classyaudio.managers
import flash.events.Event;
import flash.events.TimerEvent;
import flash.utils.Timer;
-
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.events.ToolbarButtonEvent;
- import org.bigbluebutton.core.managers.UserManager;
+ import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.modules.classyaudio.events.CallConnectedEvent;
import org.bigbluebutton.modules.classyaudio.events.PushToTalkEvent;
- import org.bigbluebutton.modules.classyaudio.views.PushToTalkButton;
+ import org.bigbluebutton.modules.classyaudio.views.PushToTalkButton;
public class ClassyAudioManager
{
@@ -130,7 +129,7 @@ package org.bigbluebutton.modules.classyaudio.managers
}
private function muteIfNotPresenter(e:Event = null):void{
- if (UserManager.getInstance().getConference().amIPresenter){
+ if (UsersUtil.amIPresenter){
streamManager.unmute();
} else {
streamManager.mute();
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as
index 96e806f960..1edbc384e6 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as
@@ -36,18 +36,15 @@ package org.bigbluebutton.modules.layout.managers
import flexlib.mdi.containers.MDICanvas;
import flexlib.mdi.containers.MDIWindow;
- import flexlib.mdi.events.MDIManagerEvent;
-
+ import flexlib.mdi.events.MDIManagerEvent;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.CustomMdiWindow;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.main.model.options.LayoutOptions;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.modules.layout.events.LayoutEvent;
import org.bigbluebutton.modules.layout.events.LayoutFromRemoteEvent;
import org.bigbluebutton.modules.layout.events.LayoutLockedEvent;
@@ -365,8 +362,7 @@ package org.bigbluebutton.modules.layout.managers
}
public function lockSettingsChanged():void {
- var myUser:BBBUser = UserManager.getInstance().getConference().getMyUser();
- _locked = myUser.lockedLayout;
+ _locked = LiveMeeting.inst().me.lockedLayout;
checkPermissionsOverAllWindows();
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/model/LayoutDefinition.as b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/model/LayoutDefinition.as
index f6facc64e2..13e65d0183 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/model/LayoutDefinition.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/model/LayoutDefinition.as
@@ -25,7 +25,6 @@ package org.bigbluebutton.modules.layout.model {
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.Role;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.modules.layout.managers.OrderManager;
public class LayoutDefinition {
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as
index f9cdd00493..4463adccfc 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageReceiver.as
@@ -1,105 +1,145 @@
-package org.bigbluebutton.modules.layout.services
-{
- import com.asfusion.mate.events.Dispatcher;
-
- import flash.events.TimerEvent;
- import flash.utils.Timer;
-
- import org.as3commons.logging.api.ILogger;
- import org.as3commons.logging.api.getClassLogger;
- import org.bigbluebutton.core.BBB;
- import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.main.events.ModuleLoadEvent;
- import org.bigbluebutton.main.model.users.IMessageListener;
- import org.bigbluebutton.modules.layout.events.LayoutEvent;
- import org.bigbluebutton.modules.layout.events.LayoutFromRemoteEvent;
- import org.bigbluebutton.modules.layout.events.LayoutLockedEvent;
- import org.bigbluebutton.modules.layout.events.RemoteSyncLayoutEvent;
- import org.bigbluebutton.modules.layout.model.LayoutDefinition;
- import org.bigbluebutton.util.i18n.ResourceUtil;
+package org.bigbluebutton.modules.layout.services {
+ import com.asfusion.mate.events.Dispatcher;
- public class MessageReceiver implements IMessageListener
- {
- private static const LOGGER:ILogger = getClassLogger(MessageReceiver);
+ import flash.events.TimerEvent;
+ import flash.utils.Timer;
- private var _dispatcher:Dispatcher;
-
- public function MessageReceiver()
- {
- BBB.initConnectionManager().addMessageListener(this);
- _dispatcher = new Dispatcher();
- }
-
- public function onMessage(messageName:String, message:Object):void {
-// trace("LAYOUT: received message " + messageName);
-
- switch (messageName) {
- case "getCurrentLayoutResponse":
- handleGetCurrentLayoutResponse(message);
- break;
- case "layoutLocked":
- handleLayoutLocked(message);
- break;
- case "syncLayout":
- handleSyncLayout(message);
- break;
- }
- }
-
- /*
- * the application of the first layout should be delayed to avoid
- * strange movements of the windows before set the correct position
- * TDJ: increasing from 750 to 1000 because in some computers the initial layout was not applying correctly
- */
- private var _applyFirstLayoutTimer:Timer = new Timer(1000,1);
-
- private function handleGetCurrentLayoutResponse(message:Object):void {
- _applyFirstLayoutTimer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent):void {
- onReceivedFirstLayout(message);
- });
- _applyFirstLayoutTimer.start();
- }
-
- private function onReceivedFirstLayout(message:Object):void {
- LOGGER.debug("LayoutService: handling the first layout. locked = [{0}] layout = [{1}]", [message.locked, message.layout]);
- trace("LayoutService: handling the first layout. locked = [" + message.locked + "] layout = [" + message.layout + "], moderator = [" + UsersUtil.amIModerator() + "]");
- if(message.layout == "")
- _dispatcher.dispatchEvent(new LayoutEvent(LayoutEvent.APPLY_DEFAULT_LAYOUT_EVENT));
- else {
- handleSyncLayout(message);
- }
-
- handleLayoutLocked(message);
- _dispatcher.dispatchEvent(new ModuleLoadEvent(ModuleLoadEvent.LAYOUT_MODULE_STARTED));
- }
-
- private function handleSyncLayout(message:Object):void {
- _dispatcher.dispatchEvent(new RemoteSyncLayoutEvent(message.layout));
- if (message.layout == "") return;
-
- var layoutDefinition:LayoutDefinition = new LayoutDefinition();
- layoutDefinition.load(new XML(message.layout));
- var translatedName:String = ResourceUtil.getInstance().getString(layoutDefinition.name)
- if (translatedName == "undefined") translatedName = layoutDefinition.name;
- // remove previously added [Remote] mark
- var pattern:RegExp = /^\[.*\] /g;
- translatedName = translatedName.replace(pattern, "");
- layoutDefinition.name = "[" + ResourceUtil.getInstance().getString('bbb.layout.combo.remote') + "] " + translatedName;
- var redefineLayout:LayoutFromRemoteEvent = new LayoutFromRemoteEvent();
- redefineLayout.layout = layoutDefinition;
- redefineLayout.remote = true;
-
- _dispatcher.dispatchEvent(redefineLayout);
- }
-
- private function handleLayoutLocked(message:Object):void {
- if (message.hasOwnProperty("locked") && message.hasOwnProperty("setById"))
- lockLayout(message.locked, message.setById);
- }
-
- private function lockLayout(locked:Boolean, setById:String):void {
- LOGGER.debug("LayoutService: received locked layout message. locked = [{0}] by= [{1}]", [locked, setById]);
- _dispatcher.dispatchEvent(new LayoutLockedEvent(locked, setById));
- }
- }
+ import org.as3commons.logging.api.ILogger;
+ import org.as3commons.logging.api.getClassLogger;
+ import org.bigbluebutton.core.BBB;
+ import org.bigbluebutton.core.UsersUtil;
+ import org.bigbluebutton.main.events.ModuleLoadEvent;
+ import org.bigbluebutton.main.model.users.IMessageListener;
+ import org.bigbluebutton.modules.layout.events.LayoutEvent;
+ import org.bigbluebutton.modules.layout.events.LayoutFromRemoteEvent;
+ import org.bigbluebutton.modules.layout.events.LayoutLockedEvent;
+ import org.bigbluebutton.modules.layout.events.RemoteSyncLayoutEvent;
+ import org.bigbluebutton.modules.layout.model.LayoutDefinition;
+ import org.bigbluebutton.util.i18n.ResourceUtil;
+
+ public class MessageReceiver implements IMessageListener {
+ private static const LOGGER:ILogger = getClassLogger(MessageReceiver);
+
+ private var _dispatcher:Dispatcher;
+
+ public function MessageReceiver() {
+ BBB.initConnectionManager().addMessageListener(this);
+ _dispatcher = new Dispatcher();
+ }
+
+ public function onMessage(messageName:String, message:Object):void {
+ // trace("LAYOUT: received message " + messageName);
+
+ switch (messageName) {
+ case "GetCurrentLayoutEvtMsg":
+ handleGetCurrentLayoutEvtMsg(message);
+ break;
+ case "BroadcastLayoutEvtMsg":
+ handleBroadcastLayoutEvtMsg(message);
+ case "LockLayoutEvtMsg":
+ handleLockLayoutEvtMsg(message);
+ case "getCurrentLayoutResponse":
+ handleGetCurrentLayoutResponse(message);
+ break;
+ case "layoutLocked":
+ handleLayoutLocked(message);
+ break;
+ case "syncLayout":
+ handleSyncLayout(message);
+ break;
+ }
+ }
+
+ private function handleGetCurrentLayoutEvtMsg(message:Object):void {
+ _applyFirstLayoutTimer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent):void {
+ onReceivedFirstLayout(message.body);
+ });
+ _applyFirstLayoutTimer.start();
+ }
+
+ private function handleBroadcastLayoutEvtMsg(message:Object):void {
+ if (message.body.hasOwnProperty("locked") && message.body.hasOwnProperty("setById"))
+ lockLayout(message.body.locked, message.body.setById);
+ }
+
+ private function handleLockLayoutEvtMsg(message:Object):void {
+ _dispatcher.dispatchEvent(new RemoteSyncLayoutEvent(message.body.layout));
+ if (message.body.layout == "")
+ return;
+
+ var layoutDefinition:LayoutDefinition = new LayoutDefinition();
+ layoutDefinition.load(new XML(message.body.layout));
+ var translatedName:String = ResourceUtil.getInstance().getString(layoutDefinition.name)
+ if (translatedName == "undefined")
+ translatedName = layoutDefinition.name;
+ // remove previously added [Remote] mark
+ var pattern:RegExp = /^\[.*\] /g;
+ translatedName = translatedName.replace(pattern, "");
+ layoutDefinition.name = "[" + ResourceUtil.getInstance().getString('bbb.layout.combo.remote') + "] " + translatedName;
+ var redefineLayout:LayoutFromRemoteEvent = new LayoutFromRemoteEvent();
+ redefineLayout.layout = layoutDefinition;
+ redefineLayout.remote = true;
+
+ _dispatcher.dispatchEvent(redefineLayout);
+ }
+
+ /*
+ * the application of the first layout should be delayed to avoid
+ * strange movements of the windows before set the correct position
+ * TDJ: increasing from 750 to 1000 because in some computers the initial layout was not applying correctly
+ */
+ private var _applyFirstLayoutTimer:Timer = new Timer(1000, 1);
+
+ private function handleGetCurrentLayoutResponse(message:Object):void {
+ _applyFirstLayoutTimer.addEventListener(TimerEvent.TIMER, function(e:TimerEvent):void {
+ onReceivedFirstLayout(message);
+ });
+ _applyFirstLayoutTimer.start();
+ }
+
+ private function onReceivedFirstLayout(message:Object):void {
+ LOGGER.debug("LayoutService: handling the first layout. locked = [{0}] layout = [{1}]", [message.locked, message.layoutId]);
+ trace("LayoutService: handling the first layout. locked = [" + message.locked + "] layout = [" + message.layoutId + "], moderator = [" + UsersUtil.amIModerator() + "]");
+ if (message.layoutId == "")
+ _dispatcher.dispatchEvent(new LayoutEvent(LayoutEvent.APPLY_DEFAULT_LAYOUT_EVENT));
+ else {
+ handleSyncLayout(message);
+ }
+
+ handleLayoutLocked(message);
+ _dispatcher.dispatchEvent(new ModuleLoadEvent(ModuleLoadEvent.LAYOUT_MODULE_STARTED));
+ }
+
+ private function handleSyncLayout(message:Object):void {
+ _dispatcher.dispatchEvent(new RemoteSyncLayoutEvent(message.layoutId));
+ if (message.layoutId == "")
+ return;
+
+ var layoutDefinition:LayoutDefinition = new LayoutDefinition();
+ layoutDefinition.load(new XML(message.layoutId));
+ var translatedName:String = ResourceUtil.getInstance().getString(layoutDefinition.name)
+ if (translatedName == "undefined")
+ translatedName = layoutDefinition.name;
+ // remove previously added [Remote] mark
+ var pattern:RegExp = /^\[.*\] /g;
+ translatedName = translatedName.replace(pattern, "");
+ layoutDefinition.name = "[" + ResourceUtil.getInstance().getString('bbb.layout.combo.remote') + "] " + translatedName;
+ var redefineLayout:LayoutFromRemoteEvent = new LayoutFromRemoteEvent();
+ redefineLayout.layout = layoutDefinition;
+ redefineLayout.remote = true;
+
+ _dispatcher.dispatchEvent(redefineLayout);
+ }
+
+ private function handleLayoutLocked(message:Object):void {
+ if (message.hasOwnProperty("locked") && message.hasOwnProperty("setById"))
+ lockLayout(message.locked, message.setById);
+ }
+
+ private function lockLayout(locked:Boolean, setById:String):void {
+ LOGGER.debug("LayoutService: received locked layout message. locked = [{0}] by= [{1}]", [locked, setById]);
+ _dispatcher.dispatchEvent(new LayoutLockedEvent(locked, setById));
+ }
+ }
}
+
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageSender.as b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageSender.as
index 2ab805dbd3..e474cf3bd8 100644
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageSender.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/services/MessageSender.as
@@ -1,62 +1,60 @@
-package org.bigbluebutton.modules.layout.services
-{
- import org.as3commons.logging.api.ILogger;
- import org.as3commons.logging.api.getClassLogger;
- import org.bigbluebutton.core.BBB;
- import org.bigbluebutton.core.managers.ConnectionManager;
- import org.bigbluebutton.modules.layout.model.LayoutDefinition;
+package org.bigbluebutton.modules.layout.services {
+ import org.as3commons.logging.api.ILogger;
+ import org.as3commons.logging.api.getClassLogger;
+ import org.bigbluebutton.core.BBB;
+ import org.bigbluebutton.core.UsersUtil;
+ import org.bigbluebutton.core.connection.messages.layout.BroadcastLayoutMsg;
+ import org.bigbluebutton.core.connection.messages.layout.BroadcastLayoutMsgBody;
+ import org.bigbluebutton.core.connection.messages.layout.GetCurrentLayoutMsg;
+ import org.bigbluebutton.core.connection.messages.layout.GetCurrentLayoutMsgBody;
+ import org.bigbluebutton.core.connection.messages.layout.LockLayoutMsg;
+ import org.bigbluebutton.core.connection.messages.layout.LockLayoutMsgBody;
+ import org.bigbluebutton.core.managers.ConnectionManager;
+ import org.bigbluebutton.modules.layout.model.LayoutDefinition;
- public class MessageSender
- {
- private static const LOGGER:ILogger = getClassLogger(MessageSender);
-
- public function getCurrentLayout():void {
- var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("layout.getCurrentLayout",
- function(result:String):void { // On successful result
- LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- }
- );
- }
-
- public function broadcastLayout(layout:LayoutDefinition):void {
- LOGGER.debug("broadcast layout");
- var message:Object = new Object();
- message["layout"] = layout.toXml().toXMLString();
-
- var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("layout.broadcast",
- function(result:String):void { // On successful result
- LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- },
- message
- );
- }
-
- public function lockLayout(lock:Boolean, viewersOnly:Boolean, layout:LayoutDefinition=null):void {
- LOGGER.debug("lock layout");
- var message:Object = new Object();
- message["lock"] = lock;
- message["viewersOnly"] = viewersOnly;
- if (layout != null)
- message["layout"] = layout.toXml().toXMLString();
-
- var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("layout.lock",
- function(result:String):void { // On successful result
- LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- },
- message
- );
- }
- }
-}
\ No newline at end of file
+ public class MessageSender {
+ private static const LOGGER:ILogger = getClassLogger(MessageSender);
+
+ public function getCurrentLayout():void {
+ var body:GetCurrentLayoutMsgBody = new GetCurrentLayoutMsgBody(UsersUtil.getInternalMeetingID(), UsersUtil.getMyUserID());
+ var message:GetCurrentLayoutMsg = new GetCurrentLayoutMsg(body);
+
+ var _nc:ConnectionManager = BBB.initConnectionManager();
+ _nc.sendMessage2x(function(result:String):void { // On successful result
+ }, function(status:String):void { // status - On error occurred
+ var logData:Object = UsersUtil.initLogData();
+ logData.tags = ["apps"];
+ logData.message = "Error occured requesting current layout.";
+ LOGGER.info(JSON.stringify(logData));
+ }, JSON.stringify(message));
+ }
+
+ public function broadcastLayout(layout:LayoutDefinition):void {
+ var body:BroadcastLayoutMsgBody = new BroadcastLayoutMsgBody(UsersUtil.getInternalMeetingID(), UsersUtil.getMyUserID(), layout.toXml().toXMLString());
+ var message:BroadcastLayoutMsg = new BroadcastLayoutMsg(body);
+
+ var _nc:ConnectionManager = BBB.initConnectionManager();
+ _nc.sendMessage2x(function(result:String):void { // On successful result
+ }, function(status:String):void { // status - On error occurred
+ var logData:Object = UsersUtil.initLogData();
+ logData.tags = ["apps"];
+ logData.message = "Error occured broadcasting layout.";
+ LOGGER.info(JSON.stringify(logData));
+ }, JSON.stringify(message));
+ }
+
+ public function lockLayout(lock:Boolean, viewersOnly:Boolean, layout:LayoutDefinition = null):void {
+ var body:LockLayoutMsgBody = new LockLayoutMsgBody(UsersUtil.getInternalMeetingID(), UsersUtil.getMyUserID(), lock, viewersOnly, layout != null ? layout.toXml().toXMLString() : null);
+ var message:LockLayoutMsg = new LockLayoutMsg(body);
+
+ var _nc:ConnectionManager = BBB.initConnectionManager();
+ _nc.sendMessage2x(function(result:String):void { // On successful result
+ }, function(status:String):void { // status - On error occurred
+ var logData:Object = UsersUtil.initLogData();
+ logData.tags = ["apps"];
+ logData.message = "Error occured locking layout.";
+ LOGGER.info(JSON.stringify(logData));
+ }, JSON.stringify(message));
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml
index 0e51761b59..f630449bd7 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml
@@ -38,24 +38,22 @@ with BigBlueButton; if not, see .
.
}
private function lockSettingsChanged(e:LockControlEvent):void {
- var conference:Conference = UserManager.getInstance().getConference();
- var thisUser:BBBUser = conference.getMyUser();
- this.enabled = ! thisUser.lockedLayout;
+ this.enabled = ! LiveMeeting.inst().me.lockedLayout;
}
private function populateLayoutsList(e:LayoutsReadyEvent):void {
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml
index f2f10df024..a7bf52df66 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/views/components/ToolbarButton.mxml
@@ -40,17 +40,13 @@ with BigBlueButton; if not, see .
.
}
private function get disableMyMic():Boolean {
- var conference:Conference = UserManager.getInstance().getConference();
- var thisUser:BBBUser = conference.getMyUser();
-
- return thisUser.disableMyMic;
+ return LiveMeeting.inst().me.disableMyMic;
}
private function get defaultListenOnlyMode():Boolean {
@@ -118,8 +111,6 @@ with BigBlueButton; if not, see .
}
private function joinAudio():void {
- var conference:Conference = UserManager.getInstance().getConference();
- var thisUser:BBBUser = conference.getMyUser();
if (phoneOptions.skipCheck || disableMyMic || defaultListenOnlyMode) {
var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
@@ -137,15 +128,14 @@ with BigBlueButton; if not, see .
}
private function onCreationComplete():void {
- var conference:Conference = UserManager.getInstance().getConference();
- var thisUser:BBBUser = conference.getMyUser();
+
phoneOptions = Options.getOptions(PhoneOptions) as PhoneOptions;
// when the button is added to the stage display the audio selection window if auto join is true
if (phoneOptions.autoJoin) {
- if (phoneOptions.skipCheck || thisUser.disableMyMic) {
+ if (phoneOptions.skipCheck || LiveMeeting.inst().me.disableMyMic) {
var command:JoinVoiceConferenceCommand = new JoinVoiceConferenceCommand();
- if (thisUser.disableMyMic) {
+ if (LiveMeeting.inst().me.disableMyMic) {
command.mic = false;
} else {
command.mic = true;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as
index 4e2e3b500f..469631cac5 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/business/PresentProxy.as
@@ -21,8 +21,8 @@ package org.bigbluebutton.modules.present.business
import com.asfusion.mate.events.Dispatcher;
import flash.events.TimerEvent;
- import flash.net.navigateToURL;
import flash.net.URLRequest;
+ import flash.net.navigateToURL;
import flash.utils.Timer;
import mx.collections.ArrayCollection;
@@ -45,6 +45,7 @@ package org.bigbluebutton.modules.present.business
import org.bigbluebutton.modules.present.model.Presentation;
import org.bigbluebutton.modules.present.model.PresentationModel;
import org.bigbluebutton.modules.present.services.PresentationService;
+ import org.bigbluebutton.modules.present.services.messages.PageChangeVO;
import org.bigbluebutton.modules.present.services.messaging.MessageReceiver;
import org.bigbluebutton.modules.present.services.messaging.MessageSender;
@@ -105,34 +106,37 @@ package org.bigbluebutton.modules.present.business
public function handleChangePresentationCommand(cmd:ChangePresentationCommand):void {
var pres:Presentation = PresentationModel.getInstance().getPresentation(cmd.presId);
if (pres != null) {
- sender.sharePresentation(true, pres.id);
+ sender.sharePresentation(pres.id);
}
}
+
public function handleGoToPageCommand(cmd:GoToPageCommand):void {
- var page:Page = PresentationModel.getInstance().getPage(cmd.pageId);
- if (page != null) {
- sender.goToPage(page.id);
+ var pageChangeVO:PageChangeVO = PresentationModel.getInstance().getSpecificPageIds(cmd.pageId);
+ if (pageChangeVO != null) {
+ LOGGER.debug("Going to page[{0}] from presentation[{1}]", [pageChangeVO.pageId, pageChangeVO.presentationId]);
+ sender.goToPage(pageChangeVO.presentationId, pageChangeVO.pageId);
+ } else {
+ LOGGER.debug("Could not go to selected page. Might not exist or is already current");
}
}
public function handleGoToPreviousPageCommand(cmd:GoToPrevPageCommand):void {
- var page:Page = PresentationModel.getInstance().getPrevPage(cmd.curPageId);
- if (page != null) {
- LOGGER.debug("Going to prev page[{0}] from page[{1}]", [page.id, cmd.curPageId]);
- sender.goToPage(page.id);
+ var pageChangeVO:PageChangeVO = PresentationModel.getInstance().getPrevPageIds();
+ if (pageChangeVO != null) {
+ LOGGER.debug("Going to prev page[{0}] from presentation[{1}]", [pageChangeVO.pageId, pageChangeVO.presentationId]);
+ sender.goToPage(pageChangeVO.presentationId, pageChangeVO.pageId);
} else {
- LOGGER.debug("Could not find pervious page. Current page [{0}]", [cmd.curPageId]);
+ LOGGER.debug("Could not find previous page to change to");
}
}
public function handleGoToNextPageCommand(cmd:GoToNextPageCommand):void {
- LOGGER.debug("Go to next page. Current page [{0}]", [cmd.curPageId]);
- var page:Page = PresentationModel.getInstance().getNextPage(cmd.curPageId);
- if (page != null) {
- LOGGER.debug("Going to next page[{0}] from page[{1}]", [page.id, cmd.curPageId]);
- sender.goToPage(page.id);
+ var pageChangeVO:PageChangeVO = PresentationModel.getInstance().getNextPageIds();
+ if (pageChangeVO != null) {
+ LOGGER.debug("Going to prev page[{0}] from presentation[{1}]", [pageChangeVO.pageId, pageChangeVO.presentationId]);
+ sender.goToPage(pageChangeVO.presentationId, pageChangeVO.pageId);
} else {
- LOGGER.debug("Could not find next page. Current page [{0}]", [cmd.curPageId]);
+ LOGGER.debug("Could not find previous page to change to");
}
}
@@ -162,15 +166,6 @@ package org.bigbluebutton.modules.present.business
var req:URLRequest = new URLRequest(downloadUri);
navigateToURL(req,"_blank");
}
-
- /**
- * To to the specified slide
- * @param e - The event which holds the slide number
- *
- */
- public function gotoSlide(e:PresenterCommands):void{
- // sender.gotoSlide(e.slideNumber);
- }
/**
* Loads a presentation from the server. creates a new PresentationService class
@@ -196,38 +191,25 @@ package org.bigbluebutton.modules.present.business
*
*/
public function sharePresentation(e:PresenterCommands):void{
-
- sender.sharePresentation(e.share, e.presentationName);
-
- var timer:Timer = new Timer(3000, 1);
- timer.addEventListener(TimerEvent.TIMER, sendViewerNotify);
- timer.start();
+ sender.sharePresentation(e.presentationName);
}
public function removePresentation(e:RemovePresentationEvent):void {
sender.removePresentation(e.presentationName);
}
- private function sendViewerNotify(e:TimerEvent):void{
-// sender.gotoSlide(0);
- }
-
- /**
- * Move the slide within the presentation window
- * @param e
- *
- */
- public function moveSlide(e:PresenterCommands):void{
- sender.move(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio);
- }
-
/**
* Zoom the slide within the presentation window
* @param e
*
*/
public function zoomSlide(e:PresenterCommands):void{
- sender.move(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio);
+ var currentPresentation:Presentation = PresentationModel.getInstance().getCurrentPresentation();
+ if (currentPresentation == null) return;
+
+ var currentPage:Page = PresentationModel.getInstance().getCurrentPage();
+
+ sender.move(currentPresentation.id, currentPage.id, e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio);
}
}
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToNextPageCommand.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToNextPageCommand.as
index eb6e363bf7..5137f26bda 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToNextPageCommand.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToNextPageCommand.as
@@ -6,12 +6,9 @@ package org.bigbluebutton.modules.present.commands
{
public static const GO_TO_NEXT_PAGE:String = "presentation go to next page";
- public var curPageId: String;
-
- public function GoToNextPageCommand(curPageId: String)
+ public function GoToNextPageCommand()
{
super(GO_TO_NEXT_PAGE, true, false);
- this.curPageId = curPageId;
}
}
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToPrevPageCommand.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToPrevPageCommand.as
index 65bc07b0c9..f793622e25 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToPrevPageCommand.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/commands/GoToPrevPageCommand.as
@@ -6,12 +6,9 @@ package org.bigbluebutton.modules.present.commands
{
public static const GO_TO_PREV_PAGE:String = "presentation go to previous page";
- public var curPageId:String;
-
- public function GoToPrevPageCommand(curPageId: String)
+ public function GoToPrevPageCommand()
{
super(GO_TO_PREV_PAGE, true, false);
- this.curPageId = curPageId;
}
}
}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PresenterCommands.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PresenterCommands.as
index c8df6ffa38..695ecd98de 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PresenterCommands.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/events/PresenterCommands.as
@@ -31,19 +31,11 @@ package org.bigbluebutton.modules.present.events
public static const GOTO_SLIDE:String = "GOTO_SLIDE_COMMAND";
public static const ZOOM:String = "ZOOM_COMMAND";
public static const RESIZE:String = "RESIZE_COMMAND";
- public static const RESET_ZOOM:String = "RESTORE_ZOOM";
- public static const MOVE:String = "MOVE_COMMAND";
public static const SHARE_PRESENTATION_COMMAND:String = "SHARE_PRESENTATION_COMMAND";
//Parameter for the slide navigation events
public var slideNumber:Number;
- //Parameters for the zoom event
- public var zoomPercentage:Number;
-
- //Parameters for the resize event
- public var newSizeInPercent:Number;
-
//Parameters for the move event
public var xOffset:Number;
public var yOffset:Number;
@@ -53,7 +45,6 @@ package org.bigbluebutton.modules.present.events
//Parameters for the share event
public var presentationName:String;
- public var share:Boolean;
public function PresenterCommands(type:String, slideNumber:Number = 0)
{
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml
index a2ed75fc6c..1573b6b30d 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/maps/PresentEventMap.mxml
@@ -51,6 +51,7 @@ with BigBlueButton; if not, see .
+
@@ -90,18 +91,10 @@ with BigBlueButton; if not, see .
-
-
-
-
-
-
-
-
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as
index c3d0aa623c..af399e6694 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presentation.as
@@ -64,6 +64,17 @@ package org.bigbluebutton.modules.present.model
return null;
}
+ public function getPageByNum(pageNum:int):Page {
+ for (var i: int = 0; i < _pages.length; i++) {
+ var p: Page = _pages.getItemAt(i) as Page;
+ if (p.num == pageNum) {
+ return p;
+ }
+ }
+
+ return null;
+ }
+
public function getPages():ArrayCollection {
var pages:ArrayCollection = new ArrayCollection();
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as
index 5a138d44b4..6edcf85ab8 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/PresentationModel.as
@@ -4,6 +4,7 @@ package org.bigbluebutton.modules.present.model
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
+ import org.bigbluebutton.modules.present.services.messages.PageChangeVO;
public class PresentationModel
{
@@ -11,8 +12,7 @@ package org.bigbluebutton.modules.present.model
private static var instance:PresentationModel = null;
- private var _presentations:ArrayCollection = new ArrayCollection();
- private var _presenter: Presenter;
+ private var _presentations:ArrayCollection = new ArrayCollection();
/**
* This class is a singleton. Please initialize it using the getInstance() method.
@@ -39,14 +39,6 @@ package org.bigbluebutton.modules.present.model
return instance;
}
- public function setPresenter(p: Presenter):void {
- _presenter = p;
- }
-
- public function getPresenter():Presenter {
- return _presenter;
- }
-
public function addPresentation(p: Presentation):void {
_presentations.addItem(p);
}
@@ -67,14 +59,6 @@ package org.bigbluebutton.modules.present.model
_presentations.removeAll();
}
- public function replacePresentation(p: Presentation):void {
- var oldPres:Presentation = removePresentation(p.id);
- if (oldPres == null) {
- LOGGER.debug("Could not find presentation [{0}] to remove.", [p.id]);
- }
- addPresentation(p);
- }
-
public function getCurrentPresentationName():String {
for (var i:int = 0; i < _presentations.length; i++) {
var pres: Presentation = _presentations.getItemAt(i) as Presentation;
@@ -124,39 +108,53 @@ package org.bigbluebutton.modules.present.model
return null;
}
- public function getNextPage(id:String):Page {
- var ids:Array = id.split("/");
- if (ids.length > 1) {
- var presId:String = ids[0];
- var pageNum:int = int(ids[1]);
- LOGGER.debug("page id [{0}] ids= [{1},{2}] {3}", [id, presId, pageNum, ids[1]]);
- var pres:Presentation = getPresentation(presId);
- var nextPage:int = pageNum + 1;
- LOGGER.debug("Next page [{0}/{1}]", [presId, nextPage]);
- if (pres != null) {
- return pres.getPage(presId + "/" + nextPage);
- }
+ public function getNextPageIds():PageChangeVO {
+ var curPres:Presentation = getCurrentPresentation();
+ if (curPres != null) {
+ var curPage:Page = curPres.getCurrentPage();
+ if (curPage != null) {
+ LOGGER.debug("page id [{0}], pres id [{1}], page num [{2}]", [curPage.id, curPres.id, curPage.num]);
+ var nextNum:int = curPage.num + 1;
+ LOGGER.debug("Next page [{0}/{1}]", [curPres.id, nextNum]);
+ var nextPage:Page = curPres.getPageByNum(nextNum);
+ if (nextPage != null) {
+ return new PageChangeVO(curPres.id, nextPage.id);
+ }
+ }
}
- return null;
+ return null;
}
- public function getPrevPage(id:String):Page {
- var ids:Array = id.split("/");
- if (ids.length > 1) {
- var presId:String = ids[0];
- var pageNum:int = int(ids[1]);
- LOGGER.debug("page id [{0}] ids= [{1},{2}] {3}", [id, presId, pageNum, ids[1]]);
- var pres:Presentation = getPresentation(presId);
- var prevPage:int = pageNum - 1;
- LOGGER.debug("Prev page [{0}/{1}]", [presId, prevPage]);
- if (pres != null) {
- return pres.getPage(presId + "/" + prevPage);
- }
-
+ public function getPrevPageIds():PageChangeVO {
+ var curPres:Presentation = getCurrentPresentation();
+ if (curPres != null) {
+ var curPage:Page = curPres.getCurrentPage();
+ if (curPage != null) {
+ LOGGER.debug("page id [{0}], pres id [{1}], page num [{2}]", [curPage.id, curPres.id, curPage.num]);
+ var prevNum:int = curPage.num - 1;
+ LOGGER.debug("Prev page [{0}/{1}]", [curPres.id, prevNum]);
+ var prevPage:Page = curPres.getPageByNum(prevNum);
+ if (prevPage != null) {
+ return new PageChangeVO(curPres.id, prevPage.id);
+ }
+ }
}
- return null;
+ return null;
+ }
+
+ public function getSpecificPageIds(pageId:String):PageChangeVO {
+ var curPres:Presentation = getCurrentPresentation();
+ if (curPres != null) {
+ var newPage:Page = curPres.getPage(pageId);
+ if (newPage != null && !newPage.current) {
+ LOGGER.debug("page id [{0}], pres id [{1}], page num [{2}]", [newPage.id, curPres.id, newPage.num]);
+ return new PageChangeVO(curPres.id, newPage.id);
+ }
+ }
+
+ return null;
}
public function getPage(id: String):Page {
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presenter.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presenter.as
deleted file mode 100755
index d154d6047a..0000000000
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/model/Presenter.as
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.bigbluebutton.modules.present.model
-{
- public class Presenter
- {
- public var userId: String;
- public var name: String;
- public var assignedBy: String;
-
- public function Presenter(userId: String, name: String, assignedBy: String)
- {
- this.userId = userId;
- this.name = name;
- this.assignedBy = assignedBy;
- }
- }
-}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as
index 29e43eab75..3ff41d7ecd 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/PresentationService.as
@@ -4,6 +4,8 @@ package org.bigbluebutton.modules.present.services
import mx.collections.ArrayCollection;
+ import org.as3commons.logging.api.ILogger;
+ import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.modules.present.commands.ChangePageCommand;
import org.bigbluebutton.modules.present.events.PageChangedEvent;
import org.bigbluebutton.modules.present.events.PresentationChangedEvent;
@@ -16,8 +18,6 @@ package org.bigbluebutton.modules.present.services
import org.bigbluebutton.modules.present.services.messages.PresentationVO;
import org.bigbluebutton.modules.present.services.messaging.MessageReceiver;
import org.bigbluebutton.modules.present.services.messaging.MessageSender;
- import org.as3commons.logging.api.getClassLogger;
- import org.as3commons.logging.api.ILogger;
public class PresentationService
{
@@ -34,31 +34,26 @@ package org.bigbluebutton.modules.present.services
dispatcher = new Dispatcher();
}
- public function pageChanged(page: PageVO):void {
- var np: Page = model.getPage(page.id);
+ public function pageChanged(pageId:String):void {
+ var np: Page = model.getPage(pageId);
if (np != null) {
var oldPage: Page = PresentationModel.getInstance().getCurrentPage();
if (oldPage != null) oldPage.current = false;
- np.current = page.current;
- np.xOffset = page.xOffset;
- np.yOffset = page.yOffset;
- np.widthRatio = page.widthRatio;
- np.heightRatio = page.heightRatio;
+ np.current = true
// trace(LOG + "Sending page changed event. page [" + np.id + "] oldpage current=[" + oldPage.current + "] newPage current=[" + np.current + "]");
var changePageCommand: ChangePageCommand = new ChangePageCommand(np.id, NUM_PRELOAD);
dispatcher.dispatchEvent(changePageCommand);
}
}
- public function pageMoved(page: PageVO):void {
- var np: Page = model.getPage(page.id);
+ public function pageMoved(pageId:String, xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void {
+ var np: Page = model.getPage(pageId);
if (np != null) {
- np.current = page.current;
- np.xOffset = page.xOffset;
- np.yOffset = page.yOffset;
- np.widthRatio = page.widthRatio;
- np.heightRatio = page.heightRatio;
+ np.xOffset = xOffset;
+ np.yOffset = yOffset;
+ np.widthRatio = widthRatio;
+ np.heightRatio = heightRatio;
// trace(LOG + "Sending page moved event. page [" + np.id + "] current=[" + np.current + "]");
var event: PageChangedEvent = new PageChangedEvent(np.id);
dispatcher.dispatchEvent(event);
@@ -90,19 +85,19 @@ package org.bigbluebutton.modules.present.services
var event: PresentationChangedEvent = new PresentationChangedEvent(pres.id);
dispatcher.dispatchEvent(event);
- var curPage:Page = PresentationModel.getInstance().getCurrentPage();
+ var curPage:Page = presentation.getCurrentPage();
if (curPage != null) {
var changePageCommand: ChangePageCommand = new ChangePageCommand(curPage.id, NUM_PRELOAD);
dispatcher.dispatchEvent(changePageCommand);
- LOGGER.debug("Sending page moved event to position page [{0}] current=[{1}]", [curPage.id, curPage.current]);
+ LOGGER.debug("Sending page moved event to position page [{0}] current=[{1}]", [curPage.id, curPage.current]);
var pageChangedEvent: PageChangedEvent = new PageChangedEvent(curPage.id);
dispatcher.dispatchEvent(pageChangedEvent);
}
}
}
- public function presentationVOToPresentation(presVO:PresentationVO):Presentation {
+ private function presentationVOToPresentation(presVO:PresentationVO):Presentation {
var presoPages:ArrayCollection = new ArrayCollection();
var pages:ArrayCollection = presVO.getPages() as ArrayCollection;
for (var k:int = 0; k < pages.length; k++) {
@@ -115,7 +110,7 @@ package org.bigbluebutton.modules.present.services
return presentation;
}
- public function changePresentation(presVO: PresentationVO):void {
+ public function changeCurrentPresentation(presentationId:String):void {
// We've switched presentations. Mark the old presentation as not current.
var curPres:Presentation = PresentationModel.getInstance().getCurrentPresentation();
if (curPres != null) {
@@ -123,30 +118,29 @@ package org.bigbluebutton.modules.present.services
} else {
LOGGER.debug("No previous active presentation.");
}
-
- if (presVO.isCurrent()) {
- LOGGER.debug("Making presentation [{0}] the active presentation.", [presVO.id]);
- var newPres:Presentation = presentationVOToPresentation(presVO);
- PresentationModel.getInstance().replacePresentation(newPres);
+
+ var newPres:Presentation = PresentationModel.getInstance().getPresentation(presentationId);
+ if (newPres != null) {
+ LOGGER.debug("Making presentation [{0}] the active presentation.", [presentationId]);
+ newPres.current = true;
- var event: PresentationChangedEvent = new PresentationChangedEvent(presVO.id);
+ var event: PresentationChangedEvent = new PresentationChangedEvent(presentationId);
dispatcher.dispatchEvent(event);
var curPage:Page = PresentationModel.getInstance().getCurrentPage();
if (curPage != null) {
var changePageCommand: ChangePageCommand = new ChangePageCommand(curPage.id, NUM_PRELOAD);
- dispatcher.dispatchEvent(changePageCommand);
-
- }
+ dispatcher.dispatchEvent(changePageCommand);
+ }
} else {
- LOGGER.debug("Switching presentation but presentation [{0}] is not current [{0}]", [presVO.id, presVO.isCurrent()]);
+ LOGGER.debug("Could not find presentation to make current. id="+presentationId);
}
}
public function removeAllPresentations():void {
model.removeAllPresentations();
}
-
+
public function removePresentation(presentationID:String):void {
var removedEvent:RemovePresentationEvent = new RemovePresentationEvent(RemovePresentationEvent.PRESENTATION_REMOVED_EVENT);
removedEvent.presentationName = presentationID;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messages/CursorMovedMessage.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messages/CursorMovedMessage.as
deleted file mode 100755
index dc1c7ad415..0000000000
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messages/CursorMovedMessage.as
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.bigbluebutton.modules.present.services.messages
-{
- public class CursorMovedMessage
- {
- public var x:Number;
- public var y:Number;
-
- public function CursorMovedMessage(x: Number, y:Number)
- {
- this.x = x;
- this.y = y;
- }
- }
-}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messages/PageChangeVO.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messages/PageChangeVO.as
new file mode 100755
index 0000000000..eb514a1700
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messages/PageChangeVO.as
@@ -0,0 +1,11 @@
+package org.bigbluebutton.modules.present.services.messages {
+ public class PageChangeVO {
+ public var presentationId:String;
+ public var pageId:String;
+
+ public function PageChangeVO(presentationId:String, pageId:String) {
+ this.presentationId = presentationId;
+ this.pageId = pageId;
+ }
+ }
+}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as
index 379d6d95ed..6efd2ba4c6 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageReceiver.as
@@ -36,16 +36,13 @@ package org.bigbluebutton.modules.present.services.messaging
import org.bigbluebutton.modules.present.events.OfficeDocConvertFailedEvent;
import org.bigbluebutton.modules.present.events.OfficeDocConvertInvalidEvent;
import org.bigbluebutton.modules.present.events.OfficeDocConvertSuccessEvent;
- import org.bigbluebutton.modules.present.events.UploadEvent;
- import org.bigbluebutton.modules.present.model.PresentationModel;
- import org.bigbluebutton.modules.present.model.Presenter;
import org.bigbluebutton.modules.present.services.Constants;
import org.bigbluebutton.modules.present.services.PresentationService;
import org.bigbluebutton.modules.present.services.messages.PageVO;
import org.bigbluebutton.modules.present.services.messages.PresentationVO;
public class MessageReceiver implements IMessageListener {
- private static const LOGGER:ILogger = getClassLogger(MessageReceiver);
+ private static const LOGGER:ILogger = getClassLogger(MessageReceiver);
private var service:PresentationService;
private var dispatcher:Dispatcher;
@@ -60,56 +57,44 @@ package org.bigbluebutton.modules.present.services.messaging
//LOGGER.info("Presentation: received message " + messageName);
switch (messageName) {
- case "goToSlideCallback":
- handleGotoSlideCallback(message);
- break;
- case "moveCallback":
- handleMoveCallback(message);
- break;
- case "sharePresentationCallback":
- handleSharePresentationCallback(message);
+ case "SetCurrentPageEvtMsg":
+ handleSetCurrentPageEvtMsg(message);
break;
- case "removePresentationCallback":
- handleRemovePresentationCallback(message);
+ case "ResizeAndMovePageEvtMsg":
+ handleResizeAndMovePageEvtMsg(message);
break;
- case "conversionCompletedUpdateMessageCallback":
- handleConversionCompletedUpdateMessageCallback(message);
+ case "SetCurrentPresentationEvtMsg":
+ handleSetCurrentPresentationEvtMsg(message);
break;
- case "generatedSlideUpdateMessageCallback":
- handleGeneratedSlideUpdateMessageCallback(message);
+ case "RemovePresentationEvtMsg":
+ handleRemovePresentationEvtMsg(message);
break;
- case "pageCountExceededUpdateMessageCallback":
- handlePageCountExceededUpdateMessageCallback(message);
+ case "PresentationConversionCompletedEvtMsg":
+ handlePresentationConversionCompletedEvtMsg(message);
break;
- case "conversionUpdateMessageCallback":
- handleConversionUpdateMessageCallback(message);
+ case "PresentationPageGeneratedEvtMsg":
+ handlePresentationPageGeneratedEvtMsg(message);
break;
- case "getPresentationInfoReply":
- handleGetPresentationInfoReply(message);
+ case "PresentationPageCountErrorEvtMsg":
+ handlePresentationPageCountErrorEvtMsg(message);
break;
- case "getSlideInfoReply":
- handleGetSlideInfoReply(message);
+ case "PresentationConversionUpdateEvtMsg":
+ handlePresentationConversionUpdateEvtMsg(message);
+ break;
+ case "GetPresentationInfoRespMsg":
+ handleGetPresentationInfoRespMsg(message);
break;
}
- }
-
- private function handleGetSlideInfoReply(msg:Object):void {
- LOGGER.debug("*** handleGetSlideInfoReply {0} [DISABLED: SHouldn't be getting this!!] **** \n", [msg.msg]);
-
}
- private function handleGotoSlideCallback(msg:Object) : void {
- var map:Object = JSON.parse(msg.msg);
-
- var page:PageVO = extractPage(map);
- service.pageChanged(page);
-
+ private function handleSetCurrentPageEvtMsg(msg:Object):void {
+ service.pageChanged(msg.body.pageId);
}
private function validatePage(map:Object):Boolean {
var missing:Array = new Array();
- if (! map.hasOwnProperty("id")) missing.push("Missing [id] param.");
+ if (! map.hasOwnProperty("id")) missing.push("Missing [id] param.");
if (! map.hasOwnProperty("num")) missing.push("Missing [num] param.");
if (! map.hasOwnProperty("current")) missing.push("Missing [current] param.");
if (! map.hasOwnProperty("swfUri")) missing.push("Missing [swfUri] param.");
@@ -139,8 +124,6 @@ package org.bigbluebutton.modules.present.services.messaging
private function extractPage(map:Object):PageVO {
- validatePage(map);
-
var page:PageVO = new PageVO();
page.id = map.id;
page.num = map.num;
@@ -152,49 +135,36 @@ package org.bigbluebutton.modules.present.services.messaging
page.xOffset = map.xOffset;
page.yOffset = map.yOffset;
page.widthRatio = map.widthRatio;
- page.heightRatio = map.heightRatio;
+ page.heightRatio = map.heightRatio;
return page;
}
- private function handleMoveCallback(msg:Object):void{
- var map:Object = JSON.parse(msg.msg);
- if (validatePage(map)) {
- service.pageMoved(extractPage(map));
- }
+ private function handleResizeAndMovePageEvtMsg(msg:Object):void {
+ service.pageMoved(msg.body.pageId, msg.body.xOffset, msg.body.yOffset, msg.body.widthRatio, msg.body.heightRatio);
}
- private function handleSharePresentationCallback(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
- if (map.hasOwnProperty("presentation")) {
- var pres:Object = map.presentation as Object;
- var presVO: PresentationVO = processUploadedPresentation(pres)
- service.changePresentation(presVO);
- }
+ private function handleSetCurrentPresentationEvtMsg(msg:Object):void {
+ service.changeCurrentPresentation(msg.body.presentationId);
}
- private function handleRemovePresentationCallback(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
-
- if(map.hasOwnProperty("presentationID")) {
- service.removePresentation(map.presentationID);
- }
+ private function handleRemovePresentationEvtMsg(msg:Object):void {
+ service.removePresentation(msg.body.presentationId);
}
- private function handleConversionCompletedUpdateMessageCallback(msg:Object) : void {
- var map:Object = JSON.parse(msg.msg);
- var pres:Object = map.presentation as Object;
- var presVO: PresentationVO = processUploadedPresentation(pres)
+ private function handlePresentationConversionCompletedEvtMsg(msg:Object):void {
+ var presVO: PresentationVO = processUploadedPresentation(msg.body.presentation);
+
+ LOGGER.debug("Adding presentation name=" + presVO.name);
service.addPresentation(presVO);
var uploadEvent:ConversionCompletedEvent = new ConversionCompletedEvent(presVO.id, presVO.name);
dispatcher.dispatchEvent(uploadEvent);
-
}
private function processUploadedPresentation(presentation:Object):PresentationVO {
- var presoPages:ArrayCollection = new ArrayCollection();
+ var presoPages:ArrayCollection = new ArrayCollection();
var pages:Array = presentation.pages as Array;
for (var k:int = 0; k < pages.length; k++) {
var page:Object = pages[k] as Object;
@@ -207,47 +177,38 @@ package org.bigbluebutton.modules.present.services.messaging
return preso;
}
- private function handleGeneratedSlideUpdateMessageCallback(msg:Object) : void {
- var map:Object = JSON.parse(msg.msg);
- var numPages:Number = map.numberOfPages;
- var pagesDone:Number = map.pagesCompleted;
-
- dispatcher.dispatchEvent(new ConversionUpdateEvent(numPages, pagesDone));
+ private function handlePresentationPageGeneratedEvtMsg(msg:Object):void {
+ dispatcher.dispatchEvent(new ConversionUpdateEvent(msg.body.numPages, msg.body.pagesDone));
}
- private function handlePageCountExceededUpdateMessageCallback(msg:Object) : void {
- LOGGER.debug("handlePageCountExceededUpdateMessageCallback " + JSON.stringify(msg.msg));
- var map:Object = JSON.parse(msg.msg);
- dispatcher.dispatchEvent(new ConversionPageCountMaxed(map.maxNumberPages as Number));
+ private function handlePresentationPageCountErrorEvtMsg(msg:Object):void {
+ LOGGER.debug("handlePageCountExceededUpdateMessageCallback " + msg);
+ dispatcher.dispatchEvent(new ConversionPageCountMaxed(msg.body.maxNumberPages as Number));
}
- private function handleConversionUpdateMessageCallback(msg:Object) : void {
- var map:Object = JSON.parse(msg.msg);
-
- var uploadEvent:UploadEvent;
-
- switch (map.messageKey) {
+ private function handlePresentationConversionUpdateEvtMsg(msg:Object):void {
+ switch (msg.body.messageKey) {
case Constants.OFFICE_DOC_CONVERSION_SUCCESS_KEY :
dispatcher.dispatchEvent(new OfficeDocConvertSuccessEvent());
break;
case Constants.OFFICE_DOC_CONVERSION_FAILED_KEY :
dispatcher.dispatchEvent(new OfficeDocConvertFailedEvent());
break;
- case Constants.OFFICE_DOC_CONVERSION_INVALID_KEY :
- dispatcher.dispatchEvent(new OfficeDocConvertInvalidEvent());
- break;
+ case Constants.OFFICE_DOC_CONVERSION_INVALID_KEY :
+ dispatcher.dispatchEvent(new OfficeDocConvertInvalidEvent());
+ break;
case Constants.SUPPORTED_DOCUMENT_KEY :
dispatcher.dispatchEvent(new ConversionSupportedDocEvent());
break;
case Constants.UNSUPPORTED_DOCUMENT_KEY :
dispatcher.dispatchEvent(new ConversionUnsupportedDocEvent());
break;
- case Constants.GENERATING_THUMBNAIL_KEY :
+ case Constants.GENERATING_THUMBNAIL_KEY :
dispatcher.dispatchEvent(new CreatingThumbnailsEvent());
- break;
+ break;
case Constants.PAGE_COUNT_FAILED_KEY :
dispatcher.dispatchEvent(new ConversionPageCountError());
- break;
+ break;
case Constants.GENERATED_THUMBNAIL_KEY :
break;
default:
@@ -255,25 +216,14 @@ package org.bigbluebutton.modules.present.services.messaging
}
}
-
- private function handleGetPresentationInfoReply(msg:Object) : void {
- LOGGER.debug("*** handleGetPresentationInfoReply " + msg.msg + " **** \n");
- var map:Object = JSON.parse(msg.msg);
-
- var presenterMap:Object = map.presenter as Object;
- if (presenterMap.hasOwnProperty("userId") && presenterMap.hasOwnProperty("name") &&
- presenterMap.hasOwnProperty("assignedBy")) {
-// trace(LOG + "Got presenter information");
- var presenter: Presenter = new Presenter(presenterMap.userId, presenterMap.name, presenterMap.assignedBy);
- PresentationModel.getInstance().setPresenter(presenter);
- }
-
+
+ private function handleGetPresentationInfoRespMsg(msg:Object):void {
// trace(LOG + "Getting presentations information");
var presos:ArrayCollection = new ArrayCollection();
- var presentations:Array = map.presentations as Array;
+ var presentations:Array = msg.body.presentations as Array;
for (var j:int = 0; j < presentations.length; j++) {
- var presentation:Object = presentations[j] as Object;
+ var presentation:Object = presentations[j] as Object;
// trace(LOG + "Processing presentation information");
var presVO: PresentationVO = processUploadedPresentation(presentation)
presos.addItem(presVO);
@@ -282,8 +232,5 @@ package org.bigbluebutton.modules.present.services.messaging
service.removeAllPresentations();
service.addPresentations(presos);
}
-
-
-
}
-}
\ No newline at end of file
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageSender.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageSender.as
index 6c09c2f9a1..4b4b42319d 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageSender.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/services/messaging/MessageSender.as
@@ -21,6 +21,7 @@ package org.bigbluebutton.modules.present.services.messaging
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
+ import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.managers.ConnectionManager;
public class MessageSender {
@@ -29,112 +30,75 @@ package org.bigbluebutton.modules.present.services.messaging
/**
* Sends an event to the server to update the clients with the new slide position
- * @param slideXPosition
- * @param slideYPosition
*
*/
- public function move(xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void{
- var message:Object = new Object();
- message["xOffset"] = xOffset;
- message["yOffset"] = yOffset;
- message["widthRatio"] = widthRatio;
- message["heightRatio"] = heightRatio;
+ public function move(presentationId:String, pageId:String, xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void{
+ var message:Object = {
+ header: {name: "ResizeAndMovePagePubMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
+ body: {presentationId: presentationId, pageId: pageId, xOffset: xOffset, yOffset: yOffset, widthRatio: widthRatio, heightRatio: heightRatio}
+ };
var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("presentation.resizeAndMoveSlide",
- function(result:String):void { // On successful result
- //LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- },
- message
- );
- }
-
- public function sharePresentation(share:Boolean, presentationID:String):void {
- var message:Object = new Object();
- message["presentationID"] = presentationID;
- message["share"] = share;
-
- var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("presentation.sharePresentation",
- function(result:String):void { // On successful result
- //LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- },
- message
+ _nc.sendMessage2x(
+ function(result:String):void { },
+ function(status:String):void { LOGGER.error(status); },
+ JSON.stringify(message)
);
}
- public function goToPage(id: String):void {
- var message:Object = new Object();
- message["page"] = id;
+ public function sharePresentation(presentationId:String):void {
+ var message:Object = {
+ header: {name: "SetCurrentPresentationPubMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
+ body: {presentationId: presentationId}
+ };
var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("presentation.gotoSlide",
- function(result:String):void { // On successful result
- //LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- },
- message
+ _nc.sendMessage2x(
+ function(result:String):void { },
+ function(status:String):void { LOGGER.error(status); },
+ JSON.stringify(message)
+ );
+ }
+
+ public function goToPage(presentationId: String, pageId: String):void {
+ var message:Object = {
+ header: {name: "SetCurrentPagePubMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
+ body: {presentationId: presentationId, pageId: pageId}
+ };
+
+ var _nc:ConnectionManager = BBB.initConnectionManager();
+ _nc.sendMessage2x(
+ function(result:String):void { },
+ function(status:String):void { LOGGER.error(status); },
+ JSON.stringify(message)
);
}
public function getPresentationInfo():void {
- var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("presentation.getPresentationInfo",
- function(result:String):void { // On successful result
- //LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- }
- );
+ var message:Object = {
+ header: {name: "GetPresentationInfoReqMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
+ body: {userId: UsersUtil.getMyUserID()}
+ };
- }
-
- public function removePresentation(name:String):void {
- var message:Object = new Object();
- message["presentationID"] = name;
-
var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("presentation.removePresentation",
- function(result:String):void { // On successful result
- //LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- },
- message
+ _nc.sendMessage2x(
+ function(result:String):void { },
+ function(status:String):void { LOGGER.error(status); },
+ JSON.stringify(message)
);
}
- public function clearPresentation() : void {
+ public function removePresentation(presentationId:String):void {
+ var message:Object = {
+ header: {name: "RemovePresentationPubMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
+ body: {presentationId: presentationId}
+ };
+
var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("presentation.clear",
- function(result:String):void { // On successful result
- //LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- }
- );
- }
-
- public function queryPresenterForSlideInfo():void {
- var _nc:ConnectionManager = BBB.initConnectionManager();
- _nc.sendMessage("presentation.getSlideInfo",
- function(result:String):void { // On successful result
- //LOGGER.debug(result);
- },
- function(status:String):void { // status - On error occurred
- LOGGER.error(status);
- }
+ _nc.sendMessage2x(
+ function(result:String):void { },
+ function(status:String):void { LOGGER.error(status); },
+ JSON.stringify(message)
);
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml
index 1b1674b001..c32f842d94 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml
@@ -331,12 +331,6 @@ with BigBlueButton; if not, see .
slideView.onZoomSlide(zoomSlider.value);
}
- private function dispatchResizeEvent(newSize:int):void {
- var presentEvent:PresenterCommands = new PresenterCommands(PresenterCommands.RESIZE);
- presentEvent.newSizeInPercent = newSize;
- dispatchEvent(presentEvent);
- }
-
private function onResetZoom():void {
slideView.onZoomSlide(100);
}
@@ -426,11 +420,11 @@ with BigBlueButton; if not, see .
var contextMenuItems:Array = new Array();
var nextButton:ContextMenuItem = new ContextMenuItem(ResourceUtil.getInstance().getString('bbb.presentation.forwardBtn.toolTip'));
- nextButton.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function(e:ContextMenuEvent):void { gotoNextSlide(); });
+ nextButton.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function(e:ContextMenuEvent):void { goToNextSlide(); });
contextMenuItems.push(nextButton);
var previousButton:ContextMenuItem = new ContextMenuItem(ResourceUtil.getInstance().getString('bbb.presentation.backBtn.toolTip'));
- previousButton.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function(e:ContextMenuEvent):void { gotoPreviousSlide(); });
+ previousButton.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function(e:ContextMenuEvent):void { goToPreviousSlide(); });
contextMenuItems.push(previousButton);
this.customContextMenuItems = contextMenuItems;
@@ -439,7 +433,6 @@ with BigBlueButton; if not, see .
private function notifyOthersOfSharingPresentation(presentationName:String):void {
var shareEvent:PresenterCommands = new PresenterCommands(PresenterCommands.SHARE_PRESENTATION_COMMAND);
shareEvent.presentationName = presentationName;
- shareEvent.share = true;
dispatchEvent(shareEvent);
}
@@ -478,24 +471,12 @@ with BigBlueButton; if not, see .
currentPresentation = ResourceUtil.getInstance().getString('bbb.presentation.title');
}
- private function gotoPreviousSlide():void {
- var curPage:Page = PresentationModel.getInstance().getCurrentPage();
- if (curPage != null) {
- LOGGER.debug("Go to previous page. Current page [{0}]", [curPage.id]);
- dispatchEvent(new GoToPrevPageCommand(curPage.id));
- } else {
- LOGGER.debug("Go to previous page. CanNOT find current page.");
- }
+ private function goToPreviousSlide():void {
+ dispatchEvent(new GoToPrevPageCommand());
}
- private function gotoNextSlide():void {
- var curPage:Page = PresentationModel.getInstance().getCurrentPage();
- if (curPage != null) {
- LOGGER.debug("Go to next page. Current page [{0}]", [curPage.id]);
- dispatchEvent(new GoToNextPageCommand(curPage.id));
- } else {
- LOGGER.debug("Go to next page. CanNOT find current page.");
- }
+ private function goToNextSlide():void {
+ dispatchEvent(new GoToNextPageCommand());
}
private function removeDecimalFromDataTip(val:String):String {
@@ -594,7 +575,7 @@ with BigBlueButton; if not, see .
private function remotePrevious(e:ShortcutEvent):void{
if (backButton.visible && backButton.enabled){
//backButton.setFocus();
- gotoPreviousSlide();
+ goToPreviousSlide();
}
}
@@ -608,7 +589,7 @@ with BigBlueButton; if not, see .
private function remoteNext(e:ShortcutEvent):void{
if (forwardButton.visible && forwardButton.enabled){
//forwardButton.setFocus();
- gotoNextSlide();
+ goToNextSlide();
}
}
@@ -1140,11 +1121,11 @@ with BigBlueButton; if not, see .
click="onUploadButtonClicked()"/>
+ toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.backBtn.toolTip')}" click="goToPreviousSlide()"/>
+ toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.forwardBtn.toolTip')}" click="goToNextSlide()"/>
.
import mx.collections.ArrayCollection;
import mx.collections.Sort;
import mx.collections.SortField;
- import mx.containers.Canvas;
-
+ import mx.containers.Canvas;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.modules.present.commands.GoToPageCommand;
@@ -145,14 +143,10 @@ with BigBlueButton; if not, see .
}
private function changeSlide():void {
- var data:Page = thumbnailView.selectedItem as Page;
- LOGGER.debug("Change page from thumbnail. Selected page [{0}]", [data.id]);
- var selPage:Page = PresentationModel.getInstance().getPage(data.id);
- if (selPage != null && !selPage.current) {
- LOGGER.debug("Dispatching change page from thumbnail. Selected page [{0}]", [data.id]);
- dispatchEvent(new GoToPageCommand(selPage.id));
- thumbnailView.visible = false;
- }
+ var data:Page = thumbnailView.selectedItem as Page;
+ LOGGER.debug("Change page from thumbnail. Selected page [{0}]", [data.id]);
+ dispatchEvent(new GoToPageCommand(data.id));
+ thumbnailView.visible = false;
}
private var prevMouseX:Number;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/WebRTCDeskshareManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/WebRTCDeskshareManager.as
index bc215154db..db2e75b9a2 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/WebRTCDeskshareManager.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/managers/WebRTCDeskshareManager.as
@@ -19,16 +19,13 @@
package org.bigbluebutton.modules.screenshare.managers
{
- import com.asfusion.mate.events.Dispatcher;
-
- import flash.external.ExternalInterface;
-
+ import com.asfusion.mate.events.Dispatcher;
+ import flash.external.ExternalInterface;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.modules.screenshare.events.DeskshareToolbarEvent;
import org.bigbluebutton.modules.screenshare.events.ShareStartedEvent;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as
index 9dc2c84f34..6007f804af 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as
@@ -22,13 +22,11 @@ package org.bigbluebutton.modules.sharednotes.maps
import com.asfusion.mate.events.Dispatcher;
import mx.binding.utils.BindingUtils;
- import mx.utils.ObjectUtil;
-
+ import mx.utils.ObjectUtil;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.events.CloseWindowEvent;
import org.bigbluebutton.common.events.OpenWindowEvent;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.modules.sharednotes.SharedNotesOptions;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersMainEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersMainEventMap.mxml
index f39b51bc19..da92f24879 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersMainEventMap.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersMainEventMap.mxml
@@ -33,7 +33,7 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.ResponseModeratorEvent;
- import org.bigbluebutton.main.events.SuccessfulLoginEvent;
+
import org.bigbluebutton.main.events.UserServicesEvent;
import org.bigbluebutton.main.model.GuestManager;
import org.bigbluebutton.main.model.users.UserService;
@@ -44,7 +44,7 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.main.model.users.events.EmojiStatusEvent;
import org.bigbluebutton.main.model.users.events.KickUserEvent;
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
- import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
+
]]>
@@ -66,9 +66,7 @@ with BigBlueButton; if not, see .
-
-
-
+
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
index ffea31e986..fdca07cc5e 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
@@ -29,40 +29,37 @@ package org.bigbluebutton.modules.users.services
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.CoreEvent;
- import org.bigbluebutton.core.events.VoiceConfEvent;
- import org.bigbluebutton.core.managers.UserManager;
+ import org.bigbluebutton.core.events.UserEmojiChangedEvent;
+ import org.bigbluebutton.core.events.UserStatusChangedEvent;
import org.bigbluebutton.core.model.LiveMeeting;
- import org.bigbluebutton.core.services.UsersService;
+ import org.bigbluebutton.core.model.MediaStream;
+ import org.bigbluebutton.core.model.users.User2x;
+ import org.bigbluebutton.core.model.users.VoiceUser2x;
import org.bigbluebutton.core.vo.LockSettingsVO;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.BreakoutRoomEvent;
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
- import org.bigbluebutton.main.events.PresenterStatusEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.events.UserJoinedEvent;
import org.bigbluebutton.main.events.UserLeftEvent;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.BreakoutRoom;
- import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.main.model.users.IMessageListener;
- import org.bigbluebutton.main.model.users.events.ChangeMyRole;
+ import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
import org.bigbluebutton.main.model.users.events.StreamStoppedEvent;
- import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
import org.bigbluebutton.modules.screenshare.events.WebRTCViewStreamEvent;
- import org.bigbluebutton.modules.users.events.MeetingMutedEvent;
+ import org.bigbluebutton.modules.users.events.MeetingMutedEvent;
public class MessageReceiver implements IMessageListener
{
private static const LOGGER:ILogger = getClassLogger(MessageReceiver);
private var dispatcher:Dispatcher;
- private var _conference:Conference;
+
public var onAllowedToJoin:Function = null;
private static var globalDispatcher:Dispatcher = new Dispatcher();
public function MessageReceiver() {
- _conference = UserManager.getInstance().getConference();
BBB.initConnectionManager().addMessageListener(this);
this.dispatcher = new Dispatcher();
}
@@ -71,17 +68,41 @@ package org.bigbluebutton.modules.users.services
LOGGER.debug(" received message " + messageName);
switch (messageName) {
+ case "GetUsersMeetingRespMsg":
+ handleGetUsersMeetingRespMsg(message);
+ break;
+ case "GetVoiceUsersMeetingRespMsg":
+ handleGetVoiceUsersMeetingRespMsg(message);
+ break;
+ case "GetWebcamStreamsMeetingRespMsg":
+ handleGetWebcamStreamsMeetingRespMsg(message);
+ break;
+ case "UserJoinedMeetingEvtMsg":
+ handleUserJoinedMeetingEvtMsg(message);
+ break;
+ case "UserLeftMeetingEvtMsg":
+ handleUserLeftMeetingEvtMsg(message);
+ break;
+ case "PresenterAssignedEvtMsg":
+ handleAssignPresenterCallback(message);
+ break;
case "UserBroadcastCamStartedEvtMsg":
handleUserBroadcastCamStartedEvtMsg(message);
break;
case "UserBroadcastCamStoppedEvtMsg":
handleUserBroadcastCamStoppedEvtMsg(message);
break;
- case "getUsersReply":
- handleGetUsersReply(message);
+ case "UserJoinedVoiceConfToClientEvtMsg":
+ handleUserJoinedVoiceConfToClientEvtMsg(message);
break;
- case "assignPresenterCallback":
- handleAssignPresenterCallback(message);
+ case "UserLeftVoiceConfToClientEvtMsg":
+ handleUserLeftVoiceConfToClientEvtMsg(message);
+ break;
+ case "UserTalkingEvtMsg":
+ handleUserTalkingEvtMsg(message);
+ break;
+ case "UserMutedEvtMsg":
+ handleUserMutedEvtMsg(message);
break;
case "meetingEnded":
handleLogout(message);
@@ -104,31 +125,7 @@ package org.bigbluebutton.modules.users.services
case "meetingIsActive":
handleMeetingIsActive(message);
break;
- case "participantJoined":
- handleParticipantJoined(message);
- break;
- case "participantLeft":
- handleParticipantLeft(message);
- break;
- case "participantStatusChange":
- handleParticipantStatusChange(message);
- break;
- case "participantRoleChange":
- handleParticipantRoleChange(message);
- break;
- case "userJoinedVoice":
- handleUserJoinedVoice(message);
- break;
- case "userLeftVoice":
- handleUserLeftVoice(message);
- break;
- case "voiceUserMuted":
- handleVoiceUserMuted(message);
- break;
- case "voiceUserTalking":
- handleVoiceUserTalking(message);
- break;
- case "userEmojiStatus":
+ case "UserEmojiChangedEvtMsg":
handleEmojiStatusHand(message);
break;
case "getRecordingStatusReply":
@@ -137,9 +134,6 @@ package org.bigbluebutton.modules.users.services
case "recordingStatusChanged":
handleRecordingStatusChanged(message);
break;
- case "joinMeetingReply":
- handleJoinedMeeting(message);
- break;
case "user_listening_only":
handleUserListeningOnly(message);
break;
@@ -189,6 +183,209 @@ package org.bigbluebutton.modules.users.services
}
}
+ private function handleUserJoinedVoiceConfToClientEvtMsg(msg: Object): void {
+ var header: Object = msg.header as Object;
+ var body: Object = msg.body as Object;
+
+ var vu: VoiceUser2x = new VoiceUser2x();
+ vu.intId = body.intId as String;
+ vu.voiceUserId = body.voiceUserId as String;
+ vu.callerName = body.callerName as String;
+ vu.callerNum = body.callerNum as String;
+ vu.muted = body.muted as Boolean;
+ vu.talking = body.talking as Boolean;
+ vu.callingWith = body.callingWith as String;
+ vu.listenOnly = body.listenOnly as Boolean;
+
+ LiveMeeting.inst().voiceUsers.add(vu);
+
+ if (UsersUtil.isMe(vu.intId)) {
+ LiveMeeting.inst().me.muted = vu.muted;
+ LiveMeeting.inst().me.inVoiceConf = true;
+ }
+
+ var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.USER_VOICE_JOINED);
+ bbbEvent.payload.userID = vu.intId;
+ globalDispatcher.dispatchEvent(bbbEvent);
+
+ }
+
+ private function handleUserLeftVoiceConfToClientEvtMsg(msg: Object):void {
+ var header: Object = msg.header as Object;
+ var body: Object = msg.body as Object;
+ var intId: String = body.intId as String;
+
+ LiveMeeting.inst().voiceUsers.remove(intId);
+
+ if (UsersUtil.isMe(intId)) {
+ LiveMeeting.inst().me.muted = false;
+ LiveMeeting.inst().me.inVoiceConf = false;
+ }
+
+ var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.USER_VOICE_LEFT);
+ bbbEvent.payload.userID = intId;
+ globalDispatcher.dispatchEvent(bbbEvent);
+ }
+
+ private function handleUserMutedEvtMsg(msg: Object): void {
+ var header: Object = msg.header as Object;
+ var body: Object = msg.body as Object;
+ var intId: String = body.intId as String;
+ var muted: Boolean = body.muted as Boolean;
+
+ LiveMeeting.inst().voiceUsers.setMutedForUser(intId, muted);
+
+ if (UsersUtil.isMe(intId)) {
+ LiveMeeting.inst().me.muted = false;
+ }
+
+ var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.USER_VOICE_MUTED);
+ bbbEvent.payload.muted = muted;
+ bbbEvent.payload.userID = intId;
+ globalDispatcher.dispatchEvent(bbbEvent);
+ }
+
+ private function handleUserTalkingEvtMsg(msg: Object): void {
+ var header: Object = msg.header as Object;
+ var body: Object = msg.body as Object;
+ var intId: String = body.intId as String;
+ var talking: Boolean = body.talking as Boolean;
+
+ LiveMeeting.inst().voiceUsers.setTalkingForUser(intId, talking);
+
+ var event:CoreEvent = new CoreEvent(EventConstants.USER_TALKING);
+ event.message.userID = intId;
+ event.message.talking = talking;
+ globalDispatcher.dispatchEvent(event);
+ }
+
+ private function handleGetUsersMeetingRespMsg(msg: Object):void {
+ var body: Object = msg.body as Object
+ var users: Array = body.users as Array;
+ LOGGER.debug("Num USERs = " + users.length);
+
+ for (var i:int = 0; i < users.length; i++) {
+ var user:Object = users[i] as Object;
+ processUserJoinedMeetingMsg(user);
+ }
+ }
+
+ public function handleUserLeftMeetingEvtMsg(msg:Object):void {
+ var body: Object = msg.body as Object
+ var userId: String = body.intId as String;
+
+ var webUser:User2x = UsersUtil.getUser(userId);
+
+ if (webUser != null) {
+ LiveMeeting.inst().users.remove(userId);
+ if(webUser.waitingForAcceptance) {
+ var removeGuest:BBBEvent = new BBBEvent(BBBEvent.REMOVE_GUEST_FROM_LIST);
+ removeGuest.payload.userId = userId;
+ dispatcher.dispatchEvent(removeGuest);
+ }
+
+ var joinEvent:UserLeftEvent = new UserLeftEvent(UserLeftEvent.LEFT);
+ joinEvent.userID = userId;
+ dispatcher.dispatchEvent(joinEvent);
+ }
+ }
+
+ private function handleUserJoinedMeetingEvtMsg(msg:Object):void {
+ var body: Object = msg.body as Object;
+ processUserJoinedMeetingMsg(body);
+ }
+
+ private function processUserJoinedMeetingMsg(user:Object):void {
+ var intId: String = user.intId as String;
+ var extId: String = user.extId as String;
+ var name: String = user.name as String;
+ var role: String = user.role as String;
+ var guest: Boolean = user.role as Boolean;
+ var authed: Boolean = user.authed as Boolean;
+ var waitingForAcceptance: Boolean = user.waitingForAcceptance as Boolean;
+ var emoji: String = user.emoji as String;
+ var locked: Boolean = user.locked as Boolean;
+ var presenter: Boolean = user.presenter as Boolean;
+ var avatar: String = user.avatar as String;
+
+ var user2x: User2x = new User2x();
+ user2x.intId = intId;
+ user2x.extId = extId;
+ user2x.name = name;
+ user2x.role = role;
+ user2x.guest = guest;
+ user2x.authed = authed;
+ user2x.waitingForAcceptance = waitingForAcceptance;
+ user2x.emoji = emoji;
+ user2x.locked = locked;
+ user2x.presenter = presenter;
+ user2x.avatar = avatar;
+
+ LOGGER.debug("USER JOINED = " + JSON.stringify(user2x));
+
+ LiveMeeting.inst().users.add(user2x);
+
+ var joinEvent:UserJoinedEvent = new UserJoinedEvent(UserJoinedEvent.JOINED);
+ joinEvent.userID = user2x.intId;
+ dispatcher.dispatchEvent(joinEvent);
+ }
+
+ private function handleGetVoiceUsersMeetingRespMsg(msg:Object):void {
+ var body: Object = msg.body as Object
+ var users: Array = body.users as Array;
+ LOGGER.debug("Num USERs = " + users.length);
+
+ for (var i:int = 0; i < users.length; i++) {
+ var user:Object = users[i] as Object;
+ var intId: String = user.intId as String;
+ var voiceUserId: String = user.voiceUserId as String;
+ var callingWith: String = user.callingWith as String;
+ var callerName: String = user.callerName as String;
+ var callerNum: String = user.callerNum as String;
+ var muted: Boolean = user.muted as Boolean;
+ var talking: Boolean = user.talking as Boolean;
+ var listenOnly: Boolean = user.listenOnly as Boolean;
+
+ var vu: VoiceUser2x = new VoiceUser2x();
+ vu.intId = intId;
+ vu.voiceUserId = voiceUserId;
+ vu.callingWith = callingWith;
+ vu.callerName = callerName;
+ vu.callerNum = callerNum;
+ vu.muted = muted;
+ vu.talking = talking;
+ vu.listenOnly = listenOnly;
+
+ LOGGER.debug("USER = " + JSON.stringify(vu));
+ LiveMeeting.inst().voiceUsers.add(vu);
+ }
+ }
+
+ private function handleGetWebcamStreamsMeetingRespMsg(msg:Object):void {
+ var body: Object = msg.body as Object
+ var streams: Array = body.streams as Array;
+ LOGGER.debug("Num streams = " + streams.length);
+
+ for (var i:int = 0; i < streams.length; i++) {
+ var stream:Object = streams[i] as Object;
+ var streamId: String = stream.streamId as String;
+ var media: Object = stream.stream as Object;
+ var url: String = media.url as String;
+ var userId: String = media.userId as String;
+ var attributes: Object = media.attributes as Object;
+ var viewers: Array = media.viewers as Array;
+
+ var webcamStream: MediaStream = new MediaStream(streamId, userId);
+ webcamStream.streamId = streamId;
+ webcamStream.userId = userId;
+ webcamStream.attributes = attributes;
+ webcamStream.viewers = viewers;
+
+ LOGGER.debug("STREAM = " + JSON.stringify(webcamStream));
+ LiveMeeting.inst().webcams.add(webcamStream);
+ }
+ }
+
private function handleDeskShareRTMPBroadcastNotification(msg:Object):void {
var event:WebRTCViewStreamEvent;
if (msg.broadcasting) {
@@ -217,10 +414,16 @@ package org.bigbluebutton.modules.users.services
private function handleUserLocked(msg:Object):void {
var map:Object = JSON.parse(msg.msg);
- var user:BBBUser = UsersUtil.getUser(map.user);
+ var user:User2x = UsersUtil.getUser(map.user);
- if(user.userLocked != map.lock)
- user.lockStatusChanged(map.lock);
+ if(user.locked != map.lock) {
+ if (UsersUtil.isMe(user.intId)) {
+ LiveMeeting.inst().me.locked = map.locked;
+ }
+
+ dispatcher.dispatchEvent(new UserStatusChangedEvent(user.intId));
+ }
+
return;
}
@@ -251,33 +454,6 @@ package org.bigbluebutton.modules.users.services
dispatcher.dispatchEvent(e);
}
- private function handleJoinedMeeting(msg:Object):void {
- LOGGER.debug("*** handleJoinedMeeting {0} **** \n", [msg.msg]);
- var map:Object = JSON.parse(msg.msg);
- var userid: String = map.user.userId;
-
- var e:UsersConnectionEvent = new UsersConnectionEvent(UsersConnectionEvent.CONNECTION_SUCCESS);
- e.userid = userid;
- dispatcher.dispatchEvent(e);
-
- // If the user was the presenter he's reconnecting and must become viewer
- if (UsersUtil.amIPresenter()) {
- sendSwitchedPresenterEvent(false, UsersUtil.getPresenterUserID());
- UsersUtil.setMeAsPresenter(false);
- var viewerEvent:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_VIEWER_MODE);
- dispatcher.dispatchEvent(viewerEvent);
- }
-
- var myRole:String = UsersUtil.getMyRole();
- var role:String = map.user.role;
- // If a (pro/de)moted user refresh his browser he must reassing his role for permissions
- if (role != myRole) {
- UserManager.getInstance().getConference().newUserRole(userid, role);
- UserManager.getInstance().getConference().setMyRole(role);
- var changeMyRole:ChangeMyRole = new ChangeMyRole(role);
- dispatcher.dispatchEvent(changeMyRole);
- }
- }
private function handleMeetingMuted(msg:Object):void {
var map:Object = JSON.parse(msg.msg);
@@ -292,9 +468,10 @@ package org.bigbluebutton.modules.users.services
var perm:Object = map.permissions;
var lockSettings:LockSettingsVO = new LockSettingsVO(perm.disableCam, perm.disableMic,
- perm.disablePrivateChat, perm.disablePublicChat, perm.lockedLayout, perm.lockOnJoin, perm.lockOnJoinConfigurable);
+ perm.disablePrivateChat, perm.disablePublicChat,
+ perm.lockedLayout, perm.lockOnJoin, perm.lockOnJoinConfigurable);
UsersUtil.setLockSettings(lockSettings);
- LiveMeeting.inst().meetingStatus.isMeetingMuted = map.meetingMuted;
+ LiveMeeting.inst().meetingStatus.isMeetingMuted = map.meetingMuted;
UsersUtil.applyLockSettings();
}
@@ -326,179 +503,22 @@ package org.bigbluebutton.modules.users.services
var map:Object = JSON.parse(msg.msg);
var userId:String = map.userId;
var listenOnly:Boolean = map.listenOnly;
- var l:BBBUser = _conference.getUser(userId);
- if (l != null) {
- l.listenOnly = listenOnly;
- }
+
+ LiveMeeting.inst().voiceUsers.setListenOnlyForUser(userId, listenOnly);
}
- private function handleVoiceUserMuted(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
- var userId:String = map.userId;
- var muted:Boolean = map.muted;
- UsersService.getInstance().userMuted(map);
+ private function userTalk(userId:String, talking:Boolean):void {
+ LiveMeeting.inst().voiceUsers.setMutedForUser(userId, talking);
+
+ var event:CoreEvent = new CoreEvent(EventConstants.USER_TALKING);
+ event.message.userID = userId;
+ event.message.talking = talking;
+ globalDispatcher.dispatchEvent(event);
- var l:BBBUser = _conference.getUser(userId);
- if (l != null) {
- l.voiceMuted = muted;
-
- if (l.voiceMuted) {
- // When the user is muted, set the talking flag to false so that the UI will not display the
- // user as talking even if muted.
- userTalk(userId, false);
- }
-
- /**
- * Let's store the voice userid so we can do push to talk.
- */
- if (l.me) {
- _conference.muteMyVoice(l.voiceMuted);
- }
-
- var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.USER_VOICE_MUTED);
- bbbEvent.payload.muted = muted;
- bbbEvent.payload.userID = l.userID;
- globalDispatcher.dispatchEvent(bbbEvent);
- }
}
+
- private function userTalk(userId:String, talking:Boolean):void {
- var l:BBBUser = _conference.getUser(userId);
- if (l != null) {
- l.talking = talking;
-
- var event:CoreEvent = new CoreEvent(EventConstants.USER_TALKING);
- event.message.userID = l.userID;
- event.message.talking = l.talking;
- globalDispatcher.dispatchEvent(event);
- }
- }
-
- private function handleVoiceUserTalking(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
- var userId:String = map.userId;
- var talking:Boolean = map.talking;
-
- UsersService.getInstance().userTalking(map);
-
- userTalk(userId, talking);
- }
-
- private function handleUserLeftVoice(msg:Object):void {
- LOGGER.debug("*** handleUserLeftVoice " + msg.msg + " **** \n");
- var map:Object = JSON.parse(msg.msg);
-
- var webUser:Object = map.user as Object;
- var voiceUser:Object = webUser.voiceUser as Object;
- UsersService.getInstance().userLeftVoice(voiceUser);
-
- var l:BBBUser = _conference.getUser(webUser.userId);
- /**
- * Let's store the voice userid so we can do push to talk.
- */
- if (l != null) {
- if (UsersUtil.getMyUserID() == l.userID) {
- _conference.muteMyVoice(false);
- _conference.setMyVoiceJoined(false);
- }
-
- l.voiceMuted = false;
- l.voiceJoined = false;
- l.talking = false;
- //l.userLocked = false;
-
- var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.USER_VOICE_LEFT);
- bbbEvent.payload.userID = l.userID;
- globalDispatcher.dispatchEvent(bbbEvent);
-
- if (l.phoneUser) {
- _conference.removeUser(l.userID);
- }
- } else {
- LOGGER.debug("Could not find voice user id[{0}]", [voiceUser.uerId]);
- }
- }
-
- private function handleUserJoinedVoice(msg:Object):void {
- LOGGER.debug("*** handleUserJoinedVoice " + msg.msg + " **** \n");
- var map:Object = JSON.parse(msg.msg);
- var webUser:Object = map.user as Object;
- userJoinedVoice(webUser);
-
- return;
- }
-
- private function userJoinedVoice(webUser: Object):void {
- var voiceUser:Object = webUser.voiceUser as Object;
-
- UsersService.getInstance().userJoinedVoice(voiceUser);
-
- var externUserID:String = webUser.externUserID;
- var internUserID:String = webUser.userId;
-
- if (UsersUtil.getMyUserID() == internUserID) {
- _conference.muteMyVoice(voiceUser.muted);
- _conference.setMyVoiceJoined(true);
- }
-
- if (UsersUtil.hasUser(internUserID)) {
- var bu:BBBUser = UsersUtil.getUser(internUserID);
- bu.talking = voiceUser.talking;
- bu.voiceMuted = voiceUser.muted;
- bu.voiceJoined = true;
-
- var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.USER_VOICE_JOINED);
- bbbEvent.payload.userID = bu.userID;
- globalDispatcher.dispatchEvent(bbbEvent);
-
- if (UsersUtil.getLockSettings().getDisableMic() && !bu.voiceMuted && bu.userLocked && bu.me) {
- var ev:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
- ev.userid = voiceUser.userId;
- ev.mute = true;
- dispatcher.dispatchEvent(ev);
- }
- }
- }
-
- public function handleParticipantLeft(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
- var webUser:Object = map.user as Object;
-
- var webUserId:String = webUser.userId;
-
- UsersService.getInstance().userLeft(webUser);
-
- if(webUser.waitingForAcceptance) {
- var removeGuest:BBBEvent = new BBBEvent(BBBEvent.REMOVE_GUEST_FROM_LIST);
- removeGuest.payload.userId = webUser.userId;
- dispatcher.dispatchEvent(removeGuest);
- }
-
- var user:BBBUser = UserManager.getInstance().getConference().getUser(webUserId);
-
- if (user != null) {
-
- // Flag that the user is leaving the meeting so that apps (such as avatar) doesn't hang
- // around when the user already left.
- user.isLeavingFlag = true;
-
- var joinEvent:UserLeftEvent = new UserLeftEvent(UserLeftEvent.LEFT);
- joinEvent.userID = user.userID;
- dispatcher.dispatchEvent(joinEvent);
-
- UserManager.getInstance().getConference().removeUser(webUserId);
- }
- }
-
- public function handleParticipantJoined(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
-
- var user:Object = map.user as Object;
-
- UsersService.getInstance().userJoined(user);
- participantJoined(user);
- }
/**
* Called by the server to tell the client that the meeting has ended.
@@ -516,55 +536,16 @@ package org.bigbluebutton.modules.users.services
var endMeetingEvent:BBBEvent = new BBBEvent(BBBEvent.CANCEL_RECONNECTION_EVENT);
dispatcher.dispatchEvent(endMeetingEvent);
}
-
- private function handleGetUsersReply(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
- var users:Object = map.users as Array;
-
- // since might be a reconnection, clean up users list
- UserManager.getInstance().getConference().removeAllParticipants();
-
- if (map.count > 0) {
- for(var i:int = 0; i < users.length; i++) {
- var user:Object = users[i] as Object;
- participantJoined(user);
- processUserVoice(user);
- }
-
- UsersUtil.applyLockSettings();
- }
- }
-
- private function processUserVoice(webUser: Object):void {
- var voiceUser:Object = webUser.voiceUser as Object;
-
- UsersService.getInstance().userJoinedVoice(voiceUser);
-
- var externUserID:String = webUser.externUserID;
- var internUserID:String = webUser.userId;
-
- if (UsersUtil.getMyUserID() == internUserID) {
- _conference.muteMyVoice(voiceUser.muted);
- _conference.setMyVoiceJoined(voiceUser.joined);
- }
-
- if (UsersUtil.hasUser(internUserID)) {
- var bu:BBBUser = UsersUtil.getUser(internUserID);
- bu.voiceMuted = voiceUser.muted;
- bu.voiceJoined = voiceUser.joined;
- bu.talking = voiceUser.talking;
- //bu.userLocked = voiceUser.locked;
- }
- }
public function handleAssignPresenterCallback(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
+ var header:Object = msg.header as Object;
+ var body: Object = msg.body as Object;
- var newPresenterID:String = map.newPresenterID;
- var newPresenterName:String = map.newPresenterName;
- var assignedBy:String = map.assignedBy;
- var meeting:Conference = UserManager.getInstance().getConference();
+
+ var newPresenterID:String = body.presenterId as String;
+ var newPresenterName:String = body.presenterName as String;
+ var assignedBy:String = body.assignedBy as String;
if (UsersUtil.isMe(newPresenterID)) {
sendSwitchedPresenterEvent(true, newPresenterID);
@@ -589,6 +570,9 @@ package org.bigbluebutton.modules.users.services
dispatcher.dispatchEvent(viewerEvent);
}
+
+ dispatcher.dispatchEvent(new UserStatusChangedEvent(newPresenterID));
+
}
private function sendSwitchedPresenterEvent(amIPresenter:Boolean, newPresenterUserID:String):void {
@@ -599,23 +583,53 @@ package org.bigbluebutton.modules.users.services
}
private function handleEmojiStatusHand(msg: Object): void {
- var map:Object = JSON.parse(msg.msg);
- UserManager.getInstance().getConference().emojiStatus(map.userId, map.emojiStatus);
+ var body:Object = msg.body as Object;
+ var userId: String = body.userId as String;
+ var emoji: String = body.emoji as String;
+ var webUser: User2x = UsersUtil.getUser(userId);
+ if (webUser != null) {
+ webUser.emoji = emoji;
+ if (UsersUtil.isMe(userId)) {
+ UsersUtil.setMyEmoji(emoji);
+ }
+
+ sendUserEmojiChangedEvent(userId, emoji);
+ }
+
}
+ private function sendUserEmojiChangedEvent(userId: String, emoji: String):void{
+ var dispatcher:Dispatcher = new Dispatcher();
+ dispatcher.dispatchEvent(new UserEmojiChangedEvent(userId, emoji));
+ }
+
+
private function handleUserBroadcastCamStartedEvtMsg(msg:Object):void {
var userId: String = msg.body.userId as String;
- var stream: String = msg.body.stream as String;
+ var streamId: String = msg.body.stream as String;
var logData:Object = UsersUtil.initLogData();
logData.tags = ["webcam"];
logData.message = "UserBroadcastCamStartedEvtMsg server message";
- logData.user.webcamStream = stream;
+ logData.user.webcamStream = streamId;
LOGGER.info(JSON.stringify(logData));
- UserManager.getInstance().getConference().sharedWebcam(userId, stream);
+ var mediaStream: MediaStream = new MediaStream(streamId, userId)
+ LiveMeeting.inst().webcams.add(mediaStream);
+
+ var webUser: User2x = UsersUtil.getUser(userId);
+ if (webUser != null) {
+ webUser.streamNames.push(streamId);
+ sendStreamStartedEvent(userId, webUser.name, streamId);
+ }
+
}
+ private function sendStreamStartedEvent(userId: String, name: String, stream: String):void{
+ var dispatcher:Dispatcher = new Dispatcher();
+ dispatcher.dispatchEvent(new StreamStartedEvent(userId, name, stream));
+ }
+
private function handleUserBroadcastCamStoppedEvtMsg(msg: Object):void {
var userId: String = msg.body.userId as String;
var stream: String = msg.body.stream as String;
@@ -626,7 +640,7 @@ package org.bigbluebutton.modules.users.services
logData.user.webcamStream = stream;
LOGGER.info(JSON.stringify(logData));
- UserManager.getInstance().getConference().unsharedWebcam(userId, stream);
+// UserManager.getInstance().getConference().unsharedWebcam(userId, stream);
sendStreamStoppedEvent(userId, stream);
}
@@ -635,96 +649,9 @@ package org.bigbluebutton.modules.users.services
dispatcher.dispatchEvent(new StreamStoppedEvent(userId, streamId));
}
- public function participantStatusChange(userID:String, status:String, value:Object):void {
- UserManager.getInstance().getConference().newUserStatus(userID, status, value);
-
- if (status == "presenter"){
- var e:PresenterStatusEvent = new PresenterStatusEvent(PresenterStatusEvent.PRESENTER_NAME_CHANGE);
- e.userID = userID;
-
- dispatcher.dispatchEvent(e);
- }
- }
+
- public function participantJoined(joinedUser:Object):void {
- var user:BBBUser = new BBBUser();
- user.userID = joinedUser.userId;
- user.name = joinedUser.name;
- user.role = joinedUser.role;
- user.guest = joinedUser.guest;
- user.waitingForAcceptance = joinedUser.waitingForAcceptance;
- user.externUserID = joinedUser.externUserID;
- user.isLeavingFlag = false;
- user.listenOnly = joinedUser.listenOnly;
- user.userLocked = joinedUser.locked;
- user.avatarURL = joinedUser.avatarURL;
- user.me = (user.userID == UsersUtil.getMyUserID());
- UserManager.getInstance().getConference().addUser(user);
-
- if (joinedUser.hasStream) {
- var streams:Array = joinedUser.webcamStream;
- for each(var stream:String in streams) {
- UserManager.getInstance().getConference().sharedWebcam(user.userID, stream);
- }
- }
-
- if (joinedUser.voiceUser.joined) {
- userJoinedVoice(joinedUser);
- }
-
- UserManager.getInstance().getConference().presenterStatusChanged(user.userID, joinedUser.presenter);
- UserManager.getInstance().getConference().emojiStatus(user.userID, joinedUser.emojiStatus);
-
- var joinEvent:UserJoinedEvent = new UserJoinedEvent(UserJoinedEvent.JOINED);
- joinEvent.userID = user.userID;
- dispatcher.dispatchEvent(joinEvent);
-
- if (user.guest) {
- if (user.waitingForAcceptance) {
- if (user.me) {
- var waitCommand:BBBEvent = new BBBEvent(BBBEvent.WAITING_FOR_MODERATOR_ACCEPTANCE);
- dispatcher.dispatchEvent(waitCommand);
- } else {
- var e:BBBEvent = new BBBEvent(BBBEvent.ADD_GUEST_TO_LIST);
- e.payload.userId = user.userID;
- e.payload.name = user.name;
- dispatcher.dispatchEvent(e);
- }
- } else {
- if (user.me) {
- var allowedCommand:BBBEvent = new BBBEvent(BBBEvent.MODERATOR_ALLOWED_ME_TO_JOIN);
- dispatcher.dispatchEvent(allowedCommand);
- } else {
- var removeGuest:BBBEvent = new BBBEvent(BBBEvent.REMOVE_GUEST_FROM_LIST);
- removeGuest.payload.userId = user.userID;
- dispatcher.dispatchEvent(removeGuest);
- }
- }
- }
-
- if (user.me && (!user.guest || !user.waitingForAcceptance)) {
- if (onAllowedToJoin != null) {
- onAllowedToJoin();
- onAllowedToJoin = null;
- }
- }
- }
-
- /**
- * Callback from the server from many of the bellow nc.call methods
- */
- public function handleParticipantStatusChange(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
- UserManager.getInstance().getConference().newUserStatus(map.userID, map.status, map.value);
-
- if (msg.status == "presenter"){
- var e:PresenterStatusEvent = new PresenterStatusEvent(PresenterStatusEvent.PRESENTER_NAME_CHANGE);
- e.userID = map.userID;
-
- dispatcher.dispatchEvent(e);
- }
- }
private function handleBreakoutRoomsList(msg:Object):void{
for each(var room : Object in msg.body.rooms)
@@ -754,7 +681,7 @@ package org.bigbluebutton.modules.users.services
}
private function handleUpdateBreakoutUsers(msg:Object):void{
- UserManager.getInstance().getConference().updateBreakoutRoomUsers(msg.body.breakoutMeetingId, msg.body.users);
+// UserManager.getInstance().getConference().updateBreakoutRoomUsers(msg.body.breakoutMeetingId, msg.body.users);
}
private function handleTimeRemainingUpdate(msg:Object):void {
@@ -783,7 +710,7 @@ package org.bigbluebutton.modules.users.services
switchUserFromBreakoutToMainVoiceConf(msg.body.breakoutMeetingId);
var breakoutRoom: BreakoutRoom = LiveMeeting.inst().breakoutRooms.getBreakoutRoom(msg.body.breakoutMeetingId);
LiveMeeting.inst().breakoutRooms.removeBreakoutRoom(msg.body.breakoutMeetingId);
- UserManager.getInstance().getConference().removeBreakoutRoomFromUser(breakoutRoom);
+// UserManager.getInstance().getConference().removeBreakoutRoomFromUser(breakoutRoom);
}
private function switchUserFromBreakoutToMainVoiceConf(breakoutId: String): void {
@@ -797,16 +724,7 @@ package org.bigbluebutton.modules.users.services
}
}
- public function handleParticipantRoleChange(msg:Object):void {
- var map:Object = JSON.parse(msg.msg);
- LOGGER.debug("*** received participant role change [" + map.userID + "," + map.role + "]");
- UserManager.getInstance().getConference().newUserRole(map.userID, map.role);
- if(UsersUtil.isMe(map.userID)) {
- UserManager.getInstance().getConference().setMyRole(map.role);
- var e:ChangeMyRole = new ChangeMyRole(map.role);
- dispatcher.dispatchEvent(e);
- }
- }
+
public function handleGuestPolicyChanged(msg:Object):void {
LOGGER.debug("*** handleGuestPolicyChanged " + msg.msg + " **** \n");
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutList.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutList.mxml
old mode 100644
new mode 100755
index 48498e52ea..824beb8309
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutList.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutList.mxml
@@ -27,10 +27,10 @@ with BigBlueButton; if not, see .
height="140">
.
public var mode:String;
protected function startDragHandler(event:DragEvent):void {
- var selectedNode:BBBUser = usersList.selectedItem as BBBUser;
+ var selectedNode:User2x = usersList.selectedItem as User2x;
if (mode == "invite" && selectedNode.breakoutRooms.length > 0) {
event.stopImmediatePropagation();
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml
index 75ca5ed4f4..765807ef7b 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/BreakoutRoomSettings.mxml
@@ -39,10 +39,9 @@ with BigBlueButton; if not, see .
import org.bigbluebutton.core.PopUpUtil;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.LiveMeeting;
+ import org.bigbluebutton.core.model.users.User2x;
import org.bigbluebutton.main.events.BreakoutRoomEvent;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.util.i18n.ResourceUtil;
[Bindable]
@@ -101,16 +100,16 @@ with BigBlueButton; if not, see .
*/
private function inviteUsersToBreakoutRooms():void {
var list:BreakoutList;
- var user:BBBUser;
+ var user:User2x;
var usersInvited:Boolean = false;
for (var i:int; i < roomsContainer.numChildren - 1; i++) {
list = roomsContainer.getChildAt(i) as BreakoutList;
for (var u:int = 0; u < list.users.length; u++) {
- user = list.users.getItemAt(u) as BBBUser;
+ user = list.users.getItemAt(u) as User2x;
if (user.breakoutRooms.length == 0) {
usersInvited ||= true;
var event:BreakoutRoomEvent = new BreakoutRoomEvent(BreakoutRoomEvent.REQUEST_BREAKOUT_JOIN_URL);
- event.userId = user.userID;
+ event.userId = user.intId;
event.breakoutMeetingId = LiveMeeting.inst().breakoutRooms.getBreakoutRoomBySequence(i + 1).externalMeetingId;
dispatcher.dispatchEvent(event);
}
@@ -124,13 +123,13 @@ with BigBlueButton; if not, see .
}
protected function assignUsersForCreation():void {
- var originalUsers:ArrayCollection = UserManager.getInstance().getConference().users;
+ var originalUsers:ArrayCollection = UsersUtil.getUsers();
var users:ArrayCollection = new ArrayCollection();
- var me:BBBUser;
+ var me:User2x;
// Copy users to avoid removing the references from the original ArrayCollection
for (var l:int = 0; l < originalUsers.length; l++) {
- if (! UsersUtil.isMe((BBBUser(originalUsers[l]).userID))) {
- users.addItem(BBBUser.copy(originalUsers[l]));
+ if (! UsersUtil.isMe((User2x(originalUsers[l]).intId))) {
+ users.addItem(User2x.copy(originalUsers[l]));
} // Put the current user to the unassigned box because he is the moderator
else {
me = originalUsers[l];
@@ -139,7 +138,7 @@ with BigBlueButton; if not, see .
var rooms:int = roomsCombo.selectedIndex + 2;
var perRoom:int = users.length / rooms;
var remaining:int = users.length % rooms;
- var user:BBBUser;
+ var user:User2x;
roomsContainer.removeAllChildren();
for (var r:int = 0; r < rooms; r++) {
var list:BreakoutList = roomsContainer.addChild(new BreakoutList()) as BreakoutList;
@@ -147,11 +146,11 @@ with BigBlueButton; if not, see .
list.roomName = ResourceUtil.getInstance().getString('bbb.users.breakout.room') + " " + (r + 1).toString();
list.usersList.accessibilityName = ResourceUtil.getInstance().getString('bbb.users.breakout.room') + " " + (r + 1).toString();
for (var i:int = 0; i < perRoom; i++) {
- list.users.addItem(users.removeItemAt(Math.floor(Math.random() * users.length)) as BBBUser);
+ list.users.addItem(users.removeItemAt(Math.floor(Math.random() * users.length)) as User2x);
}
}
for (var j:int = 0; j < remaining; j++) {
- BreakoutList(roomsContainer.getChildAt(j)).users.addItem(users.removeItemAt(Math.floor(Math.random() * users.length)) as BBBUser);
+ BreakoutList(roomsContainer.getChildAt(j)).users.addItem(users.removeItemAt(Math.floor(Math.random() * users.length)) as User2x);
}
var unassignedList:BreakoutList = roomsContainer.addChild(new BreakoutList()) as BreakoutList;
unassignedList.users = new ArrayCollection([me]);
@@ -166,8 +165,8 @@ with BigBlueButton; if not, see .
roomsCombo.selectedIndex = assignement['rooms'] - 2;
recordCheckbox.selected = assignement['record'];
durationStepper.value = assignement['duration'];
- var user:BBBUser;
- var currentUsers:ArrayCollection = UserManager.getInstance().getConference().users;
+ var user:User2x;
+ var currentUsers:ArrayCollection = UsersUtil.getUsers();
// Create breakout rooms boxes
for (var r:int = 1; r <= rooms; r++) {
var list:BreakoutList = roomsContainer.addChild(new BreakoutList()) as BreakoutList;
@@ -178,11 +177,11 @@ with BigBlueButton; if not, see .
// Load user assignment from the previous action
var unassignedUsers:ArrayCollection = new ArrayCollection();
for (var u:int = 0; u < currentUsers.length; u++) {
- user = currentUsers.getItemAt(u) as BBBUser;
- if (assignement.hasOwnProperty(user.userID)) {
- BreakoutList(roomsContainer.getChildAt(assignement[user.userID])).users.addItem(BBBUser.copy(user));
+ user = currentUsers.getItemAt(u) as User2x;
+ if (assignement.hasOwnProperty(user.intId)) {
+ BreakoutList(roomsContainer.getChildAt(assignement[user.intId])).users.addItem(User2x.copy(user));
} else {
- unassignedUsers.addItem(BBBUser.copy(user));
+ unassignedUsers.addItem(User2x.copy(user));
}
}
// Create not assigned users list
@@ -190,15 +189,15 @@ with BigBlueButton; if not, see .
}
protected function assignUsersForInvitation():void {
- var originalUsers:ArrayCollection = UserManager.getInstance().getConference().users;
+ var originalUsers:ArrayCollection = UsersUtil.getUsers();
var users:ArrayCollection = new ArrayCollection();
// Copy users to avoid removing the references from the original ArrayCollection
for (var l:int = 0; l < originalUsers.length; l++) {
- users.addItem(BBBUser.copy(originalUsers[l]));
+ users.addItem(User2x.copy(originalUsers[l]));
}
// Create breakout rooms lists
var rooms:int = LiveMeeting.inst().breakoutRooms.breakoutRooms.length;
- var user:BBBUser;
+ var user:User2x;
roomsContainer.removeAllChildren();
for (var r:int = 0; r < rooms; r++) {
var list:BreakoutList = roomsContainer.addChild(new BreakoutList()) as BreakoutList;
@@ -209,10 +208,10 @@ with BigBlueButton; if not, see .
}
var unassignedUsers:ArrayCollection = new ArrayCollection();
for (var j:int = 0; j < users.length; j++) {
- user = users[j] as BBBUser;
+ user = users[j] as User2x;
if (user.breakoutRooms.length > 0) {
for (var b:int = 0; b < user.breakoutRooms.length; b++) {
- BreakoutList(roomsContainer.getChildAt(user.breakoutRooms[b] - 1)).users.addItem(user as BBBUser);
+ BreakoutList(roomsContainer.getChildAt(user.breakoutRooms[b] - 1)).users.addItem(user as User2x);
}
} else {
unassignedUsers.addItem(user);
@@ -239,7 +238,7 @@ with BigBlueButton; if not, see .
var users:ArrayCollection = BreakoutList(roomsContainer.getChildAt(r)).users;
for (var u:int = 0; u < users.length; u++) {
// We store pairs { userID : roomNumber } to be easier to check later
- assignement[BBBUser(users[u]).userID] = r;
+ assignement[User2x(users[u]).intId] = r;
}
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as
old mode 100644
new mode 100755
index 7749b72bb0..2a4fcd84bb
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/EmojiGrid.as
@@ -19,21 +19,18 @@
package org.bigbluebutton.modules.users.views {
import com.asfusion.mate.events.Dispatcher;
-
import flash.events.MouseEvent;
-
import mx.containers.HBox;
import mx.containers.VBox;
import mx.controls.Button;
import mx.controls.Label;
import mx.core.ScrollPolicy;
import mx.events.FlexMouseEvent;
-
import org.bigbluebutton.common.Images;
import org.bigbluebutton.core.PopUpUtil;
- import org.bigbluebutton.core.managers.UserManager;
+ import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.main.model.users.events.EmojiStatusEvent;
- import org.bigbluebutton.util.i18n.ResourceUtil;
+ import org.bigbluebutton.util.i18n.ResourceUtil;
public class EmojiGrid extends VBox {
private const EMOJIS:Array = ["raiseHand", "happy", "neutral", "sad", "confused", "away", "thumbsUp", "thumbsDown", "applause"];
@@ -65,7 +62,7 @@ package org.bigbluebutton.modules.users.views {
button.height = 24;
button.toggle = true;
button.setStyle("icon", images["emoji_" + emoji]);
- button.selected = (UserManager.getInstance().getConference().myEmojiStatus == emoji);
+ button.selected = (LiveMeeting.inst().me.emoji == emoji);
button.toggle = button.selected;
button.toolTip = ResourceUtil.getInstance().getString('bbb.users.emojiStatus.' + emoji);
button.addEventListener(MouseEvent.CLICK, buttonMouseEventHandler);
@@ -87,7 +84,7 @@ package org.bigbluebutton.modules.users.views {
var button:Button = new Button();
button.id = "btnnone";
button.height = 24;
- if (UserManager.getInstance().getConference().myEmojiStatus != "none") {
+ if (LiveMeeting.inst().me.emoji != "none") {
button.label = ResourceUtil.getInstance().getString('bbb.users.emojiStatus.clear');
button.toolTip = ResourceUtil.getInstance().getString('bbb.users.emojiStatus.clear.toolTip');
button.accessibilityName = ResourceUtil.getInstance().getString('bbb.users.emojiStatus.clear.toolTip');
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
index 30a02d12ec..18f82b1c61 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
@@ -51,9 +51,7 @@
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.LockControlEvent;
import org.bigbluebutton.core.events.VoiceConfEvent;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.vo.LockSettingsVO;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
import org.bigbluebutton.main.model.users.events.ChangeRoleEvent;
import org.bigbluebutton.main.model.users.events.KickUserEvent;
@@ -101,7 +99,7 @@
}
private function onRollOver(e:UsersRollEvent):void{
- if ((moderator || UsersUtil.isMe(e.userID)) && (e.userID == data.userID)) {
+ if ((moderator || UsersUtil.isMe(e.userID)) && (e.userID == data.userId)) {
rolledOver = true;
updateButtons();
}
@@ -148,30 +146,30 @@
}
private function viewCamera():void {
- dispatchEvent(new ViewCameraEvent(data.userID, data.streamName, data.name));
+ dispatchEvent(new ViewCameraEvent(data.userId, data.streamName, data.name));
}
private function kickUser():void{
- dispatchEvent(new KickUserEvent(data.userID));
+ dispatchEvent(new KickUserEvent(data.userId));
}
private function toggleMuteState():void {
var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
- e.userid = data.userID;
- e.mute = !data.voiceMuted;
+ e.userid = data.userId;
+ e.mute = !data.muted;
dispatchEvent(e);
}
public function toggleLockState():void {
var e:LockControlEvent;
- if(data.userLocked) {
+ if(data.locked) {
e = new LockControlEvent(LockControlEvent.UNLOCK_USER);
} else {
e = new LockControlEvent(LockControlEvent.LOCK_USER);
}
- e.internalUserID = data.userID;
+ e.internalUserID = data.userId;
dispatchEvent(e);
}
@@ -184,21 +182,19 @@
if (data != null) {
settingsBtn.visible = rolledOver && !data.me && !UsersUtil.isBreakout();
- if (!data.voiceJoined) {
- if (data.listenOnly) {
- muteImg.source = images.sound;
- muteImg.visible = true;
- muteImg.includeInLayout = true;
- muteBtn.visible = false;
- muteBtn.includeInLayout = false;
- } else {
+ if (!data.inVoiceConf) {
muteImg.visible = false;
muteImg.includeInLayout = false;
muteBtn.visible = false;
muteBtn.includeInLayout = true;
- }
} else {
- if (data.userLocked && ls.getDisableMic()) {
+ if (data.listenOnly) {
+ muteImg.source = images.sound;
+ muteImg.visible = true;
+ muteImg.includeInLayout = true;
+ muteBtn.visible = false;
+ muteBtn.includeInLayout = false;
+ } else if (data.locked && ls.getDisableMic()) {
muteImg.visible = true;
muteImg.includeInLayout = true;
muteBtn.visible = false;
@@ -218,7 +214,7 @@
}
}
- if (data.role == BBBUser.MODERATOR){
+ if (data.role == Role.MODERATOR){
lockImg.visible = false;
lockImg.includeInLayout = true;
lockBtn.visible = false;
@@ -257,29 +253,30 @@
}
if (!rolledOver) {
- if (!data.voiceJoined && data.listenOnly) {
- muteImg.source = images.sound;
- } else {
- if (data.voiceMuted)
- muteImg.source = images.audio_muted_20;
- else
- muteImg.source = images.audio_20;
+ if (data.inVoiceConf) {
+ if (data.listenOnly) {
+ muteImg.source = images.sound;
+ } else if (data.muted) {
+ muteImg.source = images.audio_muted_20;
+ } else {
+ muteImg.source = images.audio_20;
+ }
}
- if ( data.userLocked && !data.presenter && ls.isAnythingLocked() ) {
+ if ( data.locked && !data.presenter && ls.isAnythingLocked() ) {
lockImg.source = images.locked_20;
}
else {
lockImg.source = null;
}
} else {
- if (data.voiceMuted == rolledOverMute)
+ if (data.muted == rolledOverMute)
muteBtn.setStyle("icon", images.audio);
else
muteBtn.setStyle("icon", images.audio_muted);
- if (data.userLocked == rolledOverLock)
+ if (data.locked == rolledOverLock)
lockBtn.setStyle("icon", images.unlocked_20);
else
lockBtn.setStyle("icon", images.locked_20);
@@ -296,7 +293,7 @@
}
private function changeUserRole(role:String):void {
- var changeRoleEvent:ChangeRoleEvent = new ChangeRoleEvent(data.userID, role);
+ var changeRoleEvent:ChangeRoleEvent = new ChangeRoleEvent(data.userId, role);
dispatchEvent(changeRoleEvent);
}
@@ -365,13 +362,13 @@
width="20" height="20" click="toggleMuteState()"
mouseOver="muteMouseOverHandler()"
mouseOut="muteMouseOutHandler()"
- toolTip="{data.voiceMuted ? ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToTalk',[data.name]) : ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToMute',[data.name])}" />
+ toolTip="{data.muted ? ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToTalk',[data.name]) : ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToMute',[data.name])}" />
+ toolTip="{data.locked ? ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToUnlock',[data.name]) : ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.pushToLock',[data.name])}" />
-
-
-
+
+
+
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MoodMenu.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MoodMenu.as
index ed25885c3a..eca992301a 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MoodMenu.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MoodMenu.as
@@ -28,10 +28,8 @@ package org.bigbluebutton.modules.users.views {
import mx.events.FlexMouseEvent;
import mx.events.MenuEvent;
import mx.managers.PopUpManager;
-
import org.bigbluebutton.common.Images;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.events.EmojiStatusEvent;
import org.bigbluebutton.main.views.WellPositionedMenu;
import org.bigbluebutton.util.i18n.ResourceUtil;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/RoomActionsRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/RoomActionsRenderer.mxml
index 41a0433369..57ae622101 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/RoomActionsRenderer.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/RoomActionsRenderer.mxml
@@ -11,14 +11,11 @@
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/StatusItemRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/StatusItemRenderer.mxml
index 639df7395d..4e1e058dd3 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/StatusItemRenderer.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/StatusItemRenderer.mxml
@@ -101,7 +101,7 @@
}
private function updateRoleComponents() : void {
- if (rolledOver && !data.presenter && !data.phoneUser) {
+ if (rolledOver && !data.presenter && !data.voiceOnlyUser) {
roleBtn.setStyle("icon", images.presenter_new);
roleBtn.toolTip = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.changePresenter');
roleImg.visible = false;
@@ -119,6 +119,12 @@
roleImg.visible = true;
roleBtn.visible = false;
roleBtn.enabled = false;
+ } else if (data.role == Role.VOICE_ONLY) {
+ roleImg.source = images.sound;
+ roleImg.toolTip = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.voiceOnlyUser');
+ roleImg.visible = true;
+ roleBtn.visible = false;
+ roleBtn.enabled = false;
} else {
roleImg.source = null;
roleImg.toolTip = "";
@@ -152,7 +158,7 @@
}
private function onRollOver(e:UsersRollEvent):void{
- if (moderator && (e.userID == data.userID) && !data.phoneUser) {
+ if (moderator && (e.userID == data.userId) && !data.voiceOnlyUser) {
rolledOver = true;
updateButtons();
}
@@ -179,7 +185,7 @@
private function roleBtnClicked():void {
if (!data.presenter) {
var e:RoleChangeEvent = new RoleChangeEvent(RoleChangeEvent.ASSIGN_PRESENTER);
- e.userid = data.userID;
+ e.userid = data.userId;
e.username = data.name;
dispatchEvent(e);
}
@@ -187,8 +193,8 @@
private function emojiBtnClicked() : void {
if (data.hasEmojiStatus) {
- dispatchEvent(new EmojiStatusEvent(EmojiStatusEvent.EMOJI_STATUS, "none", data.userID));
- }
+ dispatchEvent(new EmojiStatusEvent(EmojiStatusEvent.EMOJI_STATUS, "none", data.userId));
+ }
}
// Need to refresh the roleBtn toolTip text on locale change
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml
index 4da5a8fdf2..b1485128da 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml
@@ -42,61 +42,78 @@
+
+
+
+
+
+
+
+
+
+
-
+
b.name.toLowerCase())
+ return 1;
+ else if (a.userId.toLowerCase() > b.userId.toLowerCase())
+ return -1;
+ else if (a.userId.toLowerCase() < b.userId.toLowerCase())
+ return 1;
+ return 0;
+ }
+ }
+}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BBBUser2x.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BBBUser2x.as
new file mode 100755
index 0000000000..d3de4cd743
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BBBUser2x.as
@@ -0,0 +1,338 @@
+/**
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
+package org.bigbluebutton.modules.users.views.model
+{
+ import com.asfusion.mate.events.Dispatcher;
+ import flash.events.Event;
+ import org.as3commons.lang.ArrayUtils;
+ import org.as3commons.logging.api.ILogger;
+ import org.as3commons.logging.api.getClassLogger;
+ import org.bigbluebutton.common.Role;
+ import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
+ import org.bigbluebutton.util.i18n.ResourceUtil;
+ import org.bigbluebutton.main.model.users.Status;
+ import org.bigbluebutton.main.model.users.StatusCollection;
+
+ public class BBBUser2x {
+ private static const LOGGER:ILogger = getClassLogger(BBBUser2x);
+
+ public var dispatcher:Dispatcher = new Dispatcher();
+
+ [Bindable] public var me: Boolean = false;
+
+ [Bindable] public var userId:String = "UNKNOWN USER";
+ [Bindable] public var name:String = "";
+ [Bindable] public var guest:Boolean = false;
+ [Bindable] public var locked: Boolean = false;
+
+ [Bindable] public var callingWith: String = "";
+ [Bindable] public var talking: Boolean = false;
+ [Bindable] public var listenOnly: Boolean = false;
+ [Bindable] public var voiceOnlyUser: Boolean = false;
+
+ [Bindable]
+ public function get hasStream():Boolean {
+ return streamNames.length > 0;
+ }
+ public function set hasStream(s:Boolean):void {
+ throw new Error("hasStream cannot be set. It is derived directly from streamName");
+ }
+
+ [Bindable] private var _viewingStream:Array = new Array();
+
+ [Bindable]
+ public function get viewingStream():Array {
+ return _viewingStream;
+ }
+ public function set viewingStream(v:Array):void {
+ throw new Error("Please use the helpers addViewingStream or removeViewingStream to handle viewingStream");
+ }
+ public function addViewingStream(streamName:String):Boolean {
+ if (isViewingStream(streamName)) {
+ return false;
+ }
+
+ _viewingStream.push(streamName);
+ return true;
+ }
+ public function removeViewingStream(streamName:String):Boolean {
+ if (!isViewingStream(streamName)) {
+ return false;
+ }
+
+ _viewingStream = _viewingStream.filter(function(item:*, index:int, array:Array):Boolean { return item != streamName; });
+ return true;
+ }
+ private function isViewingStream(streamName:String):Boolean {
+ return _viewingStream.some(function(item:*, index:int, array:Array):Boolean { return item == streamName; });
+ }
+ public function isViewingAllStreams():Boolean {
+ return _viewingStream.length == streamNames.length;
+ }
+
+ [Bindable] public var streamNames:Array = new Array();
+
+ [Bindable]
+ public function get streamName():String {
+ var streams:String = "";
+ for each(var stream:String in streamNames) {
+ streams = streams + stream + "|";
+ }
+ //Remove last |
+ streams = streams.slice(0, streams.length-1);
+ return streams;
+ }
+
+ private function hasThisStream(streamName:String):Boolean {
+ return streamNames.some(function(item:*, index:int, array:Array):Boolean { return item == streamName; });
+ }
+
+ public function set streamName(streamNames:String):void {
+ if(streamNames) {
+ var streamNamesList:Array = streamNames.split("|");
+ for each(var streamName:String in streamNamesList) {
+ sharedWebcam(streamName);
+ }
+ }
+ }
+
+ private var _presenter:Boolean = false;
+ [Bindable]
+ public function get presenter():Boolean {
+ return _presenter;
+ }
+ public function set presenter(p:Boolean):void {
+ _presenter = p;
+ verifyUserStatus();
+ }
+
+ public var emojiStatusTime:Date;
+ private var _emojiStatus:String = "none";
+
+ [Bindable("emojiStatusChange")]
+ public function get emojiStatus():String {
+ return _emojiStatus;
+ }
+ public function set emojiStatus(r:String):void {
+ _emojiStatus = r;
+ emojiStatusTime = (r ? new Date() : null);
+ verifyUserStatus();
+ dispatcher.dispatchEvent(new Event("emojiStatusChange"));
+ }
+
+ [Bindable("emojiStatusChange")]
+ public function get hasEmojiStatus():Boolean {
+ return _emojiStatus != null && _emojiStatus != "none" && _emojiStatus != "null";
+ }
+
+ private var _role:String = Role.VIEWER;
+ [Bindable]
+ public function get role():String {
+ return _role;
+ }
+ public function set role(r:String):void {
+ _role = r;
+ verifyUserStatus();
+ }
+
+ private var _muted:Boolean = false;
+ [Bindable]
+ public function get muted():Boolean {
+ return _muted;
+ }
+ public function set muted(v:Boolean):void {
+ _muted = v;
+ verifyMedia();
+ }
+
+ private var _inVoiceConf:Boolean = false;
+ [Bindable]
+ public function get inVoiceConf():Boolean {
+ return _inVoiceConf;
+ }
+ public function set inVoiceConf(v:Boolean):void {
+ _inVoiceConf = v;
+ verifyMedia();
+ }
+
+ [Bindable] public var status:String = "";
+
+ /*
+ * This variable is for accessibility for the Users Window. It can't be manually set
+ * and only changes when one of the relevant status variables changes. Use the verifyUserStatus
+ * method to update the value.
+ * Chad
+ */
+ private var _userStatus:String = "";
+ [Bindable]
+ public function get userStatus():String {
+ return _userStatus;
+ }
+ private function set userStatus(s:String):void {}
+ private function verifyUserStatus():void {
+ if (presenter)
+ _userStatus = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.presenter');
+ else if (role == Role.MODERATOR)
+ _userStatus = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.moderator');
+ else if (hasEmojiStatus)
+ _userStatus = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.' + _emojiStatus);
+ else
+ _userStatus = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.viewer');
+ }
+
+ /*
+ * This variable is for accessibility for the Users Window. It can't be manually set
+ * and only changes when one of the relevant media variables changes. Use the verifyMedia
+ * method to update the value.
+ * Chad
+ */
+ private var _media:String = "";
+ [Bindable]
+ public function get media():String {
+ return _media;
+ }
+ private function set media(m:String):void {}
+ private function verifyMedia():void {
+ _media = (hasStream ? ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.webcam') + " " : "") +
+ (!inVoiceConf ? ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.noAudio') :
+ (muted ? ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.micOff') :
+ ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.micOn')));
+ }
+
+ private var _status:StatusCollection = new StatusCollection();
+
+ public function buildStatus():void {
+ var showingWebcam:String="";
+ var isPresenter:String="";
+ var hasEmoji:String = "";
+ if (hasStream)
+ showingWebcam=ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.streamIcon.toolTip');
+ if (presenter)
+ isPresenter=ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.presIcon.toolTip');
+ if (hasEmojiStatus)
+ hasEmoji = ResourceUtil.getInstance().getString('bbb.users.usersGrid.statusItemRenderer.'+ emojiStatus +'.toolTip');
+
+ status = showingWebcam + isPresenter + hasEmoji;
+ }
+
+ public function addStatus(status:Status):void {
+ _status.addStatus(status);
+ }
+
+ public function userEmojiStatus(emoji: String):void {
+ emojiStatus = emoji;
+ buildStatus();
+ }
+
+ public function sharedWebcam(stream: String):void {
+ if(stream && stream != "" && !hasThisStream(stream)) {
+ streamNames.push(stream);
+ sendStreamStartedEvent(stream);
+ }
+ buildStatus();
+ verifyMedia();
+ }
+
+ public function unsharedWebcam(stream: String):void {
+ streamNames = streamNames.filter(function(item:*, index:int, array:Array):Boolean { return item != stream });
+ buildStatus();
+ verifyMedia();
+ }
+
+ public function presenterStatusChanged(presenter: Boolean):void {
+ this.presenter = presenter;
+ buildStatus();
+ }
+
+ public function lockStatusChanged(locked: Boolean):void {
+ this.locked = locked;
+ buildStatus();
+ }
+
+ public function changeStatus(status:Status):void {
+ switch (status.name) {
+ case "presenter":
+ presenter=(status.value.toString().toUpperCase() == "TRUE") ? true : false;
+ break;
+ case "hasStream":
+ var streamInfo:Array=String(status.value).split(/,/);
+ /**
+ * Cannot use this statement as new Boolean(expression)
+ * return true if the expression is a non-empty string not
+ * when the string equals "true". See Boolean class def.
+ *
+ * hasStream = new Boolean(String(streamInfo[0]));
+ */
+ var streamNameInfo:Array=String(streamInfo[1]).split(/=/);
+ streamName=streamNameInfo[1];
+ break;
+ // @FIXME : check the coming status from the server
+ case "emojiStatus":
+ emojiStatus = status.value.toString();
+ break;
+ }
+ buildStatus();
+ }
+
+ public function removeStatus(name:String):void {
+ _status.removeStatus(name);
+ }
+
+ public function getStatus(name:String):Status {
+ return _status.getStatus(name);
+ }
+
+ private function sendStreamStartedEvent(stream: String):void{
+ var dispatcher:Dispatcher = new Dispatcher();
+ dispatcher.dispatchEvent(new StreamStartedEvent(userId, name, stream));
+ }
+
+ private var _breakoutRooms : Array = [];
+
+ [Bindable("displayNameChange")]
+ public function get displayName():String {
+ if (ArrayUtils.isEmpty(_breakoutRooms)) {
+ return name;
+ } else {
+ return "[" + _breakoutRooms.join(",") + "] " + name;
+ }
+ }
+
+ public function get breakoutRooms():Array {
+ return _breakoutRooms;
+ }
+
+ public function set breakoutRooms(rooms:Array):void {
+ _breakoutRooms = rooms;
+ dispatcher.dispatchEvent(new Event("displayNameChange"));
+ }
+
+ public function addBreakoutRoom(roomNumber:int):void {
+ if (!ArrayUtils.contains(_breakoutRooms, roomNumber)) {
+ _breakoutRooms.push(roomNumber);
+ dispatcher.dispatchEvent(new Event("displayNameChange"));
+ }
+ }
+
+ public function removeBreakoutRoom(roomNumber:int):void {
+ _breakoutRooms.splice(_breakoutRooms.indexOf(roomNumber), 1);
+ dispatcher.dispatchEvent(new Event("displayNameChange"));
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BBBVoiceUser2x.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BBBVoiceUser2x.as
new file mode 100755
index 0000000000..968130811e
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BBBVoiceUser2x.as
@@ -0,0 +1,45 @@
+/**
+ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
+ *
+ * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
+ *
+ * This program is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3.0 of the License, or (at your option) any later
+ * version.
+ *
+ * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with BigBlueButton; if not, see .
+ *
+ */
+package org.bigbluebutton.modules.users.views.model
+{
+ import com.asfusion.mate.events.Dispatcher;
+ import org.as3commons.logging.api.ILogger;
+ import org.as3commons.logging.api.getClassLogger;
+
+ public class BBBVoiceUser2x {
+ private static const LOGGER:ILogger = getClassLogger(BBBVoiceUser2x);
+
+ public var dispatcher:Dispatcher = new Dispatcher();
+
+ [Bindable] public var userId:String = "UNKNOWN USER";
+ [Bindable] public var name:String = "";
+ [Bindable] public var callingWith: String = "";
+ [Bindable] public var talking: Boolean = false;
+ [Bindable] public var listenOnly: Boolean = false;
+
+ private var _muted:Boolean = false;
+ [Bindable]
+ public function get muted():Boolean {
+ return _muted;
+ }
+ public function set muted(v:Boolean):void {
+ _muted = v;
+ }
+ }
+}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BreakoutUser.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BreakoutUser.as
new file mode 100755
index 0000000000..fd2a6c89fc
--- /dev/null
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/model/BreakoutUser.as
@@ -0,0 +1,10 @@
+package org.bigbluebutton.modules.users.views.model
+{
+
+ public class BreakoutUser
+ {
+ public function BreakoutUser()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as
index 936f41de49..201c5e7ae1 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMapDelegate.as
@@ -35,15 +35,15 @@ package org.bigbluebutton.modules.videoconf.maps
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
+ import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.core.model.VideoProfile;
+ import org.bigbluebutton.core.model.users.User2x;
import org.bigbluebutton.core.vo.CameraSettingsVO;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.events.StoppedViewingWebcamEvent;
import org.bigbluebutton.main.events.UserJoinedEvent;
import org.bigbluebutton.main.events.UserLeftEvent;
- import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent;
import org.bigbluebutton.main.model.users.events.StreamStoppedEvent;
@@ -57,7 +57,7 @@ package org.bigbluebutton.modules.videoconf.maps
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
import org.bigbluebutton.modules.videoconf.views.GraphicsWrapper;
import org.bigbluebutton.modules.videoconf.views.ToolbarPopupButton;
- import org.bigbluebutton.modules.videoconf.views.VideoDock;
+ import org.bigbluebutton.modules.videoconf.views.VideoDock;
public class VideoEventMapDelegate
{
@@ -214,10 +214,10 @@ package org.bigbluebutton.modules.videoconf.maps
private function openWebcamWindows():void {
LOGGER.debug("VideoEventMapDelegate:: [{0}] openWebcamWindows. ready = [{1}]", [me, _ready]);
- var uids:ArrayCollection = UsersUtil.getUserIDs();
+ var uids:Array = UsersUtil.getUserIDs();
for (var i:int = 0; i < uids.length; i++) {
- var u:String = uids.getItemAt(i) as String;
+ var u:String = uids[i] as String;
LOGGER.debug("VideoEventMapDelegate:: [{0}] openWebcamWindows:: open window for = [{1}]", [me, u]);
openWebcamWindowFor(u);
}
@@ -284,14 +284,15 @@ package org.bigbluebutton.modules.videoconf.maps
}
private function openViewWindowFor(userID:String):void {
- var bbbUser:BBBUser = UsersUtil.getUser(userID);
- if (bbbUser == null || !proxy.connection.connected) {
+ var webUser:User2x = LiveMeeting.inst().users.getUser(userID);
+ if (webUser == null || !proxy.connection.connected) {
return;
}
LOGGER.debug("VideoEventMapDelegate:: [{0}] openViewWindowFor:: Opening VIEW window for [{1}] [{2}]", [me, userID, UsersUtil.getUserName(userID)]);
- if (bbbUser.hasStream) {
+ var hasStream: Boolean = LiveMeeting.inst().webcams.getStreamsForUser(userID).length > 0;
+ if (hasStream) {
closeAllAvatarWindows(userID);
}
_graphics.addVideoFor(userID, proxy.connection);
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/GraphicsWrapper.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/GraphicsWrapper.as
old mode 100644
new mode 100755
index 45dd013c54..f50f4e696e
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/GraphicsWrapper.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/GraphicsWrapper.as
@@ -11,8 +11,9 @@ package org.bigbluebutton.modules.videoconf.views
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
+ import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.core.model.VideoProfile;
- import org.bigbluebutton.main.model.users.BBBUser;
+ import org.bigbluebutton.core.model.users.User2x;
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
@@ -267,13 +268,14 @@ package org.bigbluebutton.modules.videoconf.views
}
public function addVideoFor(userId:String, connection:NetConnection):void {
- var user:BBBUser = UsersUtil.getUser(userId);
+ var user:User2x = LiveMeeting.inst().users.getUser(userId);
if (user == null) return;
- var streamNames:Array = user.streamNames;
+ var streamNames:Array = LiveMeeting.inst().webcams.getStreamIdsForUser(userId);
for each (var streamName:String in streamNames) {
- if (user.viewingStream.indexOf(streamName) == -1) {
+ var viewingStream: Boolean = LiveMeeting.inst().webcams.isViewingStream(user.intId, streamName)
+ if (! viewingStream) {
// When reconnecting there is discrepancy between the time when the usermodel's viewingStream array
// is updated and the time when we check whether the steam needs to be displayed.
// To avoid duplication of video views we must check if a view for the stream exists
@@ -287,7 +289,7 @@ package org.bigbluebutton.modules.videoconf.views
}
}
if (0 == numChildren || !streamIsDisplayed) {
- addVideoForHelper(user.userID, connection, streamName);
+ addVideoForHelper(user.intId, connection, streamName);
}
}
}
@@ -340,7 +342,7 @@ package org.bigbluebutton.modules.videoconf.views
var alreadyPublishing:Boolean = false;
for (var i:int = 0; i < numChildren; ++i) {
var item:UserGraphicHolder = getChildAt(i) as UserGraphicHolder;
- if (item.user && item.user.userID == userId && item.visibleComponent is UserVideo && item.video.camIndex == camIndex) {
+ if (item.user && item.user.intId == userId && item.visibleComponent is UserVideo && item.video.camIndex == camIndex) {
alreadyPublishing = true;
break;
}
@@ -363,7 +365,7 @@ package org.bigbluebutton.modules.videoconf.views
LOGGER.debug("[GraphicsWrapper:removeAvatarFor] userId {0}", [userId]);
for (var i:int = 0; i < numChildren; ++i) {
var item:UserGraphicHolder = getChildAt(i) as UserGraphicHolder;
- if (item.user && item.user.userID == userId && item.visibleComponent is UserAvatar) {
+ if (item.user && item.user.intId == userId && item.visibleComponent is UserAvatar) {
LOGGER.debug("[GraphicsWrapper:removeAvatarFor] removing graphic");
removeChildHelper(item);
// recursive call to remove all avatars for userId
@@ -379,7 +381,7 @@ package org.bigbluebutton.modules.videoconf.views
for (var i:int = 0; i < numChildren; ++i) {
var item:UserGraphicHolder = getChildAt(i) as UserGraphicHolder;
- if (item.user && item.user.userID == userId && item.visibleComponent is UserVideo && item.video.camIndex == camIndex) {
+ if (item.user && item.user.intId == userId && item.visibleComponent is UserVideo && item.video.camIndex == camIndex) {
streamName = item.video.streamName;
removeChildHelper(item);
break;
@@ -406,7 +408,7 @@ package org.bigbluebutton.modules.videoconf.views
LOGGER.debug("[GraphicsWrapper:removeGraphicsFor] userId {0}", [userId]);
for (var i:int = 0; i < numChildren; ++i) {
var item:UserGraphicHolder = getChildAt(i) as UserGraphicHolder;
- if (item.user && item.user.userID == userId) {
+ if (item.user && item.user.intId == userId) {
LOGGER.debug("[GraphicsWrapper:removeGraphicsFor] removing graphic");
removeChildHelper(item);
// recursive call to remove all graphics for userId
@@ -419,7 +421,7 @@ package org.bigbluebutton.modules.videoconf.views
public function hasGraphicsFor(userId:String):Boolean {
for (var i:int = 0; i < numChildren; ++i) {
var item:UserGraphicHolder = getChildAt(i) as UserGraphicHolder;
- if (item.user && item.user.userID == userId) {
+ if (item.user && item.user.intId == userId) {
return true;
}
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml
index 2673a46b17..2429b56d3e 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ToolbarPopupButton.mxml
@@ -42,27 +42,25 @@ with BigBlueButton; if not, see .
.
}
private function updateButton():void {
- var userManager:UserManager = UserManager.getInstance();
- var conference:Conference = userManager.getConference();
- var me:BBBUser = conference.getMyUser();
-
- this.visible = !me.disableMyCam;
- this.includeInLayout = !me.disableMyCam;
+ this.visible = ! LiveMeeting.inst().me.disableMyCam;
+ this.includeInLayout = ! LiveMeeting.inst().me.disableMyCam;
}
private function init():void{
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as
old mode 100644
new mode 100755
index 7cc1ba3eed..72e2c13133
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as
@@ -1,14 +1,14 @@
package org.bigbluebutton.modules.videoconf.views
{
import flash.display.DisplayObject;
+
import mx.containers.Canvas;
- import mx.core.UIComponent;
-
- import org.bigbluebutton.main.model.users.BBBUser;
+ import mx.core.UIComponent;
+ import org.bigbluebutton.core.model.users.User2x;
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
public class UserGraphic extends UIComponent {
- protected var _user:BBBUser = null;
+ protected var _user:User2x = null;
protected var _options:VideoConfOptions;
protected var _origWidth:Number = 320;
protected var _origHeight:Number = 240;
@@ -77,11 +77,11 @@ package org.bigbluebutton.modules.videoconf.views
object.height = object_height;
}
- public function set user(value:BBBUser):void {
+ public function set user(value:User2x):void {
_user = value;
}
- public function get user():BBBUser {
+ public function get user():User2x {
return _user;
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphicHolder.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphicHolder.mxml
index cb1e815738..585257ffa1 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphicHolder.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphicHolder.mxml
@@ -38,21 +38,23 @@ with BigBlueButton; if not, see .
.
private var _me:Boolean = false;
private var _dispatcher:Dispatcher = new Dispatcher();
private var _images:Images = new Images();
- private var _user:BBBUser = null;
+ private var _user:User2x = null;
private var _streamName:String = "";
private var _userId:String = "";
@@ -102,7 +104,7 @@ with BigBlueButton; if not, see .
public function loadAvatar(options:VideoConfOptions):void {
avatar.user = _user;
avatar.options = options;
- avatar.load(UsersUtil.getUserAvatarURL(_user.userID));
+ avatar.load(UsersUtil.getUserAvatarURL(_user.intId));
avatarVisibility = true;
setUserProperties();
@@ -111,7 +113,7 @@ with BigBlueButton; if not, see .
public function loadCamera(options:VideoConfOptions, camIndex:int, videoProfile:VideoProfile):void {
video.user = _user;
video.options = options;
- _streamName = UserVideo.newStreamName(_user.userID, videoProfile);
+ _streamName = UserVideo.newStreamName(_user.intId, videoProfile);
video.publish(camIndex, videoProfile, _streamName);
videoVisibility = true;
@@ -129,7 +131,7 @@ with BigBlueButton; if not, see .
private function setUserProperties():void {
_username = user.name;
- _me = user.me;
+ _me = (user.intId == LiveMeeting.inst().me.id);
updateButtons();
updateTalkingStatus();
@@ -153,7 +155,7 @@ with BigBlueButton; if not, see .
}
}
- public function get user():BBBUser {
+ public function get user():User2x {
return _user;
}
@@ -171,17 +173,19 @@ with BigBlueButton; if not, see .
}
private function hasPermissionToMute():Boolean {
- var me:BBBUser = UserManager.getInstance().getConference().getMyUser();
-
- return (!me.disableMyMic && (_me || UsersUtil.amIModerator()));
+ return (! LiveMeeting.inst().me.disableMyMic && (_me || UsersUtil.amIModerator()));
}
private function onMuteBtnClick(event:MouseEvent):void {
- if (user && user.voiceJoined && hasPermissionToMute()) {
+ if (user && hasPermissionToMute()) {
+ var voiceUser: VoiceUser2x = LiveMeeting.inst().voiceUsers.getUser(user.intId);
+ if (voiceUser != null) {
var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
- e.userid = user.userID;
- e.mute = !user.voiceMuted;
+ e.userid = voiceUser.intId;
+ e.mute = ! voiceUser.muted;
_dispatcher.dispatchEvent(e);
+ }
+
}
event.stopPropagation();
@@ -213,26 +217,38 @@ with BigBlueButton; if not, see .
private function updateButtons():void {
if (user != null) {
- if (_rolledOverMuteBtn == user.voiceMuted) {
- muteBtn.styleName = "muteOverlayBtn";
+ var voiceUser: VoiceUser2x = LiveMeeting.inst().voiceUsers.getUser(user.intId);
+ if (voiceUser != null) {
+ if (_rolledOverMuteBtn == voiceUser.muted) {
+ muteBtn.styleName = "muteOverlayBtn";
} else {
- muteBtn.styleName = "unmuteOverlayBtn";
+ muteBtn.styleName = "unmuteOverlayBtn";
}
-
+
if (_rolledOverCanvas || _rolledOverMuteBtn) {
- // muteBtnWrapper.visible = user.voiceJoined;
- setMuteBtnVisibility(user.voiceJoined);
+ // muteBtnWrapper.visible = user.voiceJoined;
+ setMuteBtnVisibility(true);
} else {
- // muteBtnWrapper.visible = user.voiceJoined && user.voiceMuted;
- setMuteBtnVisibility(user.voiceJoined && user.voiceMuted);
+ // muteBtnWrapper.visible = user.voiceJoined && user.voiceMuted;
+ setMuteBtnVisibility(voiceUser.muted);
}
+ } else {
+ if (_rolledOverCanvas || _rolledOverMuteBtn) {
+ // muteBtnWrapper.visible = user.voiceJoined;
+ setMuteBtnVisibility(false);
+ } else {
+ // muteBtnWrapper.visible = user.voiceJoined && user.voiceMuted;
+ setMuteBtnVisibility(false);
+ }
+ }
+
var userIconVisibility:Boolean;
if (user.presenter) {
userIcon.source = _images.presenter_white;
userIconVisibility = true;
} else {
- if (user.role == BBBUser.MODERATOR) {
+ if (user.role == Role.MODERATOR) {
userIcon.source = _images.moderator_white;
userIconVisibility = true;
} else {
@@ -244,7 +260,8 @@ with BigBlueButton; if not, see .
}
private function updateTalkingStatus():void {
- if (user.talking) {
+ var voiceUser: VoiceUser2x = LiveMeeting.inst().voiceUsers.getUser(user.intId);
+ if (voiceUser != null && voiceUser.talking) {
titleBox.setStyle("styleName", "videoToolbarBackgroundTalkingStyle");
} else {
titleBox.setStyle("styleName", "videoToolbarBackgroundNotTalkingStyle");
@@ -252,20 +269,20 @@ with BigBlueButton; if not, see .
}
private function handleUserTalkingEvent(event:CoreEvent):void {
- if (user && event.message.userID == user.userID) {
+ if (user && event.message.userID == user.intId) {
updateButtons();
updateTalkingStatus();
}
}
private function handlePresenterChangedEvent(event:PresenterStatusEvent):void {
- if (user && event.userID == user.userID) {
+ if (user && event.userID == user.intId) {
updateButtons();
}
}
private function handleUserVoiceChangedEvent(event:BBBEvent):void {
- if (user && event.payload.userID == user.userID) {
+ if (user && event.payload.userID == user.intId) {
updateButtons();
updateTalkingStatus();
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserVideo.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserVideo.as
index 1c4f8fef5d..e39339c5a1 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserVideo.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserVideo.as
@@ -126,7 +126,7 @@ package org.bigbluebutton.modules.videoconf.views
private function stopViewing():void {
var stopEvent:StoppedViewingWebcamEvent = new StoppedViewingWebcamEvent();
- stopEvent.webcamUserID = user.userID;
+ stopEvent.webcamUserID = user.intId;
stopEvent.streamName = _streamName;
_dispatcher.dispatchEvent(stopEvent);
user.removeViewingStream(_streamName);
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasDisplayModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasDisplayModel.as
index d58fe2bc7b..0dc74885c1 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasDisplayModel.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasDisplayModel.as
@@ -18,26 +18,14 @@
*/
package org.bigbluebutton.modules.whiteboard
{
- import flash.display.DisplayObject;
- import flash.events.Event;
- import flash.events.FocusEvent;
- import flash.events.KeyboardEvent;
- import flash.ui.Keyboard;
- import flash.utils.Dictionary;
-
+ import flash.display.DisplayObject;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
- import org.bigbluebutton.main.events.MadePresenterEvent;
- import org.bigbluebutton.modules.whiteboard.business.shapes.DrawObject;
- import org.bigbluebutton.modules.whiteboard.business.shapes.GraphicFactory;
import org.bigbluebutton.modules.whiteboard.business.shapes.GraphicObject;
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
import org.bigbluebutton.modules.whiteboard.business.shapes.TextObject;
import org.bigbluebutton.modules.whiteboard.business.shapes.WhiteboardConstants;
- import org.bigbluebutton.modules.whiteboard.events.WhiteboardDrawEvent;
- import org.bigbluebutton.modules.whiteboard.events.WhiteboardUpdateReceived;
import org.bigbluebutton.modules.whiteboard.models.Annotation;
import org.bigbluebutton.modules.whiteboard.models.AnnotationStatus;
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasModel.as
index 8239d35bae..74f8c42c0c 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasModel.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/WhiteboardCanvasModel.as
@@ -18,14 +18,10 @@
*/
package org.bigbluebutton.modules.whiteboard
{
- import flash.events.KeyboardEvent;
-
- import mx.containers.Canvas;
+
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
- import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
import org.bigbluebutton.modules.whiteboard.views.AnnotationIDGenerator;
import org.bigbluebutton.modules.whiteboard.views.CursorPositionListener;
import org.bigbluebutton.modules.whiteboard.views.IDrawListener;
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/TextObject.as b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/TextObject.as
index 23538ea57b..7ee84e2de9 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/TextObject.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/TextObject.as
@@ -20,15 +20,11 @@ package org.bigbluebutton.modules.whiteboard.business.shapes {
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
- import flash.events.TextEvent;
import flash.text.AntiAliasType;
- import flash.text.TextField;
import flash.text.TextFieldType;
- import flash.text.TextFormat;
-
+ import flash.text.TextFormat;
import org.bigbluebutton.common.IMETextField;
import org.bigbluebutton.core.UsersUtil;
- import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.modules.whiteboard.models.Annotation;
import org.bigbluebutton.modules.whiteboard.models.AnnotationStatus;
diff --git a/bigbluebutton-web/run.sh b/bigbluebutton-web/run.sh
new file mode 100755
index 0000000000..f61a0fc0d2
--- /dev/null
+++ b/bigbluebutton-web/run.sh
@@ -0,0 +1,2 @@
+grails -Dserver.port=8888 run-war
+