Class MagicSearch
A MagicSearch is used to do specifics searchs.
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 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 LimitedSearch result as well.
Declaration
public uint SearchLimit { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 | the number of the maximum 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
GetContactListFromFilter(String, String)
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 Use ResetSearchCache() to begin a new search.
Declaration
public IEnumerable<SearchResult> GetContactListFromFilter(string filter, string domain)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | word we search |
System.String | domain | domain which we want to search only |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SearchResult> | sorted list of |
GetContactListFromFilterAsync(String, String)
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.
Declaration
public void GetContactListFromFilterAsync(string filter, string domain)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | word we search |
System.String | domain | 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(String, String, Int32)
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 ResetSearchCache() to begin a new search
Declaration
public IEnumerable<SearchResult> GetContacts(string filter, string domain, int sourceFlags)
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 : MagicSearchSource |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SearchResult> | sorted list of |
GetContactsAsync(String, String, Int32)
This is the asynchronous version of
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 ResetSearchCache() to begin a new search
Declaration
public void GetContactsAsync(string filter, string domain, int sourceFlags)
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 : MagicSearchSource |
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 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 : MagicSearchSource |
MagicSearchAggregation | aggregation | a 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
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 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 : MagicSearchSource |
MagicSearchAggregation | aggregation | a MagicSearchAggregation mode to indicate how to merge results |
ResetSearchCache()
Reset the cache to begin a new search.
Declaration
public void ResetSearchCache()