Struct xpcom::interfaces::nsINavHistoryService
[−]
[src]
#[repr(C)]pub struct nsINavHistoryService { /* fields omitted */ }
interface nsINavHistoryService : nsISupports
Methods
impl nsINavHistoryService
[src]
pub fn coerce<T: nsINavHistoryServiceCoerce>(&self) -> &T
[src]
Cast this nsINavHistoryService
to one of its base interfaces.
impl nsINavHistoryService
[src]
pub const TRANSITION_LINK: i64
TRANSITION_LINK: i64 = 1
/**
* System Notifications:
*
* places-init-complete - Sent once the History service is completely
* initialized successfully.
* places-database-locked - Sent if initialization of the History service
* failed due to the inability to open the places.sqlite
* for access reasons.
*/
/**
* This transition type means the user followed a link and got a new toplevel
* window.
*/
pub const TRANSITION_TYPED: i64
TRANSITION_TYPED: i64 = 2
/**
* This transition type means that the user typed the page's URL in the
* URL bar or selected it from URL bar autocomplete results, clicked on
* it from a history query (from the History sidebar, History menu,
* or history query in the personal toolbar or Places organizer.
*/
pub const TRANSITION_BOOKMARK: i64
TRANSITION_BOOKMARK: i64 = 3
/**
* This transition is set when the user followed a bookmark to get to the
* page.
*/
pub const TRANSITION_EMBED: i64
TRANSITION_EMBED: i64 = 4
/**
* This transition type is set when some inner content is loaded. This is
* true of all images on a page, and the contents of the iframe. It is also
* true of any content in a frame if the user did not explicitly follow
* a link to get there.
*/
pub const TRANSITION_REDIRECT_PERMANENT: i64
TRANSITION_REDIRECT_PERMANENT: i64 = 5
/**
* Set when the transition was a permanent redirect.
*/
pub const TRANSITION_REDIRECT_TEMPORARY: i64
TRANSITION_REDIRECT_TEMPORARY: i64 = 6
/**
* Set when the transition was a temporary redirect.
*/
pub const TRANSITION_DOWNLOAD: i64
TRANSITION_DOWNLOAD: i64 = 7
/**
* Set when the transition is a download.
*/
pub const TRANSITION_FRAMED_LINK: i64
TRANSITION_FRAMED_LINK: i64 = 8
/**
* This transition type means the user followed a link and got a visit in
* a frame.
*/
pub const TRANSITION_RELOAD: i64
TRANSITION_RELOAD: i64 = 9
/**
* This transition type means the page has been reloaded.
*/
pub const DATABASE_STATUS_OK: i64
DATABASE_STATUS_OK: i64 = 0
/**
* Set when database is coherent
*/
pub const DATABASE_STATUS_CREATE: i64
DATABASE_STATUS_CREATE: i64 = 1
/**
* Set when database did not exist and we created a new one.
*/
pub const DATABASE_STATUS_CORRUPT: i64
DATABASE_STATUS_CORRUPT: i64 = 2
/**
* Set when database was corrupt and we replaced it with a new one.
*/
pub const DATABASE_STATUS_UPGRADED: i64
DATABASE_STATUS_UPGRADED: i64 = 3
/**
* Set when database schema has been upgraded.
*/
pub const DATABASE_STATUS_LOCKED: i64
DATABASE_STATUS_LOCKED: i64 = 4
/**
* Set when database couldn't be opened.
*/
pub unsafe fn GetDatabaseStatus(
&self,
aDatabaseStatus: *mut uint16_t
) -> nsresult
[src]
&self,
aDatabaseStatus: *mut uint16_t
) -> nsresult
/**
* Returns the current database status
*/
readonly attribute unsigned short databaseStatus;
pub unsafe fn GetHasHistoryEntries(
&self,
aHasHistoryEntries: *mut bool
) -> nsresult
[src]
&self,
aHasHistoryEntries: *mut bool
) -> nsresult
/**
* True if there is any history. This can be used in UI to determine whether
* the "clear history" button should be enabled or not. This is much better
* than using BrowserHistory.count since that can be very slow if there is
* a lot of history (it must enumerate each item). This is pretty fast.
*/
readonly attribute boolean hasHistoryEntries;
pub unsafe fn GetPageTitle(
&self,
aURI: *const nsIURI,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
_retval: &mut nsAString
) -> nsresult
/**
* Gets the original title of the page.
* @deprecated use PlacesUtils.history.fetch instead.
*/
AString getPageTitle (in nsIURI aURI);
pub unsafe fn MarkPageAsFollowedBookmark(&self, aURI: *const nsIURI) -> nsresult
[src]
/**
* This is just like markPageAsTyped (in nsIBrowserHistory, also implemented
* by the history service), but for bookmarks. It declares that the given URI
* is being opened as a result of following a bookmark. If this URI is loaded
* soon after this message has been received, that transition will be marked
* as following a bookmark.
*/
void markPageAsFollowedBookmark (in nsIURI aURI);
pub unsafe fn MarkPageAsTyped(&self, aURI: *const nsIURI) -> nsresult
[src]
/**
* Designates the url as having been explicitly typed in by the user.
*
* @param aURI
* URI of the page to be marked.
*/
void markPageAsTyped (in nsIURI aURI);
pub unsafe fn MarkPageAsFollowedLink(&self, aURI: *const nsIURI) -> nsresult
[src]
/**
* Designates the url as coming from a link explicitly followed by
* the user (for example by clicking on it).
*
* @param aURI
* URI of the page to be marked.
*/
void markPageAsFollowedLink (in nsIURI aURI);
pub unsafe fn CanAddURI(
&self,
aURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* Returns true if this URI would be added to the history. You don't have to
* worry about calling this, adding a visit will always check before
* actually adding the page. This function is public because some components
* may want to check if this page would go in the history (i.e. for
* annotations).
*/
boolean canAddURI (in nsIURI aURI);
pub unsafe fn GetNewQuery(
&self,
_retval: *mut *const nsINavHistoryQuery
) -> nsresult
[src]
&self,
_retval: *mut *const nsINavHistoryQuery
) -> nsresult
/**
* This returns a new query object that you can pass to executeQuer[y/ies].
* It will be initialized to all empty (so using it will give you all history).
*/
nsINavHistoryQuery getNewQuery ();
pub unsafe fn GetNewQueryOptions(
&self,
_retval: *mut *const nsINavHistoryQueryOptions
) -> nsresult
[src]
&self,
_retval: *mut *const nsINavHistoryQueryOptions
) -> nsresult
/**
* This returns a new options object that you can pass to executeQuer[y/ies]
* after setting the desired options.
*/
nsINavHistoryQueryOptions getNewQueryOptions ();
pub unsafe fn ExecuteQuery(
&self,
aQuery: *const nsINavHistoryQuery,
options: *const nsINavHistoryQueryOptions,
_retval: *mut *const nsINavHistoryResult
) -> nsresult
[src]
&self,
aQuery: *const nsINavHistoryQuery,
options: *const nsINavHistoryQueryOptions,
_retval: *mut *const nsINavHistoryResult
) -> nsresult
/**
* Executes a single query.
*/
nsINavHistoryResult executeQuery (in nsINavHistoryQuery aQuery, in nsINavHistoryQueryOptions options);
pub unsafe fn ExecuteQueries(
&self,
aQueries: *mut *const nsINavHistoryQuery,
aQueryCount: uint32_t,
options: *const nsINavHistoryQueryOptions,
_retval: *mut *const nsINavHistoryResult
) -> nsresult
[src]
&self,
aQueries: *mut *const nsINavHistoryQuery,
aQueryCount: uint32_t,
options: *const nsINavHistoryQueryOptions,
_retval: *mut *const nsINavHistoryResult
) -> nsresult
/**
* Executes an array of queries. All of the query objects are ORed
* together. Within a query, all the terms are ANDed together as in
* executeQuery. See executeQuery()
*/
nsINavHistoryResult executeQueries ([array, size_is (aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions options);
pub unsafe fn QueryStringToQueries(
&self,
aQueryString: &nsACString,
aQueries: *mut *mut *const nsINavHistoryQuery,
aResultCount: *mut uint32_t,
options: *mut *const nsINavHistoryQueryOptions
) -> nsresult
[src]
&self,
aQueryString: &nsACString,
aQueries: *mut *mut *const nsINavHistoryQuery,
aResultCount: *mut uint32_t,
options: *mut *const nsINavHistoryQueryOptions
) -> nsresult
/**
* Converts a query URI-like string to an array of actual query objects for
* use to executeQueries(). The output query array may be empty if there is
* no information. However, there will always be an options structure returned
* (if nothing is defined, it will just have the default values).
*/
void queryStringToQueries (in AUTF8String aQueryString, [array, size_is (aResultCount)] out nsINavHistoryQuery aQueries, out unsigned long aResultCount, out nsINavHistoryQueryOptions options);
pub unsafe fn QueriesToQueryString(
&self,
aQueries: *mut *const nsINavHistoryQuery,
aQueryCount: uint32_t,
options: *const nsINavHistoryQueryOptions,
_retval: &mut nsACString
) -> nsresult
[src]
&self,
aQueries: *mut *const nsINavHistoryQuery,
aQueryCount: uint32_t,
options: *const nsINavHistoryQueryOptions,
_retval: &mut nsACString
) -> nsresult
/**
* Converts a query into an equivalent string that can be persisted. Inverse
* of queryStringToQueries()
*/
AUTF8String queriesToQueryString ([array, size_is (aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions options);
pub unsafe fn AddObserver(
&self,
observer: *const nsINavHistoryObserver,
ownsWeak: bool
) -> nsresult
[src]
&self,
observer: *const nsINavHistoryObserver,
ownsWeak: bool
) -> nsresult
/**
* Adds a history observer. If ownsWeak is false, the history service will
* keep an owning reference to the observer. If ownsWeak is true, then
* aObserver must implement nsISupportsWeakReference, and the history service
* will keep a weak reference to the observer.
*/
void addObserver (in nsINavHistoryObserver observer, [optional] in boolean ownsWeak);
pub unsafe fn RemoveObserver(
&self,
observer: *const nsINavHistoryObserver
) -> nsresult
[src]
&self,
observer: *const nsINavHistoryObserver
) -> nsresult
/**
* Removes a history observer.
*/
void removeObserver (in nsINavHistoryObserver observer);
pub unsafe fn GetObservers(
&self,
count: *mut uint32_t,
observers: *mut *mut *const nsINavHistoryObserver
) -> nsresult
[src]
&self,
count: *mut uint32_t,
observers: *mut *mut *const nsINavHistoryObserver
) -> nsresult
/**
* Gets an array of registered nsINavHistoryObserver objects.
*/
void getObservers ([optional] out unsigned long count, [array, size_is (count), retval] out nsINavHistoryObserver observers);
pub unsafe fn RunInBatchMode(
&self,
aCallback: *const nsINavHistoryBatchCallback,
aClosure: *const nsISupports
) -> nsresult
[src]
&self,
aCallback: *const nsINavHistoryBatchCallback,
aClosure: *const nsISupports
) -> nsresult
/**
* Runs the passed callback in batch mode. Use this when a lot of things
* are about to change. Calls can be nested, observers will only be
* notified when all batches begin/end.
*
* @param aCallback
* nsINavHistoryBatchCallback interface to call.
* @param aUserData
* Opaque parameter passed to nsINavBookmarksBatchCallback
*/
void runInBatchMode (in nsINavHistoryBatchCallback aCallback, in nsISupports aClosure);
pub unsafe fn GetHistoryDisabled(&self, aHistoryDisabled: *mut bool) -> nsresult
[src]
/**
* True if history is disabled. currently,
* history is disabled if the places.history.enabled pref is false.
*/
readonly attribute boolean historyDisabled;
pub unsafe fn ClearEmbedVisits(&self) -> nsresult
[src]
/**
* Clear all TRANSITION_EMBED visits.
*/
void clearEmbedVisits ();
pub unsafe fn MakeGuid(&self, _retval: &mut nsACString) -> nsresult
[src]
/**
* Generate a guid.
* Guids can be used for any places purposes (history, bookmarks, etc.)
* Returns null if the generation of the guid failed.
*/
ACString makeGuid ();
pub unsafe fn HashURL(
&self,
aSpec: &nsACString,
aMode: &nsACString,
_retval: *mut uint64_t
) -> nsresult
[src]
&self,
aSpec: &nsACString,
aMode: &nsACString,
_retval: *mut uint64_t
) -> nsresult
/**
* Returns a 48-bit hash for a URI spec.
*
* @param aSpec
* The URI spec to hash.
* @param aMode
* The hash mode: `""` (default), `"prefix_lo"`, or `"prefix_hi"`.
*/
unsigned long long hashURL (in ACString aSpec, [optional] in ACString aMode);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsINavHistoryService
[src]
const IID: nsIID
IID: nsIID = nsID(2317308542, 51671, 19025, [191, 12, 216, 111, 3, 121, 183, 1])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsINavHistoryService
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsINavHistoryService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.