C# Class OpenMetaverse.Voice.VoiceGateway

Afficher le fichier Open project: 3di/3di-viewer-rei-libs Class Usage Examples

Protected Properties

Свойство Type Description
daemonIsConnected bool
daemonIsRunning bool
daemonLoopSignal ManualResetEvent
daemonPipe TCPPipe
daemonProcess Process
requestId int

Méthodes publiques

Méthode Description
AccountLogin ( string ConnectorHandle, string AccountName, string AccountPassword, string AudioSessionAnswerMode, string AccountURI, int ParticipantPropertyFrequency, bool EnableBuddiesAndPresence ) : int

This is used to login a specific user account(s). It may only be called after Connector initialization has completed successfully

AccountLogout ( string AccountHandle ) : int

This is used to logout a user session. It should only be called with a valid AccountHandle.

AuxCaptureAudioStart ( int Duration ) : int

This command is used to start the audio capture process which will cause AuxAudioProperty Events to be raised. These events can be used to display a microphone VU meter for the currently selected capture device. This command should not be issued if the user is on a call.

AuxCaptureAudioStop ( ) : int

This command is used to stop the audio capture process.

AuxGetCaptureDevices ( ) : int

This is used to get a list of audio devices that can be used for capture (input) of voice.

AuxGetRenderDevices ( ) : int

This is used to get a list of audio devices that can be used for render (playback) of voice.

AuxSetCaptureDevice ( string CaptureDeviceSpecifier ) : int

This command is used to select the capture device.

AuxSetMicLevel ( int Level ) : int

This command is used to set the mic volume while in the audio tuning process. Once an acceptable mic level is attained, the application must issue a connector set mic volume command to have that level be used while on voice calls.

AuxSetRenderDevice ( string RenderDeviceSpecifier ) : int

This command is used to select the render device.

AuxSetSpeakerLevel ( int Level ) : int

This command is used to set the speaker volume while in the audio tuning process. Once an acceptable speaker level is attained, the application must issue a connector set speaker volume command to have that level be used while on voice calls.

ConnectToDaemon ( string address, int port ) : bool

ConnectorCreate ( string ClientName, string AccountManagementServer, ushort MinimumPort, ushort MaximumPort, VoiceLoggingSettings Logging ) : int

This is used to initialize and stop the Connector as a whole. The Connector Create call must be completed successfully before any other requests are made (typically during application initialization). The shutdown should be called when the application is shutting down to gracefully release resources

ConnectorInitiateShutdown ( string ConnectorHandle ) : int

Shutdown Connector -- Should be called when the application is shutting down to gracefully release resources

ConnectorMuteLocalMic ( string ConnectorHandle, bool Mute ) : int

Mute or unmute the microphone

ConnectorMuteLocalSpeaker ( string ConnectorHandle, bool Mute ) : int

Mute or unmute the speaker

ConnectorSetLocalMicVolume ( string ConnectorHandle, int Value ) : int

Set microphone volume

ConnectorSetLocalSpeakerVolume ( string ConnectorHandle, int Value ) : int

Set local speaker volume

MakeXML ( string name, string text ) : string
Request ( string action ) : int
Request ( string action, string requestXML ) : int
SessionConnect ( string SessionHandle, string AudioMedia ) : int

Used to accept a call

SessionCreate ( string AccountHandle, string URI, string Name, string Password, bool JoinAudio, bool JoinText, string PasswordHashAlgorithm ) : int

Create a Session Sessions typically represent a connection to a media session with one or more participants. This is used to generate an ‘outbound’ call to another user or channel. The specifics depend on the media types involved. A session handle is required to control the local user functions within the session (or remote users if the current account has rights to do so). Currently creating a session automatically connects to the audio media, there is no need to call Session.Connect at this time, this is reserved for future use.

SessionRenderAudioStart ( string SoundFilePath, bool Loop ) : int

This command is used to start the audio render process, which will then play the passed in file through the selected audio render device. This command should not be issued if the user is on a call.

SessionRenderAudioStop ( string SoundFilePath ) : int

This command is used to stop the audio render process.

SessionSet3DPosition ( string SessionHandle, OpenMetaverse.Voice.VoicePosition SpeakerPosition, OpenMetaverse.Voice.VoicePosition ListenerPosition ) : int

Set the combined speaking and listening position in 3D space. There appears to be no response to this request.

SessionSetParticipantVolumeForMe ( string SessionHandle, string ParticipantURI, int Volume ) : int

Set User Volume for a particular user. Does not affect how other users hear that user.

SessionTerminate ( string SessionHandle ) : int

This is used to ‘end’ an established session (i.e. hang-up or disconnect).

StartDaemon ( string path, string args ) : void

Starts a thread that keeps the daemon running

StopDaemon ( ) : void

Stops the daemon and the thread keeping it running

Private Methods

Méthode Description
daemonPipe_OnReceiveLine ( string line ) : void

Method Details

AccountLogin() public méthode

