[jitsi-dev] Re: [jitsi~svn:9415] Adds a getTransportType() function to ProtocolProviderServices in order t


#1

Hey Vincent

Some comments, not sure how important this is to the others, feel free to leave it as is:

- I feel a bit uncomfortable calling a protocol "type", getTransportProtocol() would IMO fit better
- The JavaDoc mentions TLSv1 as a possible option, yet TLS is returned
- The Mock/Gibberish implementations return null, which at least to the JavaDoc is not an expected return value

Because of the limited number of options that could be in there, I think an enum could be created. Emil?

Anyway thanks for correcting the CallInfoFrame :slight_smile:

Regards,
Ingo

···

-----Original Message-----
From: vincent_lucas@java.net [mailto:vincent_lucas@java.net]
Sent: Mittwoch, 29. Februar 2012 18:28
To: commits@jitsi.java.net
Subject: [jitsi~svn:9415] Adds a getTransportType() function to
ProtocolProviderServices in order t

Project: jitsi
Repository: svn
Revision: 9415
Author: vincent_lucas
Date: 2012-02-29 17:27:31 UTC
Link:

Log Message:
------------
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.

Revisions:
----------
9415

Modified Paths:
---------------
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java
trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java

Diffs:
------
Index:
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java

---
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java (revision 9414)
+++
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java (revision 9415)
@@ -187,4 +187,11 @@
      * @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();
}
Index:
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java (revision 9415)
@@ -344,6 +344,16 @@
     }

     /**
+ * 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
      * example).
Index:
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java (revision 9415)
@@ -311,6 +311,16 @@
     }

     /**
+ * 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
      */
     private void closeConnection()
Index:
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java (revision 9415)
@@ -570,6 +570,28 @@
     }

     /**
+ * 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
      * @param reasonCode the authentication reason code. Indicates the
reason of
Index:
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java (revision 9415)
@@ -270,6 +270,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java (revision 9415)
@@ -243,6 +243,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java

--- trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java
  (revision 9414)
+++ trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java
  (revision 9415)
@@ -212,6 +212,16 @@
     }

     /**
+ * 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.
      * @return the id of the account represented by this provider.
Index:
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java (revision 9415)
@@ -1640,6 +1640,25 @@
     }

     /**
+ * 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
      * <tt>method</tt> request. If any previous processors exist for the
same
Index:
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java (revision 9415)
@@ -429,6 +429,16 @@
     }

     /**
+ * 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
      * example).
Index:
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java (revision 9415)
@@ -289,6 +289,16 @@
     }

     /**
+ * 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.
      *
      * @return the icon for this protocol
Index:
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java (revision 9415)
@@ -261,6 +261,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java (revision 9415)
@@ -632,6 +632,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java (revision 9415)
@@ -300,6 +300,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java

--- trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
  (revision 9414)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
  (revision 9415)
@@ -186,9 +186,8 @@
                     "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(


#2

Hey Ingo,

Hey Vincent

Some comments, not sure how important this is to the others, feel free to leave it as is:

- I feel a bit uncomfortable calling a protocol "type", getTransportProtocol() would IMO fit better

Agreed.

- The JavaDoc mentions TLSv1 as a possible option, yet TLS is returned
- The Mock/Gibberish implementations return null, which at least to the JavaDoc is not an expected return value

Because of the limited number of options that could be in there, I think an enum could be created. Emil?

Agreed again.

Cheers,
Emil

···

On 29.02.12 19:41, Ingo Bauersachs wrote:

Anyway thanks for correcting the CallInfoFrame :slight_smile:

Regards,
Ingo

-----Original Message-----
From: vincent_lucas@java.net [mailto:vincent_lucas@java.net]
Sent: Mittwoch, 29. Februar 2012 18:28
To: commits@jitsi.java.net
Subject: [jitsi~svn:9415] Adds a getTransportType() function to
ProtocolProviderServices in order t

Project: jitsi
Repository: svn
Revision: 9415
Author: vincent_lucas
Date: 2012-02-29 17:27:31 UTC
Link:

Log Message:
------------
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.

Revisions:
----------
9415

Modified Paths:
---------------
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java
trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java

Diffs:
------
Index:
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java

---
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java (revision 9414)
+++
trunk/src/net/java/sip/communicator/service/protocol/ProtocolProviderService.
java (revision 9415)
@@ -187,4 +187,11 @@
      * @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();
}
Index:
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolProviderServi
ceYahooImpl.java (revision 9415)
@@ -344,6 +344,16 @@
     }

     /**
+ * 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
      * example).
Index:
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/dict/ProtocolProviderServic
eDictImpl.java (revision 9415)
@@ -311,6 +311,16 @@
     }

     /**
+ * 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
      */
     private void closeConnection()
Index:
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServ
iceJabberImpl.java (revision 9415)
@@ -570,6 +570,28 @@
     }

     /**
+ * 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
      * @param reasonCode the authentication reason code. Indicates the
reason of
Index:
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolProviderSe
rviceZeroconfImpl.java (revision 9415)
@@ -270,6 +270,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/rss/ProtocolProviderService
RssImpl.java (revision 9415)
@@ -243,6 +243,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java

--- trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java
  (revision 9414)
+++ trunk/src/net/java/sip/communicator/impl/protocol/mock/MockProvider.java
  (revision 9415)
@@ -212,6 +212,16 @@
     }

     /**
+ * 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.
      * @return the id of the account represented by this provider.
Index:
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderService
SipImpl.java (revision 9415)
@@ -1640,6 +1640,25 @@
     }

     /**
+ * 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
      * <tt>method</tt> request. If any previous processors exist for the
same
Index:
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderService
IcqImpl.java (revision 9415)
@@ -429,6 +429,16 @@
     }

     /**
+ * 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
      * example).
Index:
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderService
IrcImpl.java (revision 9415)
@@ -289,6 +289,16 @@
     }

     /**
+ * 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.
      *
      * @return the icon for this protocol
Index:
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderService
MsnImpl.java (revision 9415)
@@ -261,6 +261,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderService
SSHImpl.java (revision 9415)
@@ -632,6 +632,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java

---
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java (revision 9414)
+++
trunk/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolProviderS
erviceGibberishImpl.java (revision 9415)
@@ -300,6 +300,16 @@
     }

     /**
+ * 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
      */
Index:
trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java

--- trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
  (revision 9414)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
  (revision 9415)
@@ -186,9 +186,8 @@
                     "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(

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
http://jitsi.org FAX: +33.1.77.62.47.31