C# Class OpenMetaverse.Voice.VoiceGateway

Datei anzeigen Open project: 3di/3di-viewer-rei-libs Class Usage Examples

Protected Properties

Property Type Description
daemonIsConnected bool
daemonIsRunning bool
daemonLoopSignal ManualResetEvent
daemonPipe TCPPipe
daemonProcess Process
requestId int

Public Methods

Method 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

Method Description
daemonPipe_OnReceiveLine ( string line ) : void

Method Details

AccountLogin() public method

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
return int

AccountLogout() public method

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
return int

AuxCaptureAudioStart() public method

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)
return int

AuxCaptureAudioStop() public method

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

AuxGetCaptureDevices() public method

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

AuxGetRenderDevices() public method

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

AuxSetCaptureDevice() public method

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.
return int

AuxSetMicLevel() public method

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)
return int

AuxSetRenderDevice() public method

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.
return int

AuxSetSpeakerLevel() public method

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)
return int

ConnectToDaemon() public method

public ConnectToDaemon ( string address, int port ) : bool
address string
port int
return bool

ConnectorCreate() public method

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
return int

ConnectorInitiateShutdown() public method

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
return int

ConnectorMuteLocalMic() public method

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)
return int

ConnectorMuteLocalSpeaker() public method

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)
return int

ConnectorSetLocalMicVolume() public method

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
return int

ConnectorSetLocalSpeakerVolume() public method

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
return int

MakeXML() public static method

public static MakeXML ( string name, string text ) : string
name string
text string
return string

Request() public method

public Request ( string action ) : int
action string
return int

Request() public method

public Request ( string action, string requestXML ) : int
action string
requestXML string
return int

SessionConnect() public method

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

SessionCreate() public method

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.
return int

SessionRenderAudioStart() public method

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.
return int

SessionRenderAudioStop() public method

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.
return int

SessionSet3DPosition() public method

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
return int

SessionSetParticipantVolumeForMe() public method

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
return int

SessionTerminate() public method

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
return int

StartDaemon() public method

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

StopDaemon() public method

Stops the daemon and the thread keeping it running
public StopDaemon ( ) : void
return void

Property Details

daemonIsConnected protected_oe property

protected bool daemonIsConnected
return bool

daemonIsRunning protected_oe property

protected bool daemonIsRunning
return bool

daemonLoopSignal protected_oe property

protected ManualResetEvent daemonLoopSignal
return ManualResetEvent

daemonPipe protected_oe property

protected TCPPipe,OpenMetaverse.Voice daemonPipe
return TCPPipe

daemonProcess protected_oe property

protected Process daemonProcess
return Process

requestId protected_oe property

protected int requestId
return int