|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.server.plugins.VoiceClient
public class VoiceClient
Client to communicate with the voice plugin
Field Summary | |
---|---|
static int |
ERROR_GROUP_ALREADY_EXISTS
Error: group already exists |
static int |
ERROR_MEMBER_ALREADY_EXISTS
Error: member already exists in the group |
static int |
ERROR_MISSING_ADD_PROPERTY
Error: we tried perform an operation that requires a boolean "add" property, but didn't find one. |
static int |
ERROR_MISSING_MAX_VOICES
Error: we tried to create a new group but there was no "maxVoices" parm |
static int |
ERROR_MISSING_POSITIONAL
Error: we tried to create a new group but there was no "positional" parm |
static int |
ERROR_NO_SUCH_GROUP
Error: no such group |
static int |
ERROR_NO_SUCH_MEMBER
Error: no such member of the group |
static int |
ERROR_NO_SUCH_OPCODE
Error: the VoicePlugin doesn't understand the message opcode |
static int |
ERROR_PLAYER_NOT_CONNECTED
Error: we tried to add a member who isn't connected to the VoicePlugin. |
static MessageType |
MSG_TYPE_VOICE_MEMBER_ADDED
The MessageType of the message sent by a voice group to notify of addition of a member to the group. |
static MessageType |
MSG_TYPE_VOICE_MEMBER_REMOVED
The MessageType of the message sent by a voice group to notify removal of a member from the group. |
static MessageType |
MSG_TYPE_VOICECLIENT
The ExtensionMessages sent by the VoiceClient all have this type, so that the VoicePlugin(s) don't get deluged with ExtensionMessages intended for other plugins. |
static int |
SUCCESS
An operation with no return value succeeded |
static int |
SUCCESS_FALSE
A boolean operation returned false |
static int |
SUCCESS_TRUE
A boolean operation returned true |
Constructor Summary | |
---|---|
VoiceClient()
|
Method Summary | |
---|---|
static int |
addMember(OID groupOid,
OID memberOid,
int priority,
boolean allowedSpeaker)
Add a member to a group |
int |
addMemberAllowed(OID groupOid,
OID memberOid,
java.lang.String authToken)
Determine if the oid is that of a member of the group. |
static int |
addVoiceGroup(OID oid,
boolean positional,
int maxVoices)
Add a positional voice group. |
static java.lang.String |
errorString(int errorCode)
Translate an error code into a string |
java.util.Set<OID> |
getAllowedMembers(OID groupOid)
Return the allowed members |
static OID |
getPlayerGroup(OID memberOid)
What group does the member belong to? |
static int |
isAllowedSpeaker(OID groupOid,
OID memberOid)
Is the member allowed to speak? |
static int |
isListener(OID groupOid,
OID memberOid)
Is the member listening? |
static int |
isMember(OID groupOid,
OID memberOid)
Find a member in the group by oid. |
static int |
isMemberSpeaking(OID groupOid,
OID memberOid)
Is the member speaking? |
static int |
isPositional(OID groupOid)
Return SUCCESS_TRUE if the group is a positional group; that is, if membership in the group is determined by being near the listener, and the priority of speakers is determined by how near any speaker is. |
protected static WorldManagerClient.ExtensionMessage |
makeVoicePluginMessage(java.lang.String opcode,
OID groupOid)
|
protected static WorldManagerClient.ExtensionMessage |
makeVoicePluginMessage(java.lang.String opcode,
OID groupOid,
OID memberOid)
|
protected static WorldManagerClient.ExtensionMessage |
makeVoicePluginMessage(java.lang.String opcode,
OID groupOid,
OID memberOid,
boolean add)
|
static int |
removeMember(OID groupOid,
OID memberOid)
Remove the member of the group identified by the given oid, and return true if that member was found in the group. |
static int |
removeVoiceGroup(OID groupOid)
Remove a voice group. |
protected static int |
sendAddMemberMessage(OID groupOid,
OID memberOid,
int priority,
boolean allowedSpeaker)
|
protected static int |
sendNewGroupMessage(java.lang.String opcode,
OID groupOid,
boolean positional,
int maxVoices)
|
protected static int |
sendVoicePluginRPC(java.lang.String opcode,
OID groupOid)
|
protected static int |
sendVoicePluginRPC(java.lang.String opcode,
OID groupOid,
OID memberOid)
|
protected static int |
sendVoicePluginRPC(java.lang.String opcode,
OID groupOid,
OID memberOid,
boolean add)
|
int |
setAllowedMembers(OID groupOid,
java.util.Set<OID> allowedMembers)
Supply a list of oids of players allowed to be in the group |
static int |
setAllowedSpeaker(OID groupOid,
OID memberOid,
boolean add)
Change the member with the given oid to be an allowed speaker if add is true, or not an allowed speaker if add is false. |
static int |
setListener(OID groupOid,
OID memberOid,
boolean add)
Change the member with the given oid to be a listener if add is true, or not a listener if add is false. |
static int |
setMemberSpeaking(OID groupOid,
OID memberOid,
boolean add)
Change the member with the given oid, who must be an allowed speaker, to speak if add is true, or to stop speaking, if add is false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static MessageType MSG_TYPE_VOICECLIENT
public static MessageType MSG_TYPE_VOICE_MEMBER_ADDED
public static MessageType MSG_TYPE_VOICE_MEMBER_REMOVED
public static final int SUCCESS
public static final int SUCCESS_TRUE
public static final int SUCCESS_FALSE
public static final int ERROR_NO_SUCH_GROUP
public static final int ERROR_GROUP_ALREADY_EXISTS
public static final int ERROR_NO_SUCH_MEMBER
public static final int ERROR_MEMBER_ALREADY_EXISTS
public static final int ERROR_NO_SUCH_OPCODE
public static final int ERROR_PLAYER_NOT_CONNECTED
public static final int ERROR_MISSING_ADD_PROPERTY
public static final int ERROR_MISSING_MAX_VOICES
public static final int ERROR_MISSING_POSITIONAL
Constructor Detail |
---|
public VoiceClient()
Method Detail |
---|
public static int addVoiceGroup(OID oid, boolean positional, int maxVoices)
oid
- The oid of the voice group to add.positional
- True if the new group is a positional group;
false if it's a non-positional group.maxVoices
- The maximum number of voice channels that may
ever be simultaneously in use by any client.
public static int removeVoiceGroup(OID groupOid)
groupOid
- The oid of the voice group to remove.
public static int isPositional(OID groupOid)
groupOid
- The oid of the voice group.
public int addMemberAllowed(OID groupOid, OID memberOid, java.lang.String authToken)
groupOid
- The oid of the voice group.memberOid
- The oid of possible group member.authToken
- The authentication token for voice connection
for this member.
public int setAllowedMembers(OID groupOid, java.util.Set<OID> allowedMembers)
groupOid
- The oid of the voice group.allowedMembers
- The set of oids of possible group members.
public java.util.Set<OID> getAllowedMembers(OID groupOid)
groupOid
- The oid of the voice group.
public static int addMember(OID groupOid, OID memberOid, int priority, boolean allowedSpeaker)
groupOid
- The oid of the voice group.memberOid
- The oid of the newly-created memberpriority
- The speaking priority that the member should be
assigned; speakers with higher priorities will be heard over
speakers with lower priorities.allowedSpeaker
- True if the new member should be allowed
to speak; false otherwise.
public static int isMember(OID groupOid, OID memberOid)
groupOid
- The oid of the voice group.memberOid
- The oid of the member to find
public static int removeMember(OID groupOid, OID memberOid)
groupOid
- The oid of the voice group.memberOid
- The oid of the member to remove.
public static int isMemberSpeaking(OID groupOid, OID memberOid)
groupOid
- The oid of the voice group.memberOid
- The oid of the member who speaking status should be returned.
public static int isListener(OID groupOid, OID memberOid)
groupOid
- The oid of the voice group.memberOid
- The oid of the member who listening status should be returned.
public static int setAllowedSpeaker(OID groupOid, OID memberOid, boolean add)
groupOid
- The oid of the voice group.memberOid
- The member whose allowed speaker status should
change.add
- If true, make the member an allowed speaker; if
false, stop allowing the member to be a speaker.
public static int setMemberSpeaking(OID groupOid, OID memberOid, boolean add)
groupOid
- The oid of the voice group.memberOid
- The member whose speaking status should
change.add
- If true, make the member a speaker in the group,
if add is True, else stop the member speaking.
public static int setListener(OID groupOid, OID memberOid, boolean add)
groupOid
- The oid of the voice group.memberOid
- The member whose whose status should
change.add
- If true, make the member a listener in the group,
if add is True, else stop the member listening.
public static int isAllowedSpeaker(OID groupOid, OID memberOid)
groupOid
- The oid of the voice group.memberOid
- The oid of the member who allowed speaking status should be returned.
public static OID getPlayerGroup(OID memberOid)
memberOid
- The oid of the member whose groupOid should be returned.
public static java.lang.String errorString(int errorCode)
protected static WorldManagerClient.ExtensionMessage makeVoicePluginMessage(java.lang.String opcode, OID groupOid)
protected static WorldManagerClient.ExtensionMessage makeVoicePluginMessage(java.lang.String opcode, OID groupOid, OID memberOid)
protected static WorldManagerClient.ExtensionMessage makeVoicePluginMessage(java.lang.String opcode, OID groupOid, OID memberOid, boolean add)
protected static int sendNewGroupMessage(java.lang.String opcode, OID groupOid, boolean positional, int maxVoices)
protected static int sendAddMemberMessage(OID groupOid, OID memberOid, int priority, boolean allowedSpeaker)
protected static int sendVoicePluginRPC(java.lang.String opcode, OID groupOid)
protected static int sendVoicePluginRPC(java.lang.String opcode, OID groupOid, OID memberOid)
protected static int sendVoicePluginRPC(java.lang.String opcode, OID groupOid, OID memberOid, boolean add)
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |