- create classes for models in client

This commit is contained in:
Richard Alam 2017-06-13 17:51:04 -07:00
parent 2c4fe3f3b8
commit 23cf2266e4
6 changed files with 132 additions and 9 deletions

View File

@ -0,0 +1,12 @@
package org.bigbluebutton.core.model
{
public class MediaAttribute
{
var key: String;
var value: String;
public function MediaAttribute()
{
}
}
}

View File

@ -0,0 +1,14 @@
package org.bigbluebutton.core.model
{
public class MediaStream
{
var streamId: String;
var intId: String;
var attributes: ArrayCollection = new ArrayCollection();
var viewers:ArrayCollection = new ArrayCollection();
public function MediaStream()
{
}
}
}

View File

@ -0,0 +1,23 @@
package org.bigbluebutton.core.model
{
public class MeetingStatus
{
var recordingVoice: Boolean = false;
var audioSettingsInited: Boolean = false;
var permissionsInited: Boolean = false;
var permissions = new Permissions();
var recording: Boolean = false;
var broadcastingRTMP: Boolean = false;
var muted: Boolean = false;
var meetingEnded: Boolean = false;
var meetingMuted: Boolean = false;
var guestPolicy: String = "ASK_MODERATOR";
var guestPolicySetBy: String = null;
public function MeetingStatus()
{
}
}
}

View File

@ -0,0 +1,17 @@
package org.bigbluebutton.core.model
{
public class Permission
{
var disableCam: Boolean = false;
var disableMic: Boolean = false;
var disablePrivChat: Boolean = false;
var disablePubChat: Boolean = false;
var lockedLayout: Boolean = false;
var lockOnJoin: Boolean = false;
var lockOnJoinConfigurable: Boolean = false;
public function Permission()
{
}
}
}

View File

@ -0,0 +1,60 @@
package org.bigbluebutton.core.model
{
public class Webcams
{
private var _webcams:ArrayCollection = new ArrayCollection();
public function add(stream: MediaStream):void {
_webcams.addItem(stream);
}
public function remove(streamId: String):MediaStream {
var index:int = getIndex(streamId);
if (index >= 0) {
return _webcams.removeItemAt(index) as MediaStream;
}
return null;
}
public function getStreamAndIndex(streamId: String):Object {
var stream:MediaStream;
for (var i:int = 0; i < _webcams.length; i++) {
stream = _webcams.getItemAt(i) as MediaStream;
if (stream.id == userId) {
return {index:i, stream:stream};;
}
}
return null;
}
public function getStream(streamId:String):MediaStream {
var stream:MediaStream;
for (var i:int = 0; i < _webcams.length; i++) {
stream = _webcams.getItemAt(i) as MediaStream;
if (stream.streamId == streamId) {
return stream;
}
}
return null;
}
public function getIndex(streamId: String):int {
var stream:MediaStream;
for (var i:int = 0; i < _webcams.length; i++) {
stream = _webcams.getItemAt(i) as MediaStream;
if (stream.streamId == streamId) {
return i;
}
}
return -1;
}
}
}

View File

@ -1,19 +1,16 @@
package org.bigbluebutton.core.model.users
{
import mx.collections.ArrayCollection;
import org.bigbluebutton.core.model.Me;
public class Users2x
{
private var _users:ArrayCollection = new ArrayCollection();
private function add(user: User2x):void {
public function add(user: User2x):void {
_users.addItem(user);
}
private 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;
@ -22,7 +19,7 @@ package org.bigbluebutton.core.model.users
return null;
}
private 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;
@ -35,7 +32,7 @@ package org.bigbluebutton.core.model.users
return null;
}
private function getUser(userId:String):User2x {
public function getUser(userId:String):User2x {
var user:User2x;
for (var i:int = 0; i < _users.length; i++) {
@ -49,7 +46,7 @@ package org.bigbluebutton.core.model.users
return null;
}
private function getIndex(userId: String):int {
public function getIndex(userId: String):int {
var user:User2x;
for (var i:int = 0; i < _users.length; i++) {
user = _users.getItemAt(i) as User2x;