This is used to login a specific user account(s). It may only be called after Connector initialization has completed successfully
public AccountLogin ( string ConnectorHandle, string AccountName, string AccountPassword, string AudioSessionAnswerMode, string AccountURI, int ParticipantPropertyFrequency, bool EnableBuddiesAndPresence ) : int
ConnectorHandle string Handle returned from successful Connector ‘create’ request
AccountName string User's account name
AccountPassword string User's account password
AudioSessionAnswerMode string Values may be “AutoAnswer” or “VerifyAnswer”
AccountURI string ""
ParticipantPropertyFrequency int This is an integer that specifies how often /// the daemon will send participant property events while in a channel. If this is not set /// the default will be “on state change”, which means that the events will be sent when /// the participant starts talking, stops talking, is muted, is unmuted. /// The valid values are: /// 0 – Never /// 5 – 10 times per second /// 10 – 5 times per second /// 50 – 1 time per second /// 100 – on participant state change (this is the default)
EnableBuddiesAndPresence bool false
Résultat int

AccountLogout() public méthode

This is used to logout a user session. It should only be called with a valid AccountHandle.
public AccountLogout ( string AccountHandle ) : int
AccountHandle string Handle returned from successful Connector ‘login’ request
Résultat int

AuxCaptureAudioStart() public méthode

This command is used to start the audio capture process which will cause AuxAudioProperty Events to be raised. These events can be used to display a microphone VU meter for the currently selected capture device. This command should not be issued if the user is on a call.
public AuxCaptureAudioStart ( int Duration ) : int
Duration int (unused but required)
Résultat int

AuxCaptureAudioStop() public méthode

This command is used to stop the audio capture process.
public AuxCaptureAudioStop ( ) : int
Résultat int

AuxGetCaptureDevices() public méthode

This is used to get a list of audio devices that can be used for capture (input) of voice.
public AuxGetCaptureDevices ( ) : int
Résultat int

AuxGetRenderDevices() public méthode

This is used to get a list of audio devices that can be used for render (playback) of voice.
public AuxGetRenderDevices ( ) : int
Résultat int

AuxSetCaptureDevice() public méthode

This command is used to select the capture device.
public AuxSetCaptureDevice ( string CaptureDeviceSpecifier ) : int
CaptureDeviceSpecifier string The name of the device as returned by the Aux.GetCaptureDevices command.
Résultat int

AuxSetMicLevel() public méthode

This command is used to set the mic volume while in the audio tuning process. Once an acceptable mic level is attained, the application must issue a connector set mic volume command to have that level be used while on voice calls.
public AuxSetMicLevel ( int Level ) : int
Level int the microphone volume (-100 to 100 inclusive)
Résultat int

AuxSetRenderDevice() public méthode

This command is used to select the render device.
public AuxSetRenderDevice ( string RenderDeviceSpecifier ) : int
RenderDeviceSpecifier string The name of the device as returned by the Aux.GetRenderDevices command.
Résultat int

AuxSetSpeakerLevel() public méthode

This command is used to set the speaker volume while in the audio tuning process. Once an acceptable speaker level is attained, the application must issue a connector set speaker volume command to have that level be used while on voice calls.
public AuxSetSpeakerLevel ( int Level ) : int
Level int the speaker volume (-100 to 100 inclusive)
Résultat int

ConnectToDaemon() public méthode

public ConnectToDaemon ( string address, int port ) : bool
address string
port int
Résultat bool

ConnectorCreate() public méthode

This is used to initialize and stop the Connector as a whole. The Connector Create call must be completed successfully before any other requests are made (typically during application initialization). The shutdown should be called when the application is shutting down to gracefully release resources
public ConnectorCreate ( string ClientName, string AccountManagementServer, ushort MinimumPort, ushort MaximumPort, VoiceLoggingSettings Logging ) : int
ClientName string A string value indicting the Application name
AccountManagementServer string URL for the management server
MinimumPort ushort
MaximumPort ushort
Logging VoiceLoggingSettings LoggingSettings
Résultat int

ConnectorInitiateShutdown() public méthode

Shutdown Connector -- Should be called when the application is shutting down to gracefully release resources
public ConnectorInitiateShutdown ( string ConnectorHandle ) : int
ConnectorHandle string Handle returned from successful Connector ‘create’ request
Résultat int

ConnectorMuteLocalMic() public méthode

Mute or unmute the microphone
public ConnectorMuteLocalMic ( string ConnectorHandle, bool Mute ) : int
ConnectorHandle string Handle returned from successful Connector ‘create’ request
Mute bool true (mute) or false (unmute)
Résultat int

ConnectorMuteLocalSpeaker() public méthode

Mute or unmute the speaker
public ConnectorMuteLocalSpeaker ( string ConnectorHandle, bool Mute ) : int
ConnectorHandle string Handle returned from successful Connector ‘create’ request
Mute bool true (mute) or false (unmute)
Résultat int

ConnectorSetLocalMicVolume() public méthode

