diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2012-07-11 19:09:15 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2012-07-11 19:09:15 +0000 |
commit | dd3b5f120a3b99fba694674468fc0296e74685ea (patch) | |
tree | 429296705a567682d6d3bae1ccd14691062e9fa0 /src/net/java/sip/communicator/plugin | |
parent | b467e0bba64d943499c6262e1c6b1c3f714e0fa0 (diff) | |
download | jitsi-dd3b5f120a3b99fba694674468fc0296e74685ea.zip jitsi-dd3b5f120a3b99fba694674468fc0296e74685ea.tar.gz jitsi-dd3b5f120a3b99fba694674468fc0296e74685ea.tar.bz2 |
Commits work in progress on calling from Microsoft Office with Jitsi to phone numbers originating from Microsoft Office.
Diffstat (limited to 'src/net/java/sip/communicator/plugin')
-rw-r--r-- | src/net/java/sip/communicator/plugin/msofficecomm/Messenger.java | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/src/net/java/sip/communicator/plugin/msofficecomm/Messenger.java b/src/net/java/sip/communicator/plugin/msofficecomm/Messenger.java index 18020a7..21319d1 100644 --- a/src/net/java/sip/communicator/plugin/msofficecomm/Messenger.java +++ b/src/net/java/sip/communicator/plugin/msofficecomm/Messenger.java @@ -692,14 +692,35 @@ public class Messenger } else if (opSetClass.equals(OperationSetBasicTelephony.class)) { - Set<PhoneNumberDetail> participantPhoneNumbers - = findPhoneNumbersBySigninName(participant, 1); +// Set<PhoneNumberDetail> participantPhoneNumbers +// = findPhoneNumbersBySigninName(participant, 1); +// +// if (participantPhoneNumbers.size() > 0) +// { +// contactList.add( +// participantPhoneNumbers.iterator().next() +// .getNumber()); +// } - if (participantPhoneNumbers.size() > 0) + /* + * There is no Contact for the specified participant which + * supports OperationSetBasicTelephony. Try without the support + * restriction. + */ + participantContacts + = findContactsBySigninName(participant, null, 1); + if (participantContacts.size() > 0) { contactList.add( - participantPhoneNumbers.iterator().next() - .getNumber()); + getSigninName(participantContacts.get(0), null)); + } + else + { + /* + * Well, just try to start a conversation with the + * unresolved contact. + */ + contactList.add(participant); } } } @@ -1039,7 +1060,9 @@ public class Messenger * @param signinName the <tt>IMessengerContact</tt> sign-in name for * which the associated <tt>Contact</tt> instances are to be found * @param opSetClass the <tt>OperationSet</tt> class to be supported by - * the possibly found <tt>Contact</tt> instances + * the possibly found <tt>Contact</tt> instances or <tt>null</tt> if no + * specific <tt>OperationSet</tt> class is required of the possibly + * found <tt>Contact</tt> instances * @param limit the maximum number of found <tt>Contact</tt>s at which * the search should stop or {@link Integer#MAX_VALUE} if the search is * to be unbound with respect to the number of found <tt>Contact</tt>s @@ -1057,8 +1080,10 @@ public class Messenger { ProtocolProviderService pps = e.getKey(); OperationSetContactCapabilities contactCapabilitiesOpSet - = pps.getOperationSet( - OperationSetContactCapabilities.class); + = (opSetClass == null) + ? null + : pps.getOperationSet( + OperationSetContactCapabilities.class); for (Contact contact : Messenger.findContactsBySigninName( |