public class CallManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
CallManager.DetailsResolveListener
A listener that will be notified for found source contacts details.
|
static class |
CallManager.GuiCallListener
A CallListener.
|
Constructor and Description |
---|
CallManager() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addressesAreEqual(java.lang.String a,
java.lang.String b)
Determines whether two specific addresses refer to one and the same
peer/resource/contact.
|
static void |
answerCall(Call call)
Answers the given call.
|
static void |
answerCallInFirstExistingCall(Call call)
Answers the given call in an existing call.
|
static void |
answerVideoCall(Call call)
Answers the given call with video.
|
static void |
assertIsEventDispatchingThread()
Throws a RuntimeException if the current thread is not the AWT
event dispatching thread.
|
static void |
call(Contact contact,
boolean isVideo,
boolean isDesktop,
boolean shareRegion)
A particular contact has been selected no options to select
will just call it.
|
static void |
call(Contact contact,
ContactResource contactResource,
boolean isVideo,
boolean isDesktop,
boolean shareRegion)
A particular contact has been selected no options to select
will just call it.
|
static void |
call(java.util.List<UIContactDetail> uiContactDetailList,
UIContactImpl uiContact,
boolean isVideo,
boolean isDesktop,
javax.swing.JComponent invoker,
java.awt.Point location)
Call any of the supplied details.
|
static void |
call(MetaContact metaContact,
boolean isVideo,
boolean isDesktop,
boolean shareRegion)
Creates a call for the default contact of the metacontact
|
static void |
call(ProtocolProviderService protocolProvider,
ConferenceDescription conferenceDescription,
ChatRoom chatRoom)
Creates a call to the conference described in
conferenceDescription through protocolProvider
|
static void |
call(java.lang.String phone,
boolean isVideo,
boolean isDesktop,
boolean shareRegion)
Calls a phone showing a dialog to choose a provider.
|
static void |
call(java.lang.String phone,
UIContactImpl uiContact,
boolean isVideo,
boolean isDesktop,
boolean shareRegion)
Calls a phone showing a dialog to choose a provider.
|
static void |
call(UIContact uiContact,
boolean isVideo,
boolean isDesktop,
javax.swing.JComponent invoker,
java.awt.Point location)
Call the ui contact.
|
(package private) static void |
createCall(java.lang.Class<? extends OperationSet> opSetClass,
ProtocolProviderService protocolProviderService,
java.lang.String contact)
Creates a call for the supplied operation set.
|
(package private) static void |
createCall(java.lang.Class<? extends OperationSet> opSetClass,
ProtocolProviderService protocolProviderService,
java.lang.String contact,
UIContactImpl uiContact)
Creates a call for the supplied operation set.
|
static void |
createCall(ProtocolProviderService protocolProvider,
java.lang.String contact)
Creates a call to the contact represented by the given string.
|
static void |
createCall(ProtocolProviderService protocolProvider,
java.lang.String contact,
UIContactImpl uiContact)
Creates a call to the contact represented by the given string.
|
static void |
createCall(java.lang.String callString,
javax.swing.JComponent c)
Creates a call to the given call string.
|
static void |
createCall(java.lang.String callString,
javax.swing.JComponent c,
CallInterfaceListener l)
Creates a call to the given call string.
|
static void |
createConferenceCall(java.util.Map<ProtocolProviderService,java.util.List<java.lang.String>> callees)
Asynchronously creates a new conference Call with a specific
list of participants/callees.
|
static void |
createConferenceCall(java.lang.String[] callees,
ProtocolProviderService protocolProvider)
Creates a call to the given list of contacts.
|
static void |
createJitsiVideobridgeConfCall(ProtocolProviderService callProvider,
java.lang.String[] callees)
Asynchronously creates a new video bridge conference Call with
a specific list of participants/callees.
|
static void |
createRegionDesktopSharing(ProtocolProviderService protocolProvider,
java.lang.String contact,
UIContactImpl uiContact,
int x,
int y,
int width,
int height)
Creates a desktop sharing call to the contact represented by the given
string.
|
static void |
createVideoCall(ProtocolProviderService protocolProvider,
java.lang.String contact)
Creates a video call to the contact represented by the given string.
|
static void |
createVideoCall(ProtocolProviderService protocolProvider,
java.lang.String contact,
UIContactImpl uiContact)
Creates a video call to the contact represented by the given string.
|
static void |
enableDesktopRemoteControl(CallPeer callPeer,
boolean isEnable)
Enables/disables remote control when in a desktop sharing session with
the given callPeer.
|
static void |
enableDesktopSharing(Call call,
boolean enable)
Enables the desktop sharing in an existing call.
|
static void |
enableLocalVideo(Call call,
boolean enable)
Enables/disables local video for a specific Call.
|
static void |
enableRegionDesktopSharing(Call call,
boolean enable)
Enables the region desktop sharing for the given call.
|
static void |
enableRegionDesktopSharing(Call call,
int x,
int y,
int width,
int height)
Creates a desktop sharing call to the contact represented by the given
string.
|
static CallPanel |
getActiveCallContainer(Call call)
Returns the CallContainer corresponding to the given
call.
|
static UIContactImpl |
getCallUIContact(Call call)
Returns the MetaContact, to which the given Call
was initially created.
|
static Contact |
getIMCapableCusaxContact(CallPeer peer)
Searches the cusax enabled providers for a contact with
the detail (address) of the call peer if found and the contact
is provided by a provider which is IM capable, return the contact.
|
static java.util.Collection<Call> |
getInProgressCalls()
Returns a collection of all currently in progress calls.
|
static java.lang.String |
getPeerDisplayName(CallPeer peer,
CallManager.DetailsResolveListener listener)
A informative text to show for the peer.
|
static byte[] |
getPeerImage(CallPeer peer)
Returns the image corresponding to the given peer.
|
static MetaContact |
getPeerMetaContact(CallPeer peer)
Returns the metacontact for the given CallPeer by
checking the if the callPeer contact exists, if not checks the
contacts in our contact list that are provided by cusax enabled
providers.
|
static java.util.List<ProtocolProviderService> |
getTelephonyConferencingProviders()
Returns a list of all currently registered telephony providers supporting
conferencing.
|
static java.util.List<ProtocolProviderService> |
getTelephonyProviders()
Returns a list of all currently registered telephony providers.
|
static void |
hangupCall(Call call)
Hang ups the given call.
|
static void |
hangupCallPeer(CallPeer peer)
Hang ups the given callPeer.
|
static void |
hangupCalls(CallConference conference)
Asynchronously hangs up the Calls participating in a specific
CallConference.
|
static void |
inviteToConferenceCall(java.util.Map<ProtocolProviderService,java.util.List<java.lang.String>> callees,
Call call)
Invites the given list of callees to the given conference
call.
|
static void |
inviteToConferenceCall(java.util.Map<ProtocolProviderService,java.util.List<java.lang.String>> callees,
CallConference conference)
Invites specific callees to a specific telephony conference.
|
static void |
inviteToConferenceCall(java.lang.String[] callees,
Call call)
Invites the given list of callees to the given conference
call.
|
static void |
inviteToJitsiVideobridgeConfCall(java.lang.String[] callees,
Call call)
Invites the given list of callees to the given conference
call.
|
static boolean |
isDesktopSharingEnabled(Call call)
Indicates if the desktop sharing is currently enabled for the given
call.
|
static boolean |
isLocalUser(ConferenceMember conferenceMember)
Indicates if the given ConferenceMember corresponds to the local
user.
|
static boolean |
isLocalVideoEnabled(Call call)
Indicates if the desktop sharing is currently enabled for the given
call.
|
static boolean |
isRegionDesktopSharingEnabled(Call call)
Indicates if the desktop sharing is currently enabled for the given
call.
|
static boolean |
isVideoQualityPresetSupported(CallPeer callPeer)
Checks whether the callPeer supports setting video
quality presets.
|
static boolean |
isVideoStreaming(Call call)
Indicates if we have video streams to show in this interface.
|
static boolean |
isVideoStreaming(CallConference conference)
Indicates if we have video streams to show in this interface.
|
static void |
mergeExistingCalls(CallConference conference,
java.util.Collection<Call> calls)
Merges specific existing Calls into a specific telephony
conference.
|
static void |
openCallTransferDialog(CallPeer peer)
Opens a call transfer dialog to transfer the given peer.
|
static void |
putOnHold(CallPeer callPeer,
boolean isOnHold)
Puts on or off hold the given callPeer.
|
static void |
setVideoQualityPreset(CallPeer callPeer,
org.jitsi.service.neomedia.QualityPreset qualityPreset)
Sets the given quality preset for the video of the given call peer.
|
static void |
transferCall(CallPeer peer,
CallPeer target)
Transfers the given peer to the given target.
|
static void |
transferCall(CallPeer peer,
java.lang.String target)
Transfers the given peer to the given target.
|
public static void answerCall(Call call)
call
- the call to answerpublic static void answerCallInFirstExistingCall(Call call)
call
- the call to answerpublic static void mergeExistingCalls(CallConference conference, java.util.Collection<Call> calls)
conference
- the conferencecalls
- list of callspublic static void answerVideoCall(Call call)
call
- the call to answerpublic static void hangupCall(Call call)
call
- the call to hang uppublic static void hangupCallPeer(CallPeer peer)
peer
- the CallPeer to hang uppublic static void hangupCalls(CallConference conference)
conference
- the CallConference whose participating
Calls are to be hanged uppublic static void createCall(ProtocolProviderService protocolProvider, java.lang.String contact)
protocolProvider
- the protocol provider to which this call belongs.contact
- the contact to call topublic static void createCall(ProtocolProviderService protocolProvider, java.lang.String contact, UIContactImpl uiContact)
protocolProvider
- the protocol provider to which this call belongs.contact
- the contact to call touiContact
- the meta contact we're callingpublic static void createVideoCall(ProtocolProviderService protocolProvider, java.lang.String contact)
protocolProvider
- the protocol provider to which this call belongs.contact
- the contact to call topublic static void createVideoCall(ProtocolProviderService protocolProvider, java.lang.String contact, UIContactImpl uiContact)
protocolProvider
- the protocol provider to which this call belongs.contact
- the contact to call touiContact
- the UIContactImpl we're callingpublic static void enableLocalVideo(Call call, boolean enable)
call
- the Call to enable/disable to local video forenable
- true to enable the local video; otherwise,
falsepublic static boolean isLocalVideoEnabled(Call call)
call
- the Call, for which we would to check if the desktop
sharing is currently enabledpublic static void createRegionDesktopSharing(ProtocolProviderService protocolProvider, java.lang.String contact, UIContactImpl uiContact, int x, int y, int width, int height)
protocolProvider
- the protocol provider to which this call belongs.contact
- the contact to call touiContact
- the MetaContact we're callingx
- the x coordinate of the shared regiony
- the y coordinated of the shared regionwidth
- the width of the shared regionheight
- the height of the shared regionpublic static void enableDesktopSharing(Call call, boolean enable)
call
- the call for which desktop sharing should be enabledenable
- indicates if the desktop sharing should be enabled or
disabledpublic static void enableRegionDesktopSharing(Call call, boolean enable)
call
- the call, for which the region desktop sharing should be
enabledenable
- indicates if the desktop sharing should be enabled or
disabledpublic static void enableRegionDesktopSharing(Call call, int x, int y, int width, int height)
call
- the call for which desktop sharing should be enabledx
- the x coordinate of the shared regiony
- the y coordinated of the shared regionwidth
- the width of the shared regionheight
- the height of the shared regionpublic static boolean isDesktopSharingEnabled(Call call)
call
- the Call, for which we would to check if the desktop
sharing is currently enabledpublic static boolean isRegionDesktopSharingEnabled(Call call)
call
- the Call, for which we would to check if the desktop
sharing is currently enabledpublic static void enableDesktopRemoteControl(CallPeer callPeer, boolean isEnable)
callPeer
- the call peer for which we enable/disable remote controlisEnable
- indicates if the remote control should be enabledpublic static void createCall(java.lang.String callString, javax.swing.JComponent c)
callString
- the string to callc
- the component, which indicates where should be shown the "call
via" menu if neededpublic static void createCall(java.lang.String callString, javax.swing.JComponent c, CallInterfaceListener l)
callString
- the string to callc
- the component, which indicates where should be shown the "call
via" menu if neededl
- listener that is notified when the call interface has been
started after call was createdpublic static void createConferenceCall(java.lang.String[] callees, ProtocolProviderService protocolProvider)
protocolProvider
- the protocol provider to which this call belongs.callees
- the list of contacts to call topublic static void inviteToConferenceCall(java.lang.String[] callees, Call call)
callees
- the list of contacts to invitecall
- the protocol provider to which this call belongspublic static void inviteToConferenceCall(java.util.Map<ProtocolProviderService,java.util.List<java.lang.String>> callees, Call call)
callees
- the list of contacts to invitecall
- existing callpublic static void inviteToConferenceCall(java.util.Map<ProtocolProviderService,java.util.List<java.lang.String>> callees, CallConference conference)
callees
- the list of contacts to inviteconference
- the telephony conference to invite the specified
callees intopublic static void createConferenceCall(java.util.Map<ProtocolProviderService,java.util.List<java.lang.String>> callees)
callees
- the list of participants/callees to invite to a
newly-created conference Callpublic static void createJitsiVideobridgeConfCall(ProtocolProviderService callProvider, java.lang.String[] callees)
callProvider
- the ProtocolProviderService to use for
creating the callcallees
- the list of participants/callees to invite to the
newly-created video bridge conference Callpublic static void inviteToJitsiVideobridgeConfCall(java.lang.String[] callees, Call call)
callees
- the list of contacts to invitecall
- the protocol provider to which this call belongspublic static void putOnHold(CallPeer callPeer, boolean isOnHold)
callPeer
- the peer to put on/off holdisOnHold
- indicates the action (on hold or off hold)public static void transferCall(CallPeer peer, CallPeer target)
peer
- the CallPeer to transfertarget
- the CallPeer target to transfer topublic static void transferCall(CallPeer peer, java.lang.String target)
peer
- the CallPeer to transfertarget
- the target of the transferpublic static java.util.List<ProtocolProviderService> getTelephonyProviders()
public static java.util.List<ProtocolProviderService> getTelephonyConferencingProviders()
public static java.util.Collection<Call> getInProgressCalls()
public static CallPanel getActiveCallContainer(Call call)
call
- the Call, which dialog we're looking forpublic static java.lang.String getPeerDisplayName(CallPeer peer, CallManager.DetailsResolveListener listener)
peer
- the peer.listener
- the listener to fire change events for later resolutions
of display name and image, if exist.public static byte[] getPeerImage(CallPeer peer)
peer
- the call peer, for which we're returning an imagepublic static Contact getIMCapableCusaxContact(CallPeer peer)
peer
- the peer we are calling.public static MetaContact getPeerMetaContact(CallPeer peer)
peer
- the CallPeer to check in contact detailspublic static void openCallTransferDialog(CallPeer peer)
peer
- the CallPeer to transferpublic static boolean isVideoQualityPresetSupported(CallPeer callPeer)
callPeer
- the peer, which video quality we're checkingpublic static void setVideoQualityPreset(CallPeer callPeer, org.jitsi.service.neomedia.QualityPreset qualityPreset)
callPeer
- the peer, which video quality we're settingqualityPreset
- the new quality settingspublic static boolean isVideoStreaming(Call call)
call
- the call to check for video streamingpublic static boolean isVideoStreaming(CallConference conference)
conference
- the conference we check for video streamingpublic static boolean addressesAreEqual(java.lang.String a, java.lang.String b)
Warning: Use the functionality sparingly because it assumes that an unspecified service is equal to any service.
a
- one of the addresses to be comparedb
- the other address to be compared to apublic static boolean isLocalUser(ConferenceMember conferenceMember)
conferenceMember
- the conference member to checkpublic static UIContactImpl getCallUIContact(Call call)
call
- the Call, which corresponding MetaContact
we're looking forpublic static void assertIsEventDispatchingThread()
static void createCall(java.lang.Class<? extends OperationSet> opSetClass, ProtocolProviderService protocolProviderService, java.lang.String contact)
opSetClass
- the operation set to use to create call.protocolProviderService
- the protocol providercontact
- the contact address to callstatic void createCall(java.lang.Class<? extends OperationSet> opSetClass, ProtocolProviderService protocolProviderService, java.lang.String contact, UIContactImpl uiContact)
opSetClass
- the operation set to use to create call.protocolProviderService
- the protocol providercontact
- the contact address to calluiContact
- the MetaContact we're callingpublic static void call(MetaContact metaContact, boolean isVideo, boolean isDesktop, boolean shareRegion)
metaContact
- the metacontact that will be called.isVideo
- if true will create video call.isDesktop
- if true will share the desktop.shareRegion
- if true will share a region of the desktop.public static void call(Contact contact, ContactResource contactResource, boolean isVideo, boolean isDesktop, boolean shareRegion)
contact
- the contact to callcontactResource
- the specific contact resourceisVideo
- is video enabledisDesktop
- is desktop sharing enabledshareRegion
- is sharing the whole desktop or just a region.public static void call(ProtocolProviderService protocolProvider, ConferenceDescription conferenceDescription, ChatRoom chatRoom)
protocolProvider
- the protocol provider through which to create
the callconferenceDescription
- the description of the conference to callchatRoom
- the chat room associated with the call.public static void call(Contact contact, boolean isVideo, boolean isDesktop, boolean shareRegion)
contact
- the contact to callisVideo
- is video enabledisDesktop
- is desktop sharing enabledshareRegion
- is sharing the whole desktop or just a region.public static void call(java.lang.String phone, boolean isVideo, boolean isDesktop, boolean shareRegion)
phone
- phone to callisVideo
- if true will create video call.isDesktop
- if true will share the desktop.shareRegion
- if true will share a region of the desktop.public static void call(java.lang.String phone, UIContactImpl uiContact, boolean isVideo, boolean isDesktop, boolean shareRegion)
phone
- phone to calluiContact
- the UIContactImpl we're callingisVideo
- if true will create video call.isDesktop
- if true will share the desktop.shareRegion
- if true will share a region of the desktop.public static void call(java.util.List<UIContactDetail> uiContactDetailList, UIContactImpl uiContact, boolean isVideo, boolean isDesktop, javax.swing.JComponent invoker, java.awt.Point location)
uiContactDetailList
- the list with details to choose for callinguiContact
- the UIContactImpl to check what is enabled,
available.isVideo
- if true will create video call.isDesktop
- if true will share the desktop.invoker
- the invoker componentlocation
- the location where this was invoked.public static void call(UIContact uiContact, boolean isVideo, boolean isDesktop, javax.swing.JComponent invoker, java.awt.Point location)
uiContact
- the contact to call.isVideo
- if true will create video call.isDesktop
- if true will share the desktop.invoker
- the invoker componentlocation
- the location where this was invoked.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.