MagicSearch

public class MagicSearch : LinphoneObject

A MagicSearch is used to do specifics searchs.

  • Undocumented

    Declaration

    Swift

    public static func getSwiftObject(cObject: OpaquePointer) -> MagicSearch
  • Undocumented

    Declaration

    Swift

    public var getCobject: OpaquePointer? { get }
  • Undocumented

    Declaration

    Swift

    public func addDelegate(delegate: MagicSearchDelegate)
  • Undocumented

    Declaration

    Swift

    public func removeDelegate(delegate: MagicSearchDelegate)
  • Gets the current LinphoneMagicSearchCbs. This is meant only to be called from a callback to be able to get the user_data associated with the LinphoneMagicSearchCbs that is calling the callback.

    Declaration

    Swift

    public var currentDelegate: MagicSearchDelegate? { get }

    Return Value

    The LinphoneMagicSearchCbs that has called the last callback.

  • Set the delimiter used to find matched filter word.

    Declaration

    Swift

    public var delimiter: String { get set }

    Parameters

    delimiter

    delimiter (example “-_.,”)
    Get the delimiter used for the search.

    Return Value

    the delimiter used to find matched filter word

  • Declaration

    Swift

    public var lastSearch: [SearchResult] { get }

    Return Value

    sorted list of

  • Enable or disable the limited search.

    Declaration

    Swift

    public var limitedSearch: Bool { get set }

    Parameters

    limited

    true to limit the search, false otherwise Return whether or not the search is limited.

    Return Value

    true if the search is limited, false otherwise

  • Set the maximum value used to calculate the weight in search.

    Declaration

    Swift

    public var maxWeight: UInt { get set }

    Parameters

    weight

    maximum weight Get the maximum value used to calculate the weight in search.

    Return Value

    the maximum value used to calculate the weight in search

  • Set the minimum value used to calculate the weight in search.

    Declaration

    Swift

    public var minWeight: UInt { get set }

    Parameters

    weight

    minimum weight Get the minimum value used to calculate the weight in search.

    Return Value

    the minimum value used to calculate the weight in search

  • Set the number of the maximum SearchResult which will be returned.

    Declaration

    Swift

    public var searchLimit: UInt { get set }

    Parameters

    limit

    the maximum number of SearchResult the search will return Get the number of maximum search result the search will return.

    Return Value

    the number of the maximum SearchResult which will be returned

  • Enable or disable the delimiter in search.

    Declaration

    Swift

    public var useDelimiter: Bool { get set }

    Parameters

    enable

    true to use the delimiter, false otherwise Returns whether the delimiter is being used for the search.

    Return Value

    if the delimiter search is used

  • 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.

    • deprecated: 22/03/2022 Use getContacts() instead.

    Declaration

    Swift

    @available(*, deprecated)
    public func getContactListFromFilter(filter: String?, domain: String?) -> [SearchResult]

    Parameters

    filter

    word we search

    domain

    domain which we want to search only

    Return Value

    sorted list of

  • 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.

    • deprecated: 22/03/2022 Use getContactsAsync() instead.

    Declaration

    Swift

    @available(*, deprecated)
    public func getContactListFromFilterAsync(filter: String?, domain: String?)

    Parameters

    filter

    word we search

    domain

    domain which we want to search only nil or “” for searching in all contact “*” for searching in contact with sip SipUri “yourdomain” for searching in contact from “yourdomain” domain

  • 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

    • deprecated: 08/04/2022 Use getContactsList() instead.

    Declaration

    Swift

    @available(*, deprecated)
    public func getContacts(filter: String?, domain: String?, sourceFlags: Int) -> [SearchResult]

    Parameters

    filter

    word we search

    domain

    domain which we want to search only

    sourceFlags

    Flags that specify where to search : MagicSearchSource

    Return Value

    sorted list of

  • This is the asynchronous version of getContacts(). 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

    • deprecated: 08/04/2022 Use getContactsListAsync() instead.

    Declaration

    Swift

    @available(*, deprecated)
    public func getContactsAsync(filter: String?, domain: String?, sourceFlags: Int)

    Parameters

    filter

    word we search

    domain

    domain which we want to search only

    sourceFlags

    Flags that specify where to search : MagicSearchSource

  • 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

    Swift

    public func getContactsList(filter: String?, domain: String?, sourceFlags: Int, aggregation: MagicSearchAggregation) -> [SearchResult]

    Parameters

    filter

    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 to merge results

    Return Value

    sorted list of

  • This is the asynchronous version of getContacts(). 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

    Swift

    public func getContactsListAsync(filter: String?, domain: String?, sourceFlags: Int, aggregation: MagicSearchAggregation)

    Parameters

    filter

    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 to merge results

  • Reset the cache to begin a new search.

    Declaration

    Swift

    public func resetSearchCache()