TelepathyGLib.ContactSearch¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
A |
||
r/w |
The maximum number of results to be returned by the server |
||
r/w/co |
The server on which to search for contacts |
||
r |
The search’s state |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when search results are received. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class TelepathyGLib.ContactSearch(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An object for Telepathy contact searches. There are no interesting public struct fields.
New in version 0.13.11.
- classmethod new_async(account, server, limit, callback, *user_data)¶
- Parameters:
account (
TelepathyGLib.Account
) – an account for the contact searchserver (
str
) – the server on which to search for contacts, orNone
limit (
int
) – The maximum number of results the server should return, or 0 for the server default.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the initialization is finisheduser_data (
object
orNone
) – data to pass to the callback function
New in version 0.13.11.
- classmethod new_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – theGio.AsyncResult
from the callback- Raises:
- Returns:
a new contact search object, or
None
in case of error.- Return type:
New in version 0.13.11.
- get_account()¶
- Returns:
The
TelepathyGLib.ContactSearch
:account
property- Return type:
New in version 0.13.11.
- get_limit()¶
- Returns:
The
TelepathyGLib.ContactSearch
:limit
property- Return type:
New in version 0.13.11.
- get_search_keys()¶
-
Get the search keys for a contact search. The keys are vCard field names in lower case, except when they’re one of the special cases from telepathy-spec like “tel;cell” or “x-n-given”. See the
Channel.Type.ContactSearch interface for a list of the special cases.
New in version 0.13.11.
- get_server()¶
- Returns:
The
TelepathyGLib.ContactSearch
:server
property- Return type:
New in version 0.13.11.
- reset_async(server, limit, callback, *user_data)¶
- Parameters:
server (
str
) – the server on which to search for contacts, orNone
limit (
int
) – The maximum number of results the server should return, or 0 for the server default.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the initialization is finisheduser_data (
object
orNone
) – data to pass to the callback function
Resets the contact search object so a new search can be performed. If another
TelepathyGLib.ContactSearch.reset_async
() call is in progress, it will be cancelled andTelepathyGLib.ContactSearch.reset_finish
() will return an appropriate error.New in version 0.13.11.
- reset_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – theGio.AsyncResult
from the callback- Raises:
- Returns:
the new search keys, or
None
in case of error.- Return type:
[
str
]
New in version 0.13.11.
- start(criteria)¶
- Parameters:
criteria ({
str
:str
}) – a map from keys returned byTelepathyGLib.ContactSearch.get_search_keys
() to values to search for
Starts a search for the keys specified in criteria. Connect to the
TelepathyGLib.ContactSearch
::search-results-received
signal before calling this function.Before searching again on the same
TelepathyGLib.ContactSearch
, you must callTelepathyGLib.ContactSearch.reset_async
().New in version 0.13.11.
Signal Details¶
- TelepathyGLib.ContactSearch.signals.search_results_received(contact_search, results)¶
- Signal Name:
search-results-received
- Flags:
- Parameters:
contact_search (
TelepathyGLib.ContactSearch
) – The object which received the signalresults ([
TelepathyGLib.ContactSearchResult
]) – aGLib.List
with the search results
Emitted when search results are received. Note that this signal may be emitted multiple times for the same search.
New in version 0.13.11.
Property Details¶
- TelepathyGLib.ContactSearch.props.account¶
- Name:
account
- Type:
- Default Value:
- Flags:
This search’s account.
New in version 0.13.11.
- TelepathyGLib.ContactSearch.props.limit¶
-
The maximum number of results that the server should return. This is only supported by some protocols; use
TelepathyGLib.Capabilities.supports_contact_search
() to check if it’s supported.To change the limit after the object has been constructed, use
TelepathyGLib.ContactSearch.reset_async
().New in version 0.13.11.
- TelepathyGLib.ContactSearch.props.server¶
- Name:
server
- Type:
- Default Value:
- Flags:
The search server. This is only supported by some protocols; use
TelepathyGLib.Capabilities.supports_contact_search
() to check if it’s supported.To change the server after the object has been constructed, use
TelepathyGLib.ContactSearch.reset_async
().New in version 0.13.11.
- TelepathyGLib.ContactSearch.props.state¶
-
This search’s state, as a
TelepathyGLib.ChannelContactSearchState
.New in version 0.13.11.