Liblinphone  4.5.0
Public Member Functions | List of all members
linphone::MagicSearch Class Reference

A MagicSearch is used to do specifics searchs. More...

#include <magic_search.hh>

Inheritance diagram for linphone::MagicSearch:

Public Member Functions

 MagicSearch (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneMagicSearch * cPtr ()
 
LINPHONECXX_PUBLIC std::string getDelimiter () const
 Get the delimiter used for the search. More...
 
LINPHONECXX_PUBLIC void setDelimiter (const std::string &delimiter)
 Set the delimiter used to find matched filter word. More...
 
LINPHONECXX_PUBLIC bool getLimitedSearch () const
 Return whether or not the search is limited. More...
 
LINPHONECXX_PUBLIC void setLimitedSearch (bool limited)
 Enable or disable the limited search. More...
 
LINPHONECXX_PUBLIC unsigned int getMaxWeight () const
 Get the maximum value used to calculate the weight in search. More...
 
LINPHONECXX_PUBLIC void setMaxWeight (unsigned int weight)
 Set the maximum value used to calculate the weight in search. More...
 
LINPHONECXX_PUBLIC unsigned int getMinWeight () const
 Get the minimum value used to calculate the weight in search. More...
 
LINPHONECXX_PUBLIC void setMinWeight (unsigned int weight)
 Set the minimum value used to calculate the weight in search. More...
 
LINPHONECXX_PUBLIC unsigned int getSearchLimit () const
 Get the number of maximum search result the search will return. More...
 
LINPHONECXX_PUBLIC void setSearchLimit (unsigned int limit)
 Set the number of the maximum SearchResult which will be returned. More...
 
LINPHONECXX_PUBLIC bool getUseDelimiter ()
 Returns whether the delimiter is being used for the search. More...
 
LINPHONECXX_PUBLIC void setUseDelimiter (bool enable)
 Enable or disable the delimiter in search. More...
 
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::SearchResult > > getContactListFromFilter (const std::string &filter, const std::string &domain) const
 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. More...
 
LINPHONECXX_PUBLIC void resetSearchCache ()
 Reset the cache to begin a new search.
 

Detailed Description

A MagicSearch is used to do specifics searchs.

Member Function Documentation

◆ getContactListFromFilter()

LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::SearchResult> > linphone::MagicSearch::getContactListFromFilter ( const std::string &  filter,
const std::string &  domain 
) const

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.

Parameters
domaindomain which we want to search only
Returns
sorted list of

◆ getDelimiter()

LINPHONECXX_PUBLIC std::string linphone::MagicSearch::getDelimiter ( ) const

Get the delimiter used for the search.

Returns
the delimiter used to find matched filter word

◆ getLimitedSearch()

LINPHONECXX_PUBLIC bool linphone::MagicSearch::getLimitedSearch ( ) const

Return whether or not the search is limited.

Returns
true if the search is limited, false otherwise

◆ getMaxWeight()

LINPHONECXX_PUBLIC unsigned int linphone::MagicSearch::getMaxWeight ( ) const

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

Returns
the maximum value used to calculate the weight in search

◆ getMinWeight()

LINPHONECXX_PUBLIC unsigned int linphone::MagicSearch::getMinWeight ( ) const

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

Returns
the minimum value used to calculate the weight in search

◆ getSearchLimit()

LINPHONECXX_PUBLIC unsigned int linphone::MagicSearch::getSearchLimit ( ) const

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

Returns
the number of the maximum SearchResult which will be returned

◆ getUseDelimiter()

LINPHONECXX_PUBLIC bool linphone::MagicSearch::getUseDelimiter ( )

Returns whether the delimiter is being used for the search.

Returns
if the delimiter search is used

◆ setDelimiter()

LINPHONECXX_PUBLIC void linphone::MagicSearch::setDelimiter ( const std::string &  delimiter)

Set the delimiter used to find matched filter word.

Parameters
delimiterdelimiter (example "-_.,")

◆ setLimitedSearch()

LINPHONECXX_PUBLIC void linphone::MagicSearch::setLimitedSearch ( bool  limited)

Enable or disable the limited search.

Parameters
limitedtrue to limit the search, false otherwise

◆ setMaxWeight()

LINPHONECXX_PUBLIC void linphone::MagicSearch::setMaxWeight ( unsigned int  weight)

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

Parameters
weightmaximum weight

◆ setMinWeight()

LINPHONECXX_PUBLIC void linphone::MagicSearch::setMinWeight ( unsigned int  weight)

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

Parameters
weightminimum weight

◆ setSearchLimit()

LINPHONECXX_PUBLIC void linphone::MagicSearch::setSearchLimit ( unsigned int  limit)

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

Parameters
limitthe maximum number of SearchResult the search will return

◆ setUseDelimiter()

LINPHONECXX_PUBLIC void linphone::MagicSearch::setUseDelimiter ( bool  enable)

Enable or disable the delimiter in search.

Parameters
enabletrue to use the delimiter, false otherwise

The documentation for this class was generated from the following file: