예제 #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;
 }
예제 #3
0
 private void add(String arg) throws SkypeException {
   Skype.getContactList().addFriend(arg, "Hello, I'd like to add you as a contact");
 }