From a3eb70a0b35bd81ad7e571df10783189f3b33030 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Mon, 18 Mar 2013 09:16:05 +0000 Subject: [PATCH] Small fixes to various comments. Adds logs when a SIP outgoing call is created and when a Conference-Info IQ is received. --- .../impl/gui/main/call/UIVideoHandler2.java | 4 ++-- .../conference/VideoConferenceCallPanel.java | 3 +++ .../jabber/AbstractCallJabberGTalkImpl.java | 8 +------- .../impl/protocol/jabber/CallJabberImpl.java | 12 ++++-------- ...ationSetTelephonyConferencingJabberImpl.java | 13 +++++++++---- .../sip/OperationSetBasicTelephonySipImpl.java | 2 ++ .../sip/communicator/service/protocol/Call.java | 14 +++++++------- .../service/protocol/CallConference.java | 4 ++-- .../service/protocol/ProtocolNames.java | 17 +++++++++-------- .../service/protocol/media/MediaAwareCall.java | 2 +- .../service/protocol/media/MediaHandler.java | 4 ++-- 11 files changed, 42 insertions(+), 41 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler2.java b/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler2.java index 1fc5bbdde..6f5215d00 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler2.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/UIVideoHandler2.java @@ -185,8 +185,8 @@ protected void localVideoStreamingPropertyChange(PropertyChangeEvent ev) /** * {@inheritDoc} * - * Overrides {@link Observer#notifyObservers(Object)} to force the super to - * notify the added Observers regardless of the changed + * Overrides {@link Observable#notifyObservers(Object)} to force the super + * to notify the added Observers regardless of the changed * state of this Observable which UIVideoHandler2 does not * use at the time of this writing. */ diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java index e934c17b9..82c1751af 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java @@ -583,6 +583,9 @@ else if (cmcParticipant == conferenceMember) } } + /** + * {@inheritDoc} + */ protected ConferenceCallPeerRenderer updateViewFromModel( ConferenceCallPeerRenderer callPeerPanel, CallPeer callPeer) diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/AbstractCallJabberGTalkImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/AbstractCallJabberGTalkImpl.java index 8396734c7..f175e4f98 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/AbstractCallJabberGTalkImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/AbstractCallJabberGTalkImpl.java @@ -29,13 +29,7 @@ public abstract class AbstractCallJabberGTalkImpl private boolean localInputEvtAware = false; /** - * Initializes a new AbstractCallJabberGTalkImpl instance belonging - * to sourceProvider and associated with the jingle session with - * the specified jingleSID or sessionID. If the new - * instance corresponds to an incoming jingle or Google Talk session, then - * the jingleSID or sessionID would come from there. Otherwise, one could - * generate one using {@link JingleIQ#generateSID()} or {@link - * SessionIQ#generateSID()}. + * Initializes a new AbstractCallJabberGTalkImpl instance. * * @param parentOpSet the {@link OperationSetBasicTelephonyJabberImpl} * instance in the context of which this call has been created. diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java index 484423484..9d7b7268f 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java @@ -58,11 +58,7 @@ public class CallJabberImpl colibriStreamConnectors; /** - * Initializes a new CallJabberImpl instance belonging to - * sourceProvider and associated with the jingle session with the - * specified jingleSID. If the new instance corresponds to an - * incoming jingle session, then the jingleSID would come from there. - * Otherwise, one could generate one using {@link JingleIQ#generateSID()}. + * Initializes a new CallJabberImpl instance. * * @param parentOpSet the {@link OperationSetBasicTelephonyJabberImpl} * instance in the context of which this call has been created. @@ -306,7 +302,7 @@ else if (!colibriID.equals(conferenceResponseID)) ColibriConferenceIQ.Content content = colibri.getContent(contentName); ColibriConferenceIQ.Channel localChannel = null; - + if ((content != null) && (content.getChannelCount() > 0)) { localChannel = content.getChannel(0); @@ -525,11 +521,11 @@ public void expireColibriChannels( * PacketExtensions to be added to the session-initiate * {@link JingleIQ} which is to init this CallJabberImpl * - * @return the newly created Call corresponding to + * @return the newly created CallPeerJabberImpl corresponding to * calleeJID. All following state change events will be * delivered through this call peer. * - * @throws OperationFailedException with the corresponding code if we fail + * @throws OperationFailedException with the corresponding code if we fail * to create the call. */ public CallPeerJabberImpl initiateSession( diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java index ce0922f97..290a0d299 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTelephonyConferencingJabberImpl.java @@ -103,10 +103,10 @@ protected void notifyCallPeers(Call call) } /** - * Notifies all CallPeer associated with and established in a - * specific call has occurred + * Notifies a specific CallPeer about changes in the telephony + * conference-related information. * - * @param callPeer the CallPeer + * @param callPeer the CallPeer to notify. */ private void notify(CallPeer callPeer) { @@ -383,7 +383,7 @@ protected CallJabberImpl createOutgoingCall() * Implements the protocol-dependent part of the logic of inviting a callee * to a Call. The protocol-independent part of that logic is * implemented by - * {@link AbstractOperationSetTelephonyConferencing#inviteCalleToCall(String,Call)}. + * {@link AbstractOperationSetTelephonyConferencing#inviteCalleeToCall(String,Call)}. */ protected CallPeer doInviteCalleeToCall( String calleeAddress, @@ -480,7 +480,12 @@ public void processPacket(Packet packet) sid); if (callPeer != null) + { + if (logger.isDebugEnabled()) + logger.debug("Processing COIN from" + coinIQ.getFrom() + + "(version=" + coinIQ.getVersion() + ")"); handleCoin(callPeer, coinIQ); + } } } diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java index 5404cffa1..0e94b528b 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java @@ -166,6 +166,8 @@ private synchronized CallSipImpl createOutgoingCall( throws OperationFailedException { CallSipImpl call = createOutgoingCall(); + if (logger.isInfoEnabled()) + logger.info("Creating outgoing call to " + calleeAddress); if (conference != null) call.setConference(conference); diff --git a/src/net/java/sip/communicator/service/protocol/Call.java b/src/net/java/sip/communicator/service/protocol/Call.java index ebf296fbb..2b81ee153 100644 --- a/src/net/java/sip/communicator/service/protocol/Call.java +++ b/src/net/java/sip/communicator/service/protocol/Call.java @@ -197,7 +197,8 @@ public ProtocolProviderService getProtocolProvider() * * @param sourceCallPeer the source CallPeer for the * newly created event. - * @param eventID the ID of the event to create (see CPE member ints) + * @param eventID the ID of the event to create (see constants defined in + * CallPeerEvent) */ protected void fireCallPeerEvent(CallPeer sourceCallPeer, int eventID) { @@ -433,9 +434,7 @@ public abstract void removeLocalUserSoundLevelListener( /** * Creates a new CallConference instance which is to represent the - * telephony conference-related state of this Call. If the method - * returns non-null reference, this Call will add itself - * to the returned reference via {@link CallConference#addCall(Call)}. + * telephony conference-related state of this Call. * Allows extenders to override and customize the runtime type of the * CallConference to used by this Call. * @@ -480,9 +479,10 @@ public CallConference getConference() /** * Sets the telephony conference-related state of this Call. If the - * invocation modifies this instance, it notifies the registered - * CallChangeListeners with a - * {@link CallChangeEvent#CALL_CONFERENCE_CHANGE} event. + * invocation modifies this instance, it adds this Call to the + * newly set CallConference and fires a + * PropertyChangeEvent for the CONFERENCE property to its + * listeners. * * @param conference the CallConference instance to represent the * telephony conference-related state of this Call diff --git a/src/net/java/sip/communicator/service/protocol/CallConference.java b/src/net/java/sip/communicator/service/protocol/CallConference.java index 23674cc9f..43b9c9caf 100644 --- a/src/net/java/sip/communicator/service/protocol/CallConference.java +++ b/src/net/java/sip/communicator/service/protocol/CallConference.java @@ -49,7 +49,7 @@ public class CallConference * telephony conference-related state * @return the number of CallPeers associated with the * Calls participating in the telephony conference-related state - * of the specified call + * of the specified Call */ public static int getCallPeerCount(Call call) { @@ -199,7 +199,7 @@ protected void onCallPeerConferenceEvent(CallPeerConferenceEvent ev) * The list of CallPeerConferenceListeners added to the * CallPeers associated with the CallPeers participating * in this telephony conference via - * {@link #addCallPeerConferenceListener}. + * {@link #addCallPeerConferenceListener}. */ private final List callPeerConferenceListeners = new LinkedList(); diff --git a/src/net/java/sip/communicator/service/protocol/ProtocolNames.java b/src/net/java/sip/communicator/service/protocol/ProtocolNames.java index d245071b8..b3e741ac9 100644 --- a/src/net/java/sip/communicator/service/protocol/ProtocolNames.java +++ b/src/net/java/sip/communicator/service/protocol/ProtocolNames.java @@ -1,23 +1,23 @@ package net.java.sip.communicator.service.protocol; /** - * Specifies the names of some of the most popular instant messageing protocols. + * Specifies the names of some of the most popular instant messaging protocols. * These names should be used when registering an implementation of a protocol - * with the osgi framwke. These names must be set in the properties dictionary + * with the osgi framework. These names must be set in the properties dictionary * that one specifies when registering an OSGI service. When setting one of - * these names a protocol implementor must map it against the + * these names, a protocol implementor must map it against the * ProtocolProviderFactory.PROTOCOL_PROPERTY_NAME key. * @author Emil Ivov */ public interface ProtocolNames { /** - * The SIP (and SIMPLE) protcools. + * The SIP (and SIMPLE) protocols. */ public static final String SIP = "SIP"; /** - * The Jabber protcool. + * The Jabber protocol. */ public static final String JABBER = "Jabber"; @@ -52,21 +52,22 @@ public interface ProtocolNames public static final String MSN = "MSN"; /** - * The Yahoo! messenger protcool. + * The Yahoo! messenger protocol. */ public static final String YAHOO = "Yahoo!"; /** - * The Skype protcool. + * The Skype protocol. */ public static final String SKYPE = "Skype"; + /** * The SIP Communicator MOCK protocol. */ public static final String SIP_COMMUNICATOR_MOCK = "sip-communicator-mock"; /** - * The Zeroconf protcool. + * The Zeroconf protocol. */ public static final String ZEROCONF = "Zeroconf"; diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java index fa228001a..7bf749e9a 100644 --- a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java +++ b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCall.java @@ -155,7 +155,7 @@ protected void addCallPeer(T callPeer) * Removes callPeer from the list of peers in this call. The method * has no effect if there was no such peer in the call. * - * @param ev the event containing the CallPeer leaving the call and + * @param evt the event containing the CallPeer leaving the call and * the reason (if any) for the CallPeerChangeEvent. Use the event * as the cause for the call state change event. */ diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java b/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java index 04502fa57..a3685cc1d 100644 --- a/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java +++ b/src/net/java/sip/communicator/service/protocol/media/MediaHandler.java @@ -1327,11 +1327,11 @@ private void setLocalSSRC(MediaType mediaType, long localSSRC) } /** - * Sets the last-known local SSRC of the MediaStream of a specific + * Sets the last-known remote SSRC of the MediaStream of a specific * MediaType. * * @param mediaType the MediaType of the MediaStream to - * set the last-known local SSRC of + * set the last-known remote SSRC of * @param remoteSSRC the last-known remote SSRC of the MediaStream * of the specified mediaType */