Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
2,267 additions
and
236 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
...main/java/org/bigbluebutton/common/messages/EjectAllUsersFromVoiceConfRequestMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,56 @@ | |||
package org.bigbluebutton.common.messages; | |||
|
|||
import java.util.HashMap; | |||
import com.google.gson.JsonObject; | |||
import com.google.gson.JsonParser; | |||
|
|||
|
|||
public class EjectAllUsersFromVoiceConfRequestMessage { | |||
public static final String EJECT_ALL_VOICE_USERS_REQUEST = "eject_all_users_from_voice_conf_request_message"; | |||
public static final String VERSION = "0.0.1"; | |||
|
|||
public static final String MEETING_ID = "meeting_id"; | |||
public static final String VOICE_CONF_ID = "voice_conf_id"; | |||
|
|||
public final String meetingId; | |||
public final String voiceConfId; | |||
|
|||
public EjectAllUsersFromVoiceConfRequestMessage(String meetingId, String voiceConfId) { | |||
this.meetingId = meetingId; | |||
this.voiceConfId = voiceConfId; | |||
} | |||
|
|||
public String toJson() { | |||
HashMap<String, Object> payload = new HashMap<String, Object>(); | |||
payload.put(MEETING_ID, meetingId); | |||
payload.put(VOICE_CONF_ID, voiceConfId); | |||
|
|||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(EJECT_ALL_VOICE_USERS_REQUEST, VERSION, null); | |||
|
|||
return MessageBuilder.buildJson(header, payload); | |||
} | |||
|
|||
public static EjectAllUsersFromVoiceConfRequestMessage fromJson(String message) { | |||
JsonParser parser = new JsonParser(); | |||
JsonObject obj = (JsonObject) parser.parse(message); | |||
|
|||
if (obj.has("header") && obj.has("payload")) { | |||
JsonObject header = (JsonObject) obj.get("header"); | |||
JsonObject payload = (JsonObject) obj.get("payload"); | |||
|
|||
if (header.has("name")) { | |||
String messageName = header.get("name").getAsString(); | |||
if (EJECT_ALL_VOICE_USERS_REQUEST.equals(messageName)) { | |||
if (payload.has(MEETING_ID) | |||
&& payload.has(VOICE_CONF_ID)) { | |||
String id = payload.get(MEETING_ID).getAsString(); | |||
String voiceConfId = payload.get(VOICE_CONF_ID).getAsString(); | |||
return new EjectAllUsersFromVoiceConfRequestMessage(id, voiceConfId); | |||
} | |||
} | |||
} | |||
} | |||
return null; | |||
|
|||
} | |||
} |
62 changes: 62 additions & 0 deletions
62
...src/main/java/org/bigbluebutton/common/messages/EjectUserFromVoiceConfRequestMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,62 @@ | |||
package org.bigbluebutton.common.messages; | |||
|
|||
import java.util.HashMap; | |||
import com.google.gson.JsonObject; | |||
import com.google.gson.JsonParser; | |||
|
|||
|
|||
public class EjectUserFromVoiceConfRequestMessage { | |||
public static final String EJECT_VOICE_USER_REQUEST = "eject_user_from_voice_conf_request_message"; | |||
public static final String VERSION = "0.0.1"; | |||
|
|||
public static final String MEETING_ID = "meeting_id"; | |||
public static final String VOICE_CONF_ID = "voice_conf_id"; | |||
public static final String VOICE_USER_ID = "voice_user_id"; | |||
|
|||
public final String meetingId; | |||
public final String voiceConfId; | |||
public final String voiceUserId; | |||
|
|||
public EjectUserFromVoiceConfRequestMessage(String meetingId, String voiceConfId, String voiceUserId) { | |||
this.meetingId = meetingId; | |||
this.voiceConfId = voiceConfId; | |||
this.voiceUserId = voiceUserId; | |||
} | |||
|
|||
public String toJson() { | |||
HashMap<String, Object> payload = new HashMap<String, Object>(); | |||
payload.put(MEETING_ID, meetingId); | |||
payload.put(VOICE_CONF_ID, voiceConfId); | |||
payload.put(VOICE_USER_ID, voiceUserId); | |||
|
|||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(EJECT_VOICE_USER_REQUEST, VERSION, null); | |||
|
|||
return MessageBuilder.buildJson(header, payload); | |||
} | |||
|
|||
public static EjectUserFromVoiceConfRequestMessage fromJson(String message) { | |||
JsonParser parser = new JsonParser(); | |||
JsonObject obj = (JsonObject) parser.parse(message); | |||
|
|||
if (obj.has("header") && obj.has("payload")) { | |||
JsonObject header = (JsonObject) obj.get("header"); | |||
JsonObject payload = (JsonObject) obj.get("payload"); | |||
|
|||
if (header.has("name")) { | |||
String messageName = header.get("name").getAsString(); | |||
if (EJECT_VOICE_USER_REQUEST.equals(messageName)) { | |||
if (payload.has(MEETING_ID) | |||
&& payload.has(VOICE_CONF_ID) | |||
&& payload.has(VOICE_USER_ID)) { | |||
String id = payload.get(MEETING_ID).getAsString(); | |||
String voiceConfId = payload.get(VOICE_CONF_ID).getAsString(); | |||
String voiceUserId = payload.get(VOICE_USER_ID).getAsString(); | |||
return new EjectUserFromVoiceConfRequestMessage(id, voiceConfId, voiceUserId); | |||
} | |||
} | |||
} | |||
} | |||
return null; | |||
|
|||
} | |||
} |
56 changes: 56 additions & 0 deletions
56
.../src/main/java/org/bigbluebutton/common/messages/GetUsersFromVoiceConfRequestMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,56 @@ | |||
package org.bigbluebutton.common.messages; | |||
|
|||
import java.util.HashMap; | |||
import com.google.gson.JsonObject; | |||
import com.google.gson.JsonParser; | |||
|
|||
|
|||
public class GetUsersFromVoiceConfRequestMessage { | |||
public static final String GET_VOICE_USERS_REQUEST = "get_users_from_voice_conf_request_message"; | |||
public static final String VERSION = "0.0.1"; | |||
|
|||
public static final String MEETING_ID = "meeting_id"; | |||
public static final String VOICE_CONF_ID = "voice_conf_id"; | |||
|
|||
public final String meetingId; | |||
public final String voiceConfId; | |||
|
|||
public GetUsersFromVoiceConfRequestMessage(String meetingId, String voiceConfId) { | |||
this.meetingId = meetingId; | |||
this.voiceConfId = voiceConfId; | |||
} | |||
|
|||
public String toJson() { | |||
HashMap<String, Object> payload = new HashMap<String, Object>(); | |||
payload.put(MEETING_ID, meetingId); | |||
payload.put(VOICE_CONF_ID, voiceConfId); | |||
|
|||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(GET_VOICE_USERS_REQUEST, VERSION, null); | |||
|
|||
return MessageBuilder.buildJson(header, payload); | |||
} | |||
|
|||
public static GetUsersFromVoiceConfRequestMessage fromJson(String message) { | |||
JsonParser parser = new JsonParser(); | |||
JsonObject obj = (JsonObject) parser.parse(message); | |||
|
|||
if (obj.has("header") && obj.has("payload")) { | |||
JsonObject header = (JsonObject) obj.get("header"); | |||
JsonObject payload = (JsonObject) obj.get("payload"); | |||
|
|||
if (header.has("name")) { | |||
String messageName = header.get("name").getAsString(); | |||
if (GET_VOICE_USERS_REQUEST.equals(messageName)) { | |||
if (payload.has(MEETING_ID) | |||
&& payload.has(VOICE_CONF_ID)) { | |||
String id = payload.get(MEETING_ID).getAsString(); | |||
String voiceConfId = payload.get(VOICE_CONF_ID).getAsString(); | |||
return new GetUsersFromVoiceConfRequestMessage(id, voiceConfId); | |||
} | |||
} | |||
} | |||
} | |||
return null; | |||
|
|||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...ps/src/main/java/org/bigbluebutton/common/messages/MuteUserInVoiceConfRequestMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,68 @@ | |||
package org.bigbluebutton.common.messages; | |||
|
|||
import java.util.HashMap; | |||
import com.google.gson.JsonObject; | |||
import com.google.gson.JsonParser; | |||
|
|||
|
|||
public class MuteUserInVoiceConfRequestMessage { | |||
public static final String MUTE_VOICE_USER_REQUEST = "mute_user_in_voice_conf_request_message"; | |||
public static final String VERSION = "0.0.1"; | |||
|
|||
public static final String MEETING_ID = "meeting_id"; | |||
public static final String VOICE_CONF_ID = "voice_conf_id"; | |||
public static final String VOICE_USER_ID = "voice_user_id"; | |||
public static final String MUTE = "mute"; | |||
|
|||
public final String meetingId; | |||
public final String voiceConfId; | |||
public final String voiceUserId; | |||
public final Boolean mute; | |||
|
|||
public MuteUserInVoiceConfRequestMessage(String meetingId, String voiceConfId, String voiceUserId, Boolean mute) { | |||
this.meetingId = meetingId; | |||
this.voiceConfId = voiceConfId; | |||
this.voiceUserId = voiceUserId; | |||
this.mute = mute; | |||
} | |||
|
|||
public String toJson() { | |||
HashMap<String, Object> payload = new HashMap<String, Object>(); | |||
payload.put(MEETING_ID, meetingId); | |||
payload.put(VOICE_CONF_ID, voiceConfId); | |||
payload.put(VOICE_USER_ID, voiceUserId); | |||
payload.put(MUTE, mute); | |||
|
|||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(MUTE_VOICE_USER_REQUEST, VERSION, null); | |||
|
|||
return MessageBuilder.buildJson(header, payload); | |||
} | |||
|
|||
public static MuteUserInVoiceConfRequestMessage fromJson(String message) { | |||
JsonParser parser = new JsonParser(); | |||
JsonObject obj = (JsonObject) parser.parse(message); | |||
|
|||
if (obj.has("header") && obj.has("payload")) { | |||
JsonObject header = (JsonObject) obj.get("header"); | |||
JsonObject payload = (JsonObject) obj.get("payload"); | |||
|
|||
if (header.has("name")) { | |||
String messageName = header.get("name").getAsString(); | |||
if (MUTE_VOICE_USER_REQUEST.equals(messageName)) { | |||
if (payload.has(MEETING_ID) | |||
&& payload.has(VOICE_CONF_ID) | |||
&& payload.has(VOICE_USER_ID) | |||
&& payload.has(MUTE)) { | |||
String id = payload.get(MEETING_ID).getAsString(); | |||
String voiceConfId = payload.get(VOICE_CONF_ID).getAsString(); | |||
String voiceUserId = payload.get(VOICE_USER_ID).getAsString(); | |||
Boolean mute = payload.get(MUTE).getAsBoolean(); | |||
return new MuteUserInVoiceConfRequestMessage(id, voiceConfId, voiceUserId, mute); | |||
} | |||
} | |||
} | |||
} | |||
return null; | |||
|
|||
} | |||
} |
62 changes: 62 additions & 0 deletions
62
...b-apps/src/main/java/org/bigbluebutton/common/messages/RecordVoiceConfRequestMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,62 @@ | |||
package org.bigbluebutton.common.messages; | |||
|
|||
import java.util.HashMap; | |||
import com.google.gson.JsonObject; | |||
import com.google.gson.JsonParser; | |||
|
|||
|
|||
public class RecordVoiceConfRequestMessage { | |||
public static final String RECORD_VOICE_CONF_REQUEST = "record_voice_conf_request_message"; | |||
public static final String VERSION = "0.0.1"; | |||
|
|||
public static final String MEETING_ID = "meeting_id"; | |||
public static final String VOICE_CONF_ID = "voice_conf_id"; | |||
public static final String RECORD = "record"; | |||
|
|||
public final String meetingId; | |||
public final String voiceConfId; | |||
public final Boolean record; | |||
|
|||
public RecordVoiceConfRequestMessage(String meetingId, String voiceConfId, Boolean record) { | |||
this.meetingId = meetingId; | |||
this.voiceConfId = voiceConfId; | |||
this.record = record; | |||
} | |||
|
|||
public String toJson() { | |||
HashMap<String, Object> payload = new HashMap<String, Object>(); | |||
payload.put(MEETING_ID, meetingId); | |||
payload.put(VOICE_CONF_ID, voiceConfId); | |||
payload.put(RECORD, record); | |||
|
|||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(RECORD_VOICE_CONF_REQUEST, VERSION, null); | |||
|
|||
return MessageBuilder.buildJson(header, payload); | |||
} | |||
|
|||
public static RecordVoiceConfRequestMessage fromJson(String message) { | |||
JsonParser parser = new JsonParser(); | |||
JsonObject obj = (JsonObject) parser.parse(message); | |||
|
|||
if (obj.has("header") && obj.has("payload")) { | |||
JsonObject header = (JsonObject) obj.get("header"); | |||
JsonObject payload = (JsonObject) obj.get("payload"); | |||
|
|||
if (header.has("name")) { | |||
String messageName = header.get("name").getAsString(); | |||
if (RECORD_VOICE_CONF_REQUEST.equals(messageName)) { | |||
if (payload.has(MEETING_ID) | |||
&& payload.has(VOICE_CONF_ID) | |||
&& payload.has(RECORD)) { | |||
String id = payload.get(MEETING_ID).getAsString(); | |||
String voiceConfId = payload.get(VOICE_CONF_ID).getAsString(); | |||
Boolean record = payload.get(RECORD).getAsBoolean(); | |||
return new RecordVoiceConfRequestMessage(id, voiceConfId, record); | |||
} | |||
} | |||
} | |||
} | |||
return null; | |||
|
|||
} | |||
} |
56 changes: 56 additions & 0 deletions
56
...rc/main/java/org/bigbluebutton/common/messages/StartRecordingVoiceConfRequestMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,56 @@ | |||
package org.bigbluebutton.common.messages; | |||
|
|||
import java.util.HashMap; | |||
import com.google.gson.JsonObject; | |||
import com.google.gson.JsonParser; | |||
|
|||
|
|||
public class StartRecordingVoiceConfRequestMessage { | |||
public static final String START_RECORD_VOICE_CONF_REQUEST = "start_recording__voice_conf_request_message"; | |||
public static final String VERSION = "0.0.1"; | |||
|
|||
public static final String MEETING_ID = "meeting_id"; | |||
public static final String VOICE_CONF_ID = "voice_conf_id"; | |||
|
|||
public final String meetingId; | |||
public final String voiceConfId; | |||
|
|||
public StartRecordingVoiceConfRequestMessage(String meetingId, String voiceConfId) { | |||
this.meetingId = meetingId; | |||
this.voiceConfId = voiceConfId; | |||
} | |||
|
|||
public String toJson() { | |||
HashMap<String, Object> payload = new HashMap<String, Object>(); | |||
payload.put(MEETING_ID, meetingId); | |||
payload.put(VOICE_CONF_ID, voiceConfId); | |||
|
|||
java.util.HashMap<String, Object> header = MessageBuilder.buildHeader(START_RECORD_VOICE_CONF_REQUEST, VERSION, null); | |||
|
|||
return MessageBuilder.buildJson(header, payload); | |||
} | |||
|
|||
public static StartRecordingVoiceConfRequestMessage fromJson(String message) { | |||
JsonParser parser = new JsonParser(); | |||
JsonObject obj = (JsonObject) parser.parse(message); | |||
|
|||
if (obj.has("header") && obj.has("payload")) { | |||
JsonObject header = (JsonObject) obj.get("header"); | |||
JsonObject payload = (JsonObject) obj.get("payload"); | |||
|
|||
if (header.has("name")) { | |||
String messageName = header.get("name").getAsString(); | |||
if (START_RECORD_VOICE_CONF_REQUEST.equals(messageName)) { | |||
if (payload.has(MEETING_ID) | |||
&& payload.has(VOICE_CONF_ID)) { | |||
String id = payload.get(MEETING_ID).getAsString(); | |||
String voiceConfId = payload.get(VOICE_CONF_ID).getAsString(); | |||
return new StartRecordingVoiceConfRequestMessage(id, voiceConfId); | |||
} | |||
} | |||
} | |||
} | |||
return null; | |||
|
|||
} | |||
} |
Oops, something went wrong.