/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.addrbook.macosx;
import net.java.sip.communicator.service.contactsource.*;
/**
* Implements ContactSourceService for the Address Book of Mac OS X.
*
* @author Lyubomir Marinov
*/
public class MacOSXAddrBookContactSourceService
implements ContactSourceService
{
/**
* Initializes a new MacOSXAddrBookContactSourceService instance.
*/
public MacOSXAddrBookContactSourceService()
{
}
/**
* Gets a human-readable String which names this
* ContactSourceService implementation.
*
* @return a human-readable String which names this
* ContactSourceService implementation
* @see ContactSourceService#getDisplayName()
*/
public String getDisplayName()
{
return "Mac OS X Address Book";
}
/**
* Gets a String which uniquely identifies the instances of the
* MacOSXAddrBookContactSourceService implementation.
*
* @return a String which uniquely identifies the instances of the
* MacOSXAddrBookContactSourceService implementation
* @see ContactSourceService#getIdentifier()
*/
public String getIdentifier()
{
return "MacOSXAddressBook";
}
/**
* Queries this ContactSourceService for SourceContacts
* which match a specific query String.
*
* @param query the String which this ContactSourceService
* is being queried for
* @return a ContactQuery which represents the query of this
* ContactSourceService implementation for the specified
* String and via which the matching SourceContacts (if
* any) will be returned
* @see ContactSourceService#queryContactSource(String)
*/
public ContactQuery queryContactSource(String query)
{
MacOSXAddrBookContactQuery mosxabcq
= new MacOSXAddrBookContactQuery(this, query);
mosxabcq.start();
return mosxabcq;
}
}