Package org.linphone.core
Interface MagicSearch
public interface MagicSearch
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(MagicSearchListener listener) getContactListFromFilter(String filter, String domain) Deprecated.voidgetContactListFromFilterAsync(String filter, String domain) Deprecated.22/03/2022 UsegetContactsAsync(java.lang.String, java.lang.String, int)instead.getContacts(String filter, String domain, int sourceFlags) Deprecated.voidgetContactsAsync(String filter, String domain, int sourceFlags) Deprecated.getContactsList(String filter, String domain, int sourceFlags, MagicSearch.Aggregation aggregation) Create a sorted list of SearchResult which match with a filter word, from
SipUri in this order : Contact's display name, address username, address domain
and phone number.voidgetContactsListAsync(String filter, String domain, int sourceFlags, MagicSearch.Aggregation aggregation) This is the asynchronous version ofgetContacts(java.lang.String, java.lang.String, int).Get the delimiter used for the search.booleanReturn whether or not the search is limited.intGet the maximum value used to calculate the weight in search.intGet the minimum value used to calculate the weight in search.longGets the native pointer used by this class to make native method calls.intGet the number of maximum search result the search will return.booleanReturns whether the delimiter is being used for the search.Gets the object stored in this object user's datavoidremoveListener(MagicSearchListener listener) voidReset the cache to begin a new search.voidsetDelimiter(String delimiter) Set the delimiter used to find matched filter word.voidsetLimitedSearch(boolean limited) Enable or disable the limited search.voidsetMaxWeight(int weight) Set the maximum value used to calculate the weight in search.voidsetMinWeight(int weight) Set the minimum value used to calculate the weight in search.voidsetSearchLimit(int limit) Set the number of the maximum SearchResult which will be returned.voidsetUseDelimiter(boolean enable) Enable or disable the delimiter in search.voidsetUserData(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getDelimiter
Get the delimiter used for the search.
- Returns:
- the delimiter used to find matched filter word
-
setDelimiter
Set the delimiter used to find matched filter word.
- Parameters:
delimiter- delimiter (example "-_.,")
-
getLastSearch
- Returns:
- sorted list of
-
getLimitedSearch
boolean getLimitedSearch()Return whether or not the search is limited.
- Returns:
- true if the search is limited, false otherwise
-
setLimitedSearch
void setLimitedSearch(boolean limited) Enable or disable the limited search.
- Parameters:
limited- true to limit the search, false otherwise
-
getMaxWeight
int getMaxWeight()Get the maximum value used to calculate the weight in search.
- Returns:
- the maximum value used to calculate the weight in search
-
setMaxWeight
void setMaxWeight(int weight) Set the maximum value used to calculate the weight in search.
- Parameters:
weight- maximum weight
-
getMinWeight
int getMinWeight()Get the minimum value used to calculate the weight in search.
- Returns:
- the minimum value used to calculate the weight in search
-
setMinWeight
void setMinWeight(int weight) Set the minimum value used to calculate the weight in search.
- Parameters:
weight- minimum weight
-
getSearchLimit
int getSearchLimit()Get the number of maximum search result the search will return.
- Returns:
- the number of the maximum
SearchResultwhich will be returned
-
setSearchLimit
void setSearchLimit(int limit) Set the number of the maximum SearchResult which will be returned.
- Parameters:
limit- the maximum number ofSearchResultthe search will return
-
getUseDelimiter
boolean getUseDelimiter()Returns whether the delimiter is being used for the search.
- Returns:
- if the delimiter search is used
-
setUseDelimiter
void setUseDelimiter(boolean enable) Enable or disable the delimiter in search.
- Parameters:
enable- true to use the delimiter, false otherwise
-
getContactListFromFilter
@Deprecated @NonNull SearchResult[] getContactListFromFilter(@Nullable String filter, @Nullable String domain) Deprecated.22/03/2022 UsegetContacts(java.lang.String, java.lang.String, int)instead.Create a sorted list of SearchResult from SipUri, Contact name, Contact
displayname, Contact phone number, which match with a filter word The last item
list will be an address formed with "filter" if a proxy config exist During the
first search, a cache is created and used for the next search UseresetSearchCache()
to begin a new search.
- Parameters:
filter- word we searchdomain- domain which we want to search only- Returns:
- sorted list of
-
getContactListFromFilterAsync
Deprecated.22/03/2022 UsegetContactsAsync(java.lang.String, java.lang.String, int)instead.Create a sorted list of SearchResult asynchronous from SipUri, Contact name,
Contact displayname, Contact phone number, which match with a filter word The
last item list will be an address formed with "filter" if a proxy config exist
During the first search, a cache is created and used for the next search Use
resetSearchCache()to begin a new search.
- Parameters:
filter- word we searchdomain- domain which we want to search only null or "" for searching in
all contact "*" for searching in contact with sip SipUri "yourdomain" for
searching in contact from "yourdomain" domain
-
getContacts
@Deprecated @NonNull SearchResult[] getContacts(@Nullable String filter, @Nullable String domain, int sourceFlags) Deprecated.Create a sorted list of SearchResult which match with a filter word, from
SipUri in this order : Contact's display name, address username, address domain
and phone number.
The last item list will be an address formed with "filter" if a proxy config
exist and requested in sourceFlags During the first search, a cache is created
and used for the next search UseresetSearchCache()to begin a new
search- Parameters:
filter- word we searchdomain- domain which we want to search onlysourceFlags- Flags that specify where to search :MagicSearch.Source- Returns:
- sorted list of
-
getContactsAsync
@Deprecated void getContactsAsync(@Nullable String filter, @Nullable String domain, int sourceFlags) Deprecated.This is the asynchronous version ofgetContacts(java.lang.String, java.lang.String, int).
Create a sorted list of SearchResult which match with a filter word, from
SipUri in this order : Contact's display name, address username, address domain
and phone number. The last item list will be an address formed with "filter" if
a proxy config exist and requested in sourceFlags During the first search, a
cache is created and used for the next search UseresetSearchCache()to
begin a new search- Parameters:
filter- word we searchdomain- domain which we want to search onlysourceFlags- Flags that specify where to search :MagicSearch.Source
-
getContactsList
@NonNull SearchResult[] getContactsList(@Nullable String filter, @Nullable String domain, int sourceFlags, MagicSearch.Aggregation aggregation) Create a sorted list of SearchResult which match with a filter word, from
SipUri in this order : Contact's display name, address username, address domain
and phone number.
The last item list will be an address formed with "filter" if a proxy config
exist and requested in sourceFlags During the first search, a cache is created
and used for the next search UseresetSearchCache()to begin a new
search- Parameters:
filter- word we searchdomain- domain which we want to search onlysourceFlags- Flags that specify where to search :MagicSearch.Sourceaggregation- aMagicSearch.Aggregationmode to indicate how to merge results- Returns:
- sorted list of
-
getContactsListAsync
void getContactsListAsync(@Nullable String filter, @Nullable String domain, int sourceFlags, MagicSearch.Aggregation aggregation) This is the asynchronous version ofgetContacts(java.lang.String, java.lang.String, int).
Create a sorted list of SearchResult which match with a filter word, from
SipUri in this order : Contact's display name, address username, address domain
and phone number. The last item list will be an address formed with "filter" if
a proxy config exist and requested in sourceFlags During the first search, a
cache is created and used for the next search UseresetSearchCache()to
begin a new search- Parameters:
filter- word we searchdomain- domain which we want to search onlysourceFlags- Flags that specify where to search :MagicSearch.Sourceaggregation- aMagicSearch.Aggregationmode to indicate how to merge results
-
resetSearchCache
void resetSearchCache()Reset the cache to begin a new search.
-
addListener
-
removeListener
-
setUserData
Sets the object to store in this object user's data- Parameters:
data- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-
getContacts(java.lang.String, java.lang.String, int)instead.