2008-07-22 16:21:15 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-30 20:48:24 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-07-22 16:21:15 +04:00
|
|
|
|
|
|
|
#include "nsIAutoCompleteResult.idl"
|
|
|
|
|
|
|
|
interface nsIAbCard;
|
2021-03-11 19:57:04 +03:00
|
|
|
interface nsIAbDirectory;
|
2008-07-22 16:21:15 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This interface is used to extend the nsIAutoCompleteResult interface to
|
|
|
|
* provide extra facilities for obtaining more details of the results of
|
|
|
|
* an address book search.
|
|
|
|
*/
|
2016-01-10 13:46:00 +03:00
|
|
|
[scriptable, uuid(c0d35623-f719-4e43-ae24-573e393f87f9)]
|
2008-07-22 16:21:15 +04:00
|
|
|
interface nsIAbAutoCompleteResult : nsIAutoCompleteResult {
|
|
|
|
/**
|
|
|
|
* Get the card from the result at the given index
|
|
|
|
*/
|
|
|
|
nsIAbCard getCardAt(in long index);
|
2009-10-19 16:26:33 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the email to use for the card within the result at the given index.
|
|
|
|
* This is the email that was matched against for the card where there are
|
|
|
|
* multiple email addresses on a card.
|
|
|
|
*
|
|
|
|
* @param index Index of the autocomplete result to return the value for.
|
|
|
|
* @result The email address to use from the card.
|
|
|
|
*/
|
|
|
|
AString getEmailToUse(in long index);
|
2016-01-10 13:46:00 +03:00
|
|
|
|
2021-03-11 19:57:04 +03:00
|
|
|
/**
|
|
|
|
* Indicates whether the source that returned this result returned a
|
|
|
|
* complete result for the query. If true, refining the search will not
|
|
|
|
* trigger a new query, instead simply filtering the previous results.
|
|
|
|
* If false, the directory will be present in asyncDirectories.
|
|
|
|
*/
|
2024-04-05 13:06:39 +03:00
|
|
|
boolean isCompleteResult(in long index);
|
2021-03-11 19:57:04 +03:00
|
|
|
|
2016-01-10 13:46:00 +03:00
|
|
|
/**
|
|
|
|
* The template used to build the query for this search. Optional.
|
|
|
|
*/
|
|
|
|
attribute AString modelQuery;
|
2021-03-11 19:57:04 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Asynchronous address books that were unable to return full results.
|
2022-04-30 13:30:36 +03:00
|
|
|
* This means that they need to be required rather than simply filtered.
|
2021-03-11 19:57:04 +03:00
|
|
|
*/
|
|
|
|
attribute Array<nsIAbDirectory> asyncDirectories;
|
2008-07-22 16:21:15 +04:00
|
|
|
};
|