Class MagicSearch
A Linphone.MagicSearch is used to search for contacts from various sources:
Inherited Members
Namespace: Linphone
Assembly: cs.temp.dll.dll
Syntax
public class MagicSearch : LinphoneObject
Properties
Delimiter
Get the delimiter used for the search.
Declaration
public string Delimiter { get; set; }
Property Value
Type | Description |
---|---|
System.String | the delimiter used to find matched filter word |
LastSearch
Declaration
public IEnumerable<SearchResult> LastSearch { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SearchResult> | sorted list of |
LimitedSearch
Returns whether or not the search is limited or not.
If not limited, the Linphone.MagicSearch.SearchLimit won't be applied.
Declaration
public bool LimitedSearch { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the search is limited, false otherwise |
Listener
Declaration
public MagicSearchListener Listener { get; set; }
Property Value
Type | Description |
---|---|
MagicSearchListener |
MaxWeight
Get the maximum value used to calculate the weight in search.
Declaration
public uint MaxWeight { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 | the maximum value used to calculate the weight in search |
MinWeight
Get the minimum value used to calculate the weight in search.
Declaration
public uint MinWeight { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 | the minimum value used to calculate the weight in search |
SearchLimit
Gets the number of maximum search result the search will return.
The returned value doesn't take into account the "limited search" mode, so make sure to check Linphone.MagicSearch.LimitedSearch result as well.
Declaration
public uint SearchLimit { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 | the number of the maximum Linphone.SearchResult which will be returned if magic search is in limited mode. |
UseDelimiter
Returns whether the delimiter is being used for the search.
Declaration
public bool UseDelimiter { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | if the delimiter search is used |
Methods
GetContactsList(String, String, Int32, MagicSearchAggregation)
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 Use Linphone.MagicSearch.ResetSearchCache() to begin a new search
Declaration
public IEnumerable<SearchResult> GetContactsList(string filter, string domain, int sourceFlags, MagicSearchAggregation aggregation)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | word we search |
System.String | domain | domain which we want to search only |
System.Int32 | sourceFlags | Flags that specify where to search : Linphone.MagicSearchSource |
MagicSearchAggregation | aggregation | a Linphone.MagicSearchAggregation mode to indicate how to merge results |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SearchResult> | sorted list of |
GetContactsListAsync(String, String, Int32, MagicSearchAggregation)
This is the asynchronous version of linphone_magic_search_get_contacts().
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 Use Linphone.MagicSearch.ResetSearchCache() to begin a new search
Declaration
public void GetContactsListAsync(string filter, string domain, int sourceFlags, MagicSearchAggregation aggregation)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | word we search |
System.String | domain | domain which we want to search only |
System.Int32 | sourceFlags | Flags that specify where to search : Linphone.MagicSearchSource |
MagicSearchAggregation | aggregation | a Linphone.MagicSearchAggregation mode to indicate how to merge results |
ResetSearchCache()
Reset the cache to begin a new search.
Declaration
public void ResetSearchCache()