Begin refactoring and update to bigbluebutton 0.81
This commit is contained in:
parent
0c01f1beae
commit
7c39c15209
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2013 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 2.1 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* author:
|
||||
*/
|
||||
package org.bigbluebutton.main.model
|
||||
{
|
||||
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
|
||||
public class Guest
|
||||
{
|
||||
private var listOfGuests:Object = new Object();
|
||||
private var numberOfGuests = 0;
|
||||
private var dispatcher;
|
||||
|
||||
function Guest(dispatcher:Dispatcher) {
|
||||
this.dispatcher = dispatcher;
|
||||
}
|
||||
|
||||
public function hasGuest():Boolean {
|
||||
return numberOfGuests > 0;
|
||||
}
|
||||
|
||||
public function getNumberOfGuests():Number {
|
||||
return numberOfGuests;
|
||||
}
|
||||
|
||||
public function addGuest(userID:Number, userName:String):void {
|
||||
var guest:Object = {userid:userID, username:userName};
|
||||
listOfGuests.addItem(guest);
|
||||
numberOfGuests++;
|
||||
}
|
||||
|
||||
public function removeAllGuests():void {
|
||||
listOfGuests = new Object();
|
||||
numberOfGuests = 0;
|
||||
}
|
||||
|
||||
public function remove(userid:Number):void {
|
||||
if (listOfGuests[userid] != null) {
|
||||
numberOfGuests--;
|
||||
delete listOfGuests[userid];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -45,7 +45,6 @@
|
||||
import mx.controls.Spacer;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
|
||||
private var urlLoader:URLLoader;
|
||||
private var guestWindowMap:Object = new Object();
|
||||
private var guestButtons:Object = new Object();
|
||||
[Bindable] private var numberOfGuests:Number = 0;
|
||||
|
@ -45,7 +45,7 @@
|
||||
<mate:Listener type="{RemoveGuestRequestEvent.GUEST_EVENT}" method="removeGuestWindow" />
|
||||
<mate:Listener type="SHOW_MIC_SETTINGS" method="showMicSettings" />
|
||||
<mate:Listener type="SHOW_BBB_SETTINGS" method="showBBBSettings" />
|
||||
<mate:Listener type="{NewGuestEvent.NEW_GUEST_EVENT}" method="newGuestWindow" />
|
||||
<mate:Listener type="{NewGuestEvent.NEW_GUEST_EVENT}" method="addNewGuest" />
|
||||
<mate:Listener type="{ModeratorRespEvent.GUEST_ALLOWED}" method="guestAllowed" />
|
||||
<mate:Listener type="{BBBEvent.RETRIEVE_GUEST_POLICY}" method="setGuestPolicy"/>
|
||||
|
||||
@ -87,6 +87,7 @@
|
||||
import org.bigbluebutton.main.events.ModeratorRespEvent;
|
||||
import org.bigbluebutton.main.model.LayoutOptions;
|
||||
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
|
||||
import org.bigbluebutton.main.model.Guest;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
import org.bigbluebutton.util.logging.Logger;
|
||||
import org.bigbluebutton.common.events.SettingsComponentEvent;
|
||||
@ -118,6 +119,7 @@
|
||||
private var receivedConfigLocaleVer:Boolean = false;
|
||||
private var receivedResourceLocaleVer:Boolean = false;
|
||||
private var guestManagement:GuestManagement = null;
|
||||
private var guest:Guest = new Guest();
|
||||
|
||||
private var guestPolicy:String = "ASK_MODERATOR";
|
||||
|
||||
@ -211,14 +213,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
private function newGuestWindow(evt:NewGuestEvent):void {
|
||||
if(guestWindow == null) {
|
||||
guestWindow = PopUpManager.createPopUp( mdiCanvas, GuestWindow, false) as GuestWindow;
|
||||
guestWindow.x = width - 400;
|
||||
guestWindow.y = 20;
|
||||
}
|
||||
|
||||
guestWindow.addGuest(evt.userid, evt.name);
|
||||
private function addNewGuest(evt:NewGuestEvent):void {
|
||||
guest.addGuest(evt.userid, evt.name);
|
||||
//if(guestWindow == null) {
|
||||
// guestWindow = PopUpManager.createPopUp( mdiCanvas, GuestWindow, false) as GuestWindow;
|
||||
// guestWindow.x = width - 400;
|
||||
// guestWindow.y = 20;
|
||||
//}
|
||||
//guestWindow.addGuest(evt.userid, evt.name);
|
||||
|
||||
}
|
||||
public function removeGuestWindow(evt:RemoveGuestRequestEvent):void {
|
||||
|
Loading…
Reference in New Issue
Block a user