Set microphone volume
public ConnectorSetLocalMicVolume ( string ConnectorHandle, int Value ) : int
ConnectorHandle string Handle returned from successful Connector ‘create’ request
Value int The level of the audio, a number between -100 and 100 where /// 0 represents ‘normal’ speaking volume
Résultat int

ConnectorSetLocalSpeakerVolume() public méthode

Set local speaker volume
public ConnectorSetLocalSpeakerVolume ( string ConnectorHandle, int Value ) : int
ConnectorHandle string Handle returned from successful Connector ‘create’ request
Value int The level of the audio, a number between -100 and 100 where /// 0 represents ‘normal’ speaking volume
Résultat int

MakeXML() public static méthode

public static MakeXML ( string name, string text ) : string
name string
text string
Résultat string

Request() public méthode

public Request ( string action ) : int
action string
Résultat int

Request() public méthode

public Request ( string action, string requestXML ) : int
action string
requestXML string
Résultat int

SessionConnect() public méthode

Used to accept a call
public SessionConnect ( string SessionHandle, string AudioMedia ) : int
SessionHandle string SessionHandle such as received from SessionNewEvent
AudioMedia string "default"
Résultat int

SessionCreate() public méthode

Create a Session Sessions typically represent a connection to a media session with one or more participants. This is used to generate an ‘outbound’ call to another user or channel. The specifics depend on the media types involved. A session handle is required to control the local user functions within the session (or remote users if the current account has rights to do so). Currently creating a session automatically connects to the audio media, there is no need to call Session.Connect at this time, this is reserved for future use.
public SessionCreate ( string AccountHandle, string URI, string Name, string Password, bool JoinAudio, bool JoinText, string PasswordHashAlgorithm ) : int
AccountHandle string Handle returned from successful Connector ‘create’ request
URI string This is the URI of the terminating point of the session (ie who/what is being called)
Name string This is the display name of the entity being called (user or channel)
Password string Only needs to be supplied when the target URI is password protected
JoinAudio bool
JoinText bool
PasswordHashAlgorithm string This indicates the format of the password as passed in. This can either be /// “ClearText” or “SHA1UserName”. If this element does not exist, it is assumed to be “ClearText”. If it is /// “SHA1UserName”, the password as passed in is the SHA1 hash of the password and username concatenated together, /// then base64 encoded, with the final “=” character stripped off.
Résultat int

SessionRenderAudioStart() public méthode

This command is used to start the audio render process, which will then play the passed in file through the selected audio render device. This command should not be issued if the user is on a call.
public SessionRenderAudioStart ( string SoundFilePath, bool Loop ) : int
SoundFilePath string The fully qualified path to the sound file.
Loop bool True if the file is to be played continuously and false if it is should be played once.
Résultat int

SessionRenderAudioStop() public méthode

This command is used to stop the audio render process.
public SessionRenderAudioStop ( string SoundFilePath ) : int
SoundFilePath string The fully qualified path to the sound file issued in the start render command.
Résultat int

SessionSet3DPosition() public méthode

Set the combined speaking and listening position in 3D space. There appears to be no response to this request.
public SessionSet3DPosition ( string SessionHandle, OpenMetaverse.Voice.VoicePosition SpeakerPosition, OpenMetaverse.Voice.VoicePosition ListenerPosition ) : int
SessionHandle string Handle returned from successful Session ‘create’ request or a SessionNewEvent
SpeakerPosition OpenMetaverse.Voice.VoicePosition Speaking position
ListenerPosition OpenMetaverse.Voice.VoicePosition Listening position
Résultat int

SessionSetParticipantVolumeForMe() public méthode

Set User Volume for a particular user. Does not affect how other users hear that user.
public SessionSetParticipantVolumeForMe ( string SessionHandle, string ParticipantURI, int Volume ) : int
SessionHandle string Handle returned from successful Session ‘create’ request or a SessionNewEvent
ParticipantURI string
Volume int The level of the audio, a number between -100 and 100 where 0 represents ‘normal’ speaking volume
Résultat int

SessionTerminate() public méthode

This is used to ‘end’ an established session (i.e. hang-up or disconnect).
public SessionTerminate ( string SessionHandle ) : int
SessionHandle string Handle returned from successful Session ‘create’ request or a SessionNewEvent
Résultat int

StartDaemon() public méthode

Starts a thread that keeps the daemon running
public StartDaemon ( string path, string args ) : void
path string
args string
Résultat void

StopDaemon() public méthode

Stops the daemon and the thread keeping it running
public StopDaemon ( ) : void
Résultat void

Property Details

daemonIsConnected protected_oe property

protected bool daemonIsConnected
Résultat bool

daemonIsRunning protected_oe property

protected bool daemonIsRunning
Résultat bool

daemonLoopSignal protected_oe property

protected ManualResetEvent daemonLoopSignal
Résultat ManualResetEvent

daemonPipe protected_oe property

protected TCPPipe,OpenMetaverse.Voice daemonPipe
Résultat TCPPipe

daemonProcess protected_oe property

protected Process daemonProcess
Résultat Process

requestId protected_oe property

protected int requestId
Résultat int