2006-07-18 14:52:50 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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/. */
|
2006-07-18 14:52:50 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2012-02-24 12:42:21 +00:00
|
|
|
/**
|
|
|
|
* WARNING:
|
|
|
|
*
|
|
|
|
* This interface is deprecated and will be removed in a future release.
|
|
|
|
* Use the mozIAsyncLivemarks interface instead.
|
|
|
|
*/
|
|
|
|
|
2006-07-18 14:52:50 +00:00
|
|
|
interface nsIURI;
|
2006-12-14 17:28:52 +00:00
|
|
|
interface nsINavBookmarksService;
|
2006-07-18 14:52:50 +00:00
|
|
|
|
2009-06-22 23:00:51 +00:00
|
|
|
[scriptable, uuid(62a5fe00-d85c-4a63-aef7-176d8f1b189d)]
|
2007-08-02 20:19:44 +00:00
|
|
|
interface nsILivemarkService : nsISupports
|
2006-07-18 14:52:50 +00:00
|
|
|
{
|
2008-01-18 06:58:52 +00:00
|
|
|
/**
|
|
|
|
* Starts the livemark refresh timer.
|
|
|
|
* Being able to manually control this allows activity such
|
|
|
|
* as bookmarks import to occur without kicking off HTTP traffic.
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @note This is a no-op and exists just as a compatibility shim.
|
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2008-01-18 06:58:52 +00:00
|
|
|
*/
|
|
|
|
void start();
|
|
|
|
|
2008-09-27 11:05:28 +00:00
|
|
|
/**
|
|
|
|
* Stop the livemark refresh timer.
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @note This is a no-op and exists just as a compatibility shim.
|
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2008-09-27 11:05:28 +00:00
|
|
|
*/
|
|
|
|
void stopUpdateLivemarks();
|
|
|
|
|
2006-07-18 14:52:50 +00:00
|
|
|
/**
|
|
|
|
* Creates a new livemark
|
|
|
|
* @param folder The id of the parent folder
|
|
|
|
* @param name The name to show when displaying the livemark
|
|
|
|
* @param siteURI The URI of the site the livemark was created from
|
|
|
|
* @param feedURI The URI of the actual RSS feed
|
2011-06-14 23:54:31 +00:00
|
|
|
* @param index The index to insert at, or
|
|
|
|
* nsINavBookmarksService.DEFAULT_INDEX to append.
|
2006-07-18 14:52:50 +00:00
|
|
|
* @returns the ID of the folder for the livemark
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2006-07-18 14:52:50 +00:00
|
|
|
*/
|
2007-05-23 01:18:21 +00:00
|
|
|
long long createLivemark(in long long folder,
|
|
|
|
in AString name,
|
|
|
|
in nsIURI siteURI,
|
|
|
|
in nsIURI feedURI,
|
|
|
|
in long index);
|
2006-07-18 14:53:35 +00:00
|
|
|
|
2006-12-14 17:28:52 +00:00
|
|
|
/**
|
|
|
|
* Same as above, use during startup to avoid HTTP traffic
|
|
|
|
*/
|
2008-02-09 04:41:35 +00:00
|
|
|
long long createLivemarkFolderOnly(in long long folder,
|
2007-05-23 01:18:21 +00:00
|
|
|
in AString name,
|
|
|
|
in nsIURI siteURI,
|
|
|
|
in nsIURI feedURI,
|
|
|
|
in long index);
|
2006-12-14 17:28:52 +00:00
|
|
|
|
2006-07-18 14:54:21 +00:00
|
|
|
/**
|
|
|
|
* Determines whether the folder with the given folder ID identifies
|
|
|
|
* a livemark container.
|
|
|
|
*
|
|
|
|
* @param folder A folder ID
|
|
|
|
*
|
|
|
|
* @returns true if the given folder is a livemark folder, or
|
|
|
|
* false otherwise
|
|
|
|
*
|
|
|
|
* @throws NS_ERROR_INVALID_ARG if the folder ID isn't known
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2006-07-18 14:54:21 +00:00
|
|
|
*/
|
2007-05-23 01:18:21 +00:00
|
|
|
boolean isLivemark(in long long folder);
|
2006-07-18 14:54:21 +00:00
|
|
|
|
2009-06-22 23:00:51 +00:00
|
|
|
/**
|
|
|
|
* Determines whether the feed URI is a currently registered livemark.
|
|
|
|
*
|
|
|
|
* @param aFeedURI
|
|
|
|
* Feed URI to look for.
|
|
|
|
*
|
|
|
|
* @returns the found livemark folder id, or -1 if nothing was found.
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2009-06-22 23:00:51 +00:00
|
|
|
*/
|
|
|
|
long long getLivemarkIdForFeedURI(in nsIURI aFeedURI);
|
|
|
|
|
2006-07-18 14:54:21 +00:00
|
|
|
/**
|
|
|
|
* Gets the URI of the website associated with a livemark container.
|
|
|
|
*
|
|
|
|
* @param container The folder ID of a livemark container
|
|
|
|
*
|
|
|
|
* @returns nsIURI representing the URI of the website; if the livemark
|
|
|
|
* container doesn't have a valid site URI, null will be returned
|
|
|
|
*
|
|
|
|
* @throws NS_ERROR_INVALID_ARG if the folder ID isn't known or identifies
|
|
|
|
* a folder that isn't a livemark container
|
|
|
|
* @throws NS_ERROR_MALFORMED_URI if the site URI annotation has
|
|
|
|
* somehow been corrupted (and can't be turned into an nsIURI)
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2006-07-18 14:54:21 +00:00
|
|
|
*/
|
2007-05-23 01:18:21 +00:00
|
|
|
nsIURI getSiteURI(in long long container);
|
2006-07-18 14:54:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the URI of the website associated with a livemark container.
|
|
|
|
*
|
|
|
|
* @param container The folder ID of a livemark container
|
|
|
|
* @param siteURI nsIURI object representing the site URI, or null
|
|
|
|
* to clear the site URI for this livemark container
|
|
|
|
*
|
|
|
|
* @throws NS_ERROR_INVALID_ARG if the folder ID isn't known or identifies
|
|
|
|
* a folder that isn't a livemark container; also if the siteURI
|
|
|
|
* argument isn't a valid nsIURI object (or null)
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @note This is a no-op and exists just as a compatibility shim.
|
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2006-07-18 14:54:21 +00:00
|
|
|
*/
|
2007-05-23 01:18:21 +00:00
|
|
|
void setSiteURI(in long long container, in nsIURI siteURI);
|
2006-07-18 14:54:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the URI of the syndication feed associated with a livemark container.
|
|
|
|
*
|
|
|
|
* @param container The folder ID of a livemark container
|
|
|
|
*
|
|
|
|
* @returns nsIURI representing the URI of the feed; if the livemark
|
|
|
|
* container doesn't have a valid feed URI, null will be returned
|
|
|
|
* of the nsIURI object returned will be the empty string.
|
|
|
|
*
|
|
|
|
* @throws NS_ERROR_INVALID_ARG if the folder ID isn't known or identifies
|
|
|
|
* a folder that isn't a livemark container
|
|
|
|
* @throws NS_ERROR_MALFORMED_URI if the site URI annotation has
|
|
|
|
* somehow been corrupted (and can't be turned into an nsIURI)
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2006-07-18 14:54:21 +00:00
|
|
|
*/
|
2007-05-23 01:18:21 +00:00
|
|
|
nsIURI getFeedURI(in long long container);
|
2006-07-18 14:54:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the URI of the feed associated with a livemark container.
|
|
|
|
*
|
|
|
|
* NOTE: The caller is responsible for reloading the livemark after
|
|
|
|
* changing its feed URI (since the contents are likely to be different
|
|
|
|
* given a different feed).
|
|
|
|
*
|
|
|
|
* @param container The folder ID of a livemark container
|
|
|
|
* @param feedURI nsIURI object representing the syndication feed URI
|
|
|
|
*
|
|
|
|
* @throws NS_ERROR_INVALID_ARG if the folder ID isn't known or identifies
|
|
|
|
* a folder that isn't a livemark container; also if the feedURI
|
|
|
|
* argument isn't a valid nsIURI object
|
2012-02-24 12:42:21 +00:00
|
|
|
*
|
|
|
|
* @note This is a no-op and exists just as a compatibility shim.
|
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
2006-07-18 14:54:21 +00:00
|
|
|
*/
|
2007-05-23 01:18:21 +00:00
|
|
|
void setFeedURI(in long long container, in nsIURI feedURI);
|
2006-07-18 14:54:21 +00:00
|
|
|
|
2012-02-24 12:42:21 +00:00
|
|
|
/**
|
|
|
|
* Reloads all livemark subscriptions, whether or not they've expired.
|
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
|
|
|
*/
|
2006-07-18 14:53:35 +00:00
|
|
|
void reloadAllLivemarks();
|
|
|
|
|
2012-02-24 12:42:21 +00:00
|
|
|
/**
|
|
|
|
* Reloads the livemark with this folder ID, whether or not it's expired.
|
|
|
|
* @param folderID The ID of the folder to be reloaded
|
|
|
|
*
|
|
|
|
* @deprecated use the mozIAsyncLivemarks interface instead.
|
|
|
|
*/
|
2007-05-23 01:18:21 +00:00
|
|
|
void reloadLivemarkFolder(in long long folderID);
|
2006-07-18 14:52:50 +00:00
|
|
|
};
|
2008-01-25 17:11:14 +00:00
|
|
|
|
|
|
|
%{C++
|
|
|
|
#define LMANNO_FEEDURI "livemark/feedURI"
|
|
|
|
%}
|