public interface MagicSearch
Modifier and Type | Method and Description |
---|---|
void |
addListener(MagicSearchListener listener) |
SearchResult[] |
getContactListFromFilter(java.lang.String filter,
java.lang.String domain)
Deprecated.
22/03/2022 Use
getContacts(java.lang.String, java.lang.String, int) instead. |
void |
getContactListFromFilterAsync(java.lang.String filter,
java.lang.String domain)
Deprecated.
22/03/2022 Use
getContactsAsync(java.lang.String, java.lang.String, int) instead. |
SearchResult[] |
getContacts(java.lang.String filter,
java.lang.String domain,
int sourceFlags)
Deprecated.
|
void |
getContactsAsync(java.lang.String filter,
java.lang.String domain,
int sourceFlags)
Deprecated.
|
SearchResult[] |
getContactsList(java.lang.String filter,
java.lang.String domain,
int sourceFlags,
MagicSearchAggregation 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. |
void |
getContactsListAsync(java.lang.String filter,
java.lang.String domain,
int sourceFlags,
MagicSearchAggregation aggregation)
This is the asynchronous version of
getContacts(java.lang.String, java.lang.String, int) . |
java.lang.String |
getDelimiter()
Get the delimiter used for the search.
|
SearchResult[] |
getLastSearch()
|
boolean |
getLimitedSearch()
Return whether or not the search is limited.
|
int |
getMaxWeight()
Get the maximum value used to calculate the weight in search.
|
int |
getMinWeight()
Get the minimum value used to calculate the weight in search.
|
long |
getNativePointer()
Gets the native pointer used by this class to make native method calls.
|
int |
getSearchLimit()
Get the number of maximum search result the search will return.
|
boolean |
getUseDelimiter()
Returns whether the delimiter is being used for the search.
|
java.lang.Object |
getUserData()
Gets the object stored in this object user's data
|
void |
removeListener(MagicSearchListener listener) |
void |
resetSearchCache()
Reset the cache to begin a new search.
|
void |
setDelimiter(java.lang.String delimiter)
Set the delimiter used to find matched filter word.
|
void |
setLimitedSearch(boolean limited)
Enable or disable the limited search.
|
void |
setMaxWeight(int weight)
Set the maximum value used to calculate the weight in search.
|
void |
setMinWeight(int weight)
Set the minimum value used to calculate the weight in search.
|
void |
setSearchLimit(int limit)
Set the number of the maximum SearchResult which will be returned.
|
void |
setUseDelimiter(boolean enable)
Enable or disable the delimiter in search.
|
void |
setUserData(java.lang.Object data)
Sets the object to store in this object user's data
|
java.lang.String |
toString() |
@Nullable java.lang.String getDelimiter()
void setDelimiter(@Nullable java.lang.String delimiter)
delimiter
- delimiter (example "-_.,") @NonNull SearchResult[] getLastSearch()
boolean getLimitedSearch()
void setLimitedSearch(boolean limited)
limited
- true to limit the search, false otherwise int getMaxWeight()
void setMaxWeight(int weight)
weight
- maximum weight int getMinWeight()
void setMinWeight(int weight)
weight
- minimum weight int getSearchLimit()
SearchResult
which will be returned void setSearchLimit(int limit)
limit
- the maximum number of SearchResult
the search will return boolean getUseDelimiter()
void setUseDelimiter(boolean enable)
enable
- true to use the delimiter, false otherwise @Deprecated @NonNull SearchResult[] getContactListFromFilter(@Nullable java.lang.String filter, @Nullable java.lang.String domain)
getContacts(java.lang.String, java.lang.String, int)
instead. resetSearchCache()
filter
- word we search domain
- domain which we want to search only @Deprecated void getContactListFromFilterAsync(@Nullable java.lang.String filter, @Nullable java.lang.String domain)
getContactsAsync(java.lang.String, java.lang.String, int)
instead. resetSearchCache()
to begin a new search. filter
- word we search domain
- domain which we want to search only null or "" for searching in@Deprecated @NonNull SearchResult[] getContacts(@Nullable java.lang.String filter, @Nullable java.lang.String domain, int sourceFlags)
getContactsList(java.lang.String, java.lang.String, int, org.linphone.core.MagicSearchAggregation)
instead. resetSearchCache()
to begin a newfilter
- word we search domain
- domain which we want to search only sourceFlags
- Flags that specify where to search : MagicSearchSource
@Deprecated void getContactsAsync(@Nullable java.lang.String filter, @Nullable java.lang.String domain, int sourceFlags)
getContactsListAsync(java.lang.String, java.lang.String, int, org.linphone.core.MagicSearchAggregation)
instead. getContacts(java.lang.String, java.lang.String, int)
. resetSearchCache()
tofilter
- word we search domain
- domain which we want to search only sourceFlags
- Flags that specify where to search : MagicSearchSource
@NonNull SearchResult[] getContactsList(@Nullable java.lang.String filter, @Nullable java.lang.String domain, int sourceFlags, MagicSearchAggregation aggregation)
resetSearchCache()
to begin a newfilter
- word we search domain
- domain which we want to search only sourceFlags
- Flags that specify where to search : MagicSearchSource
aggregation
- a MagicSearchAggregation
mode to indicate how tovoid getContactsListAsync(@Nullable java.lang.String filter, @Nullable java.lang.String domain, int sourceFlags, MagicSearchAggregation aggregation)
getContacts(java.lang.String, java.lang.String, int)
. resetSearchCache()
tofilter
- word we search domain
- domain which we want to search only sourceFlags
- Flags that specify where to search : MagicSearchSource
aggregation
- a MagicSearchAggregation
mode to indicate how tovoid resetSearchCache()
void addListener(MagicSearchListener listener)
void removeListener(MagicSearchListener listener)
void setUserData(java.lang.Object data)
data
- the object to storejava.lang.Object getUserData()
long getNativePointer()
java.lang.String toString()
toString
in class java.lang.Object