Adds a getTransportType() function to ProtocolProviderServices in order to get the transport protocol used. Corrects the call transport field of the CallInfoFrame, which henceforth uses the new getTransportType() function.

cusax-fix
Vincent Lucas 15 years ago
parent 28cd9964db
commit 173eca6e7c

@ -186,9 +186,8 @@ private void constructCallInfo()
"service.gui.callinfo.IS_CONFERENCE_FOCUS"),
String.valueOf(isConfFocus)));
String preferredTransport = call.getProtocolProvider().getAccountID()
.getAccountPropertyString(
ProtocolProviderFactory.PREFERRED_TRANSPORT);
String preferredTransport =
call.getProtocolProvider().getTransportType();
if (preferredTransport != null && preferredTransport.length() > 0)
stringBuffer.append(getLineString(

@ -310,6 +310,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Close the connection to the server
*/

@ -299,6 +299,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return null;
}
/**
* Returns the gibberish protocol icon.
* @return the gibberish protocol icon

@ -428,6 +428,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Returns the short name of the protocol that the implementation of this
* provider is based upon (like SIP, Jabber, ICQ/AIM, or others for

@ -288,6 +288,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Returns the icon for this protocol.
*

@ -569,6 +569,28 @@ public boolean isSignalingTransportSecure()
return connection != null && connection.isUsingTLS();
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1), or
* null the protocol is not connected.
*/
public String getTransportType()
{
// Without a connection, there is no transport available.
if(connection != null && connection.isConnected())
{
// Transport using a secure connection.
if(connection.isUsingTLS())
{
return "TLS";
}
// Transport using a unsecure connection.
return "TCP";
}
return null;
}
/**
* Connects and logins to the server
* @param authority SecurityAuthority

@ -211,6 +211,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return null;
}
/**
* Returns the AccountID that uniquely identifies the account represented by
* this instance of the ProtocolProviderService.

@ -260,6 +260,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Unregister and fire the event if requested
* @param fireEvent boolean

@ -242,6 +242,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Returns the rss protocol icon.
* @return the rss protocol icon

@ -1639,6 +1639,25 @@ public boolean isSignalingTransportSecure()
return ListeningPoint.TLS.equalsIgnoreCase(connection.getTransport());
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1), or
* null the protocol is not connected.
*/
public String getTransportType()
{
// The transport protocol is not set properly when dealing with a
// RegistrarLess account. This is why we return "null" in this case.
if(this.sipRegistrarConnection == null
|| this.sipRegistrarConnection instanceof
SipRegistrarlessConnection)
{
return null;
}
return sipRegistrarConnection.getTransport();
}
/**
* Registers <tt>methodProcessor</tt> in the <tt>methorProcessors</tt> table
* so that it would receives all messages in a transaction initiated by a

@ -631,6 +631,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Returns the ssh protocol icon.
* @return the ssh protocol icon

@ -343,6 +343,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Returns the short name of the protocol that the implementation of this
* provider is based upon (like SIP, Msn, ICQ/AIM, or others for

@ -269,6 +269,16 @@ public boolean isSignalingTransportSecure()
return false;
}
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType()
{
return "TCP";
}
/**
* Returns the zeroconf protocol icon.
* @return the zeroconf protocol icon

@ -187,4 +187,11 @@ public void removeRegistrationStateChangeListener(
* @return True when the connection is secured, false otherwise.
*/
public boolean isSignalingTransportSecure();
/**
* Returns the transport protocol of this instance.
*
* @return The transport protocol of this instance (UDP, TCP, TLSv1).
*/
public String getTransportType();
}

Loading…
Cancel
Save