- cleanup
This commit is contained in:
parent
959e6ba7da
commit
09926ef823
@ -24,8 +24,7 @@ package org.bigbluebutton.main.model.users
|
||||
{
|
||||
private var _status:ArrayCollection;
|
||||
|
||||
public function StatusCollection()
|
||||
{
|
||||
public function StatusCollection() {
|
||||
_status = new ArrayCollection();
|
||||
}
|
||||
|
||||
@ -33,15 +32,13 @@ package org.bigbluebutton.main.model.users
|
||||
_status = s;
|
||||
}
|
||||
|
||||
public function addStatus(status:Status):void
|
||||
{
|
||||
public function addStatus(status:Status):void {
|
||||
if (! hasStatus(status.name)) {
|
||||
_status.addItem(status);
|
||||
}
|
||||
}
|
||||
|
||||
public function hasStatus(name:String):Boolean
|
||||
{
|
||||
public function hasStatus(name:String):Boolean {
|
||||
var index:int = getStatusIndex(name);
|
||||
|
||||
if (index > -1) {
|
||||
@ -57,8 +54,7 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
}
|
||||
|
||||
public function getStatus(name:String):Status
|
||||
{
|
||||
public function getStatus(name:String):Status {
|
||||
var index:int = getStatusIndex(name);
|
||||
|
||||
if (index > -1) {
|
||||
@ -68,8 +64,7 @@ package org.bigbluebutton.main.model.users
|
||||
return null;
|
||||
}
|
||||
|
||||
public function removeStatus(name:String):void
|
||||
{
|
||||
public function removeStatus(name:String):void {
|
||||
var index : int = getStatusIndex(name);
|
||||
|
||||
if (index > -1) {
|
||||
@ -77,10 +72,8 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
}
|
||||
|
||||
private function getStatusIndex(name:String):int
|
||||
{
|
||||
for (var i:int=0;i<_status.length;i++)
|
||||
{
|
||||
private function getStatusIndex(name:String):int {
|
||||
for (var i:int=0;i<_status.length;i++) {
|
||||
var s:Status = _status.getItemAt(i) as Status;
|
||||
|
||||
if (s.name == name) {
|
||||
@ -92,13 +85,11 @@ package org.bigbluebutton.main.model.users
|
||||
return -1;
|
||||
}
|
||||
|
||||
public function removeAll():void
|
||||
{
|
||||
public function removeAll():void {
|
||||
_status.removeAll();
|
||||
}
|
||||
|
||||
public function getAll():ArrayCollection
|
||||
{
|
||||
public function getAll():ArrayCollection {
|
||||
return _status;
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,7 @@ package org.bigbluebutton.main.model.users {
|
||||
private static const SO_NAME : String = "participantsSO";
|
||||
private static const STATUS:String = "_STATUS";
|
||||
|
||||
// private var netConnectionDelegate: NetConnectionDelegate;
|
||||
private var _connectionManager:ConnectionManager;
|
||||
private var _connectionManager:ConnectionManager;
|
||||
|
||||
private var _room:String;
|
||||
private var _applicationURI:String;
|
||||
@ -59,19 +58,21 @@ package org.bigbluebutton.main.model.users {
|
||||
|
||||
public function UsersSOService(uri:String) {
|
||||
_applicationURI = uri;
|
||||
_connectionManager = BBB.initConnectionManager();
|
||||
_connectionManager.setUri(uri);
|
||||
_connectionManager = BBB.initConnectionManager();
|
||||
_connectionManager.setUri(uri);
|
||||
dispatcher = new Dispatcher();
|
||||
}
|
||||
|
||||
public function connect(params:ConferenceParameters):void {
|
||||
_room = params.room;
|
||||
_connectionManager.connect(params);
|
||||
_connectionManager.connect(params);
|
||||
}
|
||||
|
||||
public function disconnect(onUserAction:Boolean):void {
|
||||
if (_participantsSO != null) _participantsSO.close();
|
||||
_connectionManager.disconnect(onUserAction);
|
||||
if (_participantsSO != null) {
|
||||
_participantsSO.close();
|
||||
}
|
||||
_connectionManager.disconnect(onUserAction);
|
||||
}
|
||||
|
||||
public function join(userid:String, room:String):void {
|
||||
@ -338,14 +339,12 @@ package org.bigbluebutton.main.model.users {
|
||||
}
|
||||
}
|
||||
|
||||
private function asyncErrorHandler(event:AsyncErrorEvent):void
|
||||
{
|
||||
private function asyncErrorHandler(event:AsyncErrorEvent):void {
|
||||
LogUtil.debug(LOGNAME + "participantsSO asyncErrorHandler " + event.error);
|
||||
sendConnectionFailedEvent(ConnectionFailedEvent.ASYNC_ERROR);
|
||||
}
|
||||
|
||||
public function get connection():NetConnection
|
||||
{
|
||||
public function get connection():NetConnection {
|
||||
return _connectionManager.connection;
|
||||
}
|
||||
|
||||
|
@ -84,8 +84,7 @@ package org.bigbluebutton.modules.listeners.business.vo
|
||||
listeners.removeAll();
|
||||
}
|
||||
|
||||
public function newUserStatus(id:Number, newStatus:String) : void
|
||||
{
|
||||
public function newUserStatus(id:Number, newStatus:String):void {
|
||||
var l:Listener = getListener(id);
|
||||
|
||||
if (l != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user