📄 oscar.java
字号:
package openicq.management;
import JOscarLib.Core.OscarConnection;
import JOscarLib.Management.Contact;
import JOscarLib.Management.ContactList;
/**
* The <code>Oscar</code> interface is the basic access to the login, contact
* and connection management of this application.
* @author Hansgeorg Schwibbe
* @copyright 2004
*/
public interface Oscar
{
/**
* The login mode 'Auto login'.
*/
public static final int AUTOLOGIN = 102;
/**
* The login mode 'Auto save'.
*/
public static final int AUTOSAVE = 101;
/**
* The login mode 'No auto'.
*/
public static final int NOAUTO = 100;
/**
* Appends a new contact to the end of the contact list of known users.
* @param contactId the user ID
* @param nickName the nickname
* @param firstName the first name
* @param lastName the last name
* @param email E-Mail email
* @param isInVisibleList if the user is in the visible list
* @param isInInvisibleList if the user is in the invisible list
*/
void addKnownContact(String contactId, String nickName, String firstName,
String lastName, String email, boolean isInVisibleList,
boolean isInInvisibleList);
/**
* Appends a new contact to the end of the contact list of known users.
* @param contact the new contact
*/
void addKnownContact(Contact contact);
/**
* Appends a new contact to the end of the contact list of unknown users.
* @param contactId the user ID
* @param nickName the nickname
* @param firstName the first name
* @param lastName the last name
* @param email E-Mail the email
* @param isInVisibleList if the user is in the visible list
* @param isInInvisibleList if the user is in the invisible list
*/
void addUnknownContact(String contactId, String nickName, String firstName,
String lastName, String email,
boolean isInVisibleList, boolean isInInvisibleList);
/**
* Appends a new contact to the end of the contact list of unknown users.
* @param contact the new contact
*/
void addUnknownContact(Contact contact);
/**
* Cleans up the contact list of unknown contacts.
*/
void cleanUnknownList();
/**
* Returns the chat name of the given contact.
* @param contact the given contact
* @return the chat name of the given contact
*/
String getChatName(Contact contact);
/**
* Returns the connection to the ICQ server.
* @return the connection to the ICQ server
*/
OscarConnection getConnection();
/**
* Returns the display name of the given contact.
* @param contact the given contact
* @return the display name of the given contact
*/
String getDisplayName(Contact contact);
/**
* Returns the current host name.
* @return the current host name
*/
String getHost();
/**
* Returns the contact list of known contacts.
* @return the contact list of known contacts
*/
ContactList getKnownList();
/**
* Returns the current login mode.
* @return the current login mode
*/
int getLoginMode();
/**
* Returns the current login status.
* @return the current login status
*/
int getLoginStatus();
/**
* Returns the own ICQ contact.
* @return the own ICQ contact
*/
ICQContact getOwnContact();
/**
* Returns the current password.
* @return the current password
*/
String getPassword();
/**
* Returns the current login port.
* @return the current login port
*/
int getPort();
/**
* Returns the contact list of unknown contacts.
* @return the contact list of unknown contacts
*/
ContactList getUnknownList();
/**
* Loads a contact list from the specified file.
* @param path the path to the specified file
* @return the loaded contact list
* @throws Exception
*/
ContactList loadContactList(String path) throws Exception;
/**
* Writes the specified contact list to a file.
* @param path the path of the specified file
* @param contactList the specified contact list
* @throws Exception
*/
void saveContactList(String path, ContactList contactList) throws Exception;
/**
* Sends the contact list of known contacts to the ICQ server.
*/
void sendKnownList();
/**
* Sets the connection to the ICQ server.
* @param connection the connection to the ICQ server
*/
void setConnection(OscarConnection connection);
/**
* Sets the current host name.
* @param host the current host name
*/
void setHost(String host);
/**
* Sets the contact list of known contacts.
* @param knownList the contact list of known contacts
*/
void setKnownList(ContactList knownList);
/**
* Sets the login mode.
* @param mode the login mode
*/
void setLoginMode(int mode);
/**
* Sets the current login status.
* @param status the current login status
*/
void setLoginStatus(int status);
/**
* Sets the current password.
* @param passwd the current password
*/
void setPassword(String passwd);
/**
* Sets the login port.
* @param port the login port
*/
void setPort(int port);
/**
* Sets the contact list of unknown contacts.
* @param unknownList the contact list of unknown contacts
*/
void setUnknownList(ContactList unknownList);
/**
* Sorts the given contact list.
* @param contactList the given contact list
* @return the sorted contact list
*/
ContactList sortContactList(ContactList contactList);
/**
* Synchronizes the local saved contact list with the servers contact list.
*/
void synchronizeServerContacts();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -