예제 #1
0
  private String resolveSkypeIdOf(String to) throws SkypeException {

    for (Friend f : com.skype.Skype.getContactList().getAllFriends()) {
      if (f.getFullName().equals(to) || f.getId().equals(to)) return f.getId();
    }
    throw new IllegalStateException("User " + to + " not found");
  }
예제 #2
0
 private boolean internalIsKnownUser(String user) {
   try {
     for (Friend f : com.skype.Skype.getContactList().getAllFriends()) {
       if (f.getFullName().equals(user) || f.getId().equals(user)) return true;
     }
   } catch (SkypeException e) {
     throw new UnhandledException(e);
   }
   return false;
 }