From e583c3d603ebe7bda37886f254f02b72ab98cae7 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Tue, 30 Oct 2012 16:27:19 +0000 Subject: [PATCH] - embed scala lib --- bigbluebutton-apps/build.gradle | 9 +++++- .../org/bigbluebutton/webconf/Meeting.scala | 28 +++++++++++++++++++ .../org/bigbluebutton/webconf/User.scala | 5 ++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100755 bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/Meeting.scala create mode 100755 bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/User.scala diff --git a/bigbluebutton-apps/build.gradle b/bigbluebutton-apps/build.gradle index a2781b6e99..b0507e78e7 100755 --- a/bigbluebutton-apps/build.gradle +++ b/bigbluebutton-apps/build.gradle @@ -1,3 +1,4 @@ +usePlugin 'scala' usePlugin 'java' usePlugin 'war' usePlugin 'eclipse' @@ -98,7 +99,13 @@ dependencies { //redis compile 'redis.clients:jedis:2.0.0' providedCompile 'commons:commons-pool:1.5.6' - + + // Libraries needed to run the scala tools + scalaTools 'org.scala-lang:scala-compiler:2.9.2' + scalaTools 'org.scala-lang:scala-library:2.9.2' + + // Libraries needed for scala api + compile 'org.scala-lang:scala-library:2.9.2' // Freeswitch ESL Client compile 'org/freeswitch:fs-esl-client:0.8.2@jar' diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/Meeting.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/Meeting.scala new file mode 100755 index 0000000000..61ba8d7892 --- /dev/null +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/Meeting.scala @@ -0,0 +1,28 @@ +package org.bigbluebutton.webconf + +import scala.actors.Actor +import scala.actors.Actor._ +import scala.collection.immutable.HashMap + +case class UserJoin(id: String, name: String) +case class UserLeft(id: String) + + +class Meeting extends Actor { + + private val users = new HashMap[String, User] + + def act() = { + loop { + react { + case userJoin: UserJoin => { + handleUserJoin(userJoin) + } + } + } + } + + private def handleUserJoin(user: UserJoin) { + + } +} \ No newline at end of file diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/User.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/User.scala new file mode 100755 index 0000000000..d4c2fb62ad --- /dev/null +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/webconf/User.scala @@ -0,0 +1,5 @@ +package org.bigbluebutton.webconf + +class User { + +} \ No newline at end of file