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 }
  • A MagicSearch is used to do specifics searchs.

    Declaration

    Swift

    public func addDelegate(delegate: MagicSearchDelegate)
  • A MagicSearch is used to do specifics searchs.

    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.

  • Get the delimiter used for the search.

    Declaration

    Swift

    public var delimiter: String { get set }

    Return Value

    the delimiter used to find matched filter word

  • Declaration

    Swift

    public var lastSearch: [SearchResult] { get }

    Return Value

    sorted list of

  • Return whether or not the search is limited.

    Declaration

    Swift

    public var limitedSearch: Bool { get set }

    Return Value

    true if the search is limited, false otherwise

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

    Declaration

    Swift

    public var maxWeight: UInt { get set }

    Return Value

    the maximum value used to calculate the weight in search

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

    Declaration

    Swift

    public var minWeight: UInt { get set }

    Return Value

    the minimum value used to calculate the weight in search

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

    Declaration

    Swift

    public var searchLimit: UInt { get set }

    Return Value

    the number of the maximum SearchResult which will be returned

  • Returns whether the delimiter is being used for the search.

    Declaration

    Swift

    public var useDelimiter: Bool { get set }

    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()