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 a929eb5ba1e87af29a1e9f73ad46de98f625817c..28fb7fac70754345503cb8c6a8df2ce2bacfc126 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 @@ -34,15 +34,6 @@ class PresentationModel { } yield curPage } - def removePresentation(presId: String): Option[Presentation] = { // todo remove - for { - pres <- presentations.get(presId) - } yield { - presentations -= presId - pres - } - } - def setCurrentPresentation(presId: String): Option[Presentation] = { // todo remove getPresentations foreach (curPres => { if (curPres.id != presId) { @@ -64,61 +55,4 @@ class PresentationModel { presentations += pres.id -> pres } - def resizePage(presentationId: String, pageId: String, - xOffset: Double, yOffset: Double, widthRatio: Double, - heightRatio: Double): Option[PageVO] = { // TODO remove - 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 - } - } - - // TODO remove - 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) - updatedPres = newPres - } - updatedPres - } - - // TODO remove - 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) - Some(newPres) - case None => - None - - } - } - - // TODO remove - def changeCurrentPage(presentationId: String, pageId: String): Boolean = { - var foundPage: Boolean = false - - for { - pres <- presentations.get(presentationId) - newPres <- makePageCurrent(pres, pageId) - } yield { - foundPage = true - savePresentation(deactivateCurrentPage(newPres, pageId)) - } - - foundPage - } - } 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 868d15a3945e69f5573f0585b887ce4358a3be7f..f522a192ceef8d4783032a982e05328226f569dc 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 @@ -24,10 +24,6 @@ class PresentationApp2x(implicit val context: ActorContext) } } - def presentationConversionCompleted(liveMeeting: LiveMeeting, presentation: Presentation) { - liveMeeting.presModel.addPresentation(presentation) - } - def setCurrentPresentation(liveMeeting: LiveMeeting, presentationId: String): Option[Presentation] = { liveMeeting.presModel.setCurrentPresentation(presentationId) } @@ -36,31 +32,4 @@ class PresentationApp2x(implicit val context: ActorContext) liveMeeting.presModel.getPresentations } - def setCurrentPage(liveMeeting: LiveMeeting, 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(liveMeeting: LiveMeeting, 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(widthRatio, 100D) //if (widthRatio <= 100D) widthRatio else 100D - val checkedHeight = Math.min(heightRatio, 100D) - val checkedXOffset = Math.min(xOffset, 0D) - val checkedYOffset = Math.min(yOffset, 0D) - - liveMeeting.presModel.resizePage(presentationId, pageId, checkedXOffset, checkedYOffset, checkedWidth, checkedHeight); - } - - def removePresentation(liveMeeting: LiveMeeting, presentationId: String): Option[Presentation] = { - liveMeeting.presModel.removePresentation(presentationId) - } }