/* * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Copyright @ 2015 Atlassian Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.java.sip.communicator.service.gui; import net.java.sip.communicator.service.contactsource.*; /** * The user interface representation of a contact source. * * @author Yana Stamcheva */ public interface UIContactSource { /** * Returns the UI group for this contact source. There's only one group * descriptor per external source. * * @return the group descriptor */ public UIGroup getUIGroup(); /** * Returns the <tt>UIContact</tt> corresponding to the given * <tt>sourceContact</tt>. * * @param sourceContact the <tt>SourceContact</tt>, for which we search a * corresponding <tt>UIContact</tt> * @return the <tt>UIContact</tt> corresponding to the given * <tt>sourceContact</tt> */ public UIContact createUIContact(SourceContact sourceContact); /** * Removes the <tt>UIContact</tt> from the given <tt>sourceContact</tt>. * @param sourceContact the <tt>SourceContact</tt>, which corresponding UI * contact we would like to remove */ public void removeUIContact(SourceContact sourceContact); /** * Returns the <tt>UIContact</tt> corresponding to the given * <tt>SourceContact</tt>. * @param sourceContact the <tt>SourceContact</tt>, which corresponding UI * contact we're looking for * @return the <tt>UIContact</tt> corresponding to the given * <tt>MetaContact</tt> */ public UIContact getUIContact(SourceContact sourceContact); /** * Returns the corresponding <tt>ContactSourceService</tt>. * * @return the corresponding <tt>ContactSourceService</tt> */ public ContactSourceService getContactSourceService(); /** * Sets the contact source index. * * @param contactSourceIndex the contact source index to set */ public void setContactSourceIndex(int contactSourceIndex); }