diff options
author | Damian Minkov <damencho@jitsi.org> | 2015-02-05 14:58:57 +0200 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2015-02-10 13:01:54 +0200 |
commit | e25de5721762b8d08c4ff75584e8f46a138aaa49 (patch) | |
tree | 52c64d5453edfd3fd7ee0e3b2f7c4ceeb949877e /src/net/java/sip/communicator/service | |
parent | 8fb59e2b9506a528379937c3b178669fd90012a5 (diff) | |
download | jitsi-e25de5721762b8d08c4ff75584e8f46a138aaa49.zip jitsi-e25de5721762b8d08c4ff75584e8f46a138aaa49.tar.gz jitsi-e25de5721762b8d08c4ff75584e8f46a138aaa49.tar.bz2 |
Adds fireCallEvent by CallEvent, so it can be overridden and a custom CallEvent to be used.
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java index f41ddaf..ceab757 100644 --- a/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/media/AbstractOperationSetBasicTelephony.java @@ -152,7 +152,18 @@ public abstract class AbstractOperationSetBasicTelephony Call sourceCall, Map<MediaType, MediaDirection> mediaDirections) { - CallEvent event = new CallEvent(sourceCall, eventID, mediaDirections); + fireCallEvent(new CallEvent(sourceCall, eventID, mediaDirections)); + } + + /** + * Creates and dispatches a <tt>CallEvent</tt> notifying registered + * listeners that an event with id <tt>eventID</tt> has occurred on + * <tt>sourceCall</tt>. + * + * @param event the event to dispatch + */ + public void fireCallEvent(CallEvent event) + { List<CallListener> listeners; synchronized (callListeners) @@ -176,7 +187,7 @@ public abstract class AbstractOperationSetBasicTelephony "Dispatching a CallEvent to " + listener.getClass() + " . The event is: "+ event); - switch (eventID) + switch (event.getEventID()) { case CallEvent.CALL_INITIATED: listener.outgoingCallCreated(event); |