toolkit/components/places/nsITaggingService.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 interface nsIURI;
michael@0 9 interface nsIVariant;
michael@0 10
michael@0 11 [scriptable, uuid(f816b4df-f733-4dbd-964d-8bfc92a475b2)]
michael@0 12 interface nsITaggingService : nsISupports
michael@0 13 {
michael@0 14 /**
michael@0 15 * Tags a URL with the given set of tags. Current tags set for the URL
michael@0 16 * persist. Tags in aTags which are already set for the given URL are
michael@0 17 * ignored.
michael@0 18 *
michael@0 19 * @param aURI
michael@0 20 * the URL to tag.
michael@0 21 * @param aTags
michael@0 22 * Array of tags to set for the given URL. Each element within the
michael@0 23 * array can be either a tag name (non-empty string) or a concrete
michael@0 24 * itemId of a tag container.
michael@0 25 */
michael@0 26 void tagURI(in nsIURI aURI, in nsIVariant aTags);
michael@0 27
michael@0 28 /**
michael@0 29 * Removes tags from a URL. Tags from aTags which are not set for the
michael@0 30 * given URL are ignored.
michael@0 31 *
michael@0 32 * @param aURI
michael@0 33 * the URL to un-tag.
michael@0 34 * @param aTags
michael@0 35 * Array of tags to unset. Pass null to remove all tags from the given
michael@0 36 * url. Each element within the array can be either a tag name
michael@0 37 * (non-empty string) or a concrete itemId of a tag container.
michael@0 38 */
michael@0 39 void untagURI(in nsIURI aURI, in nsIVariant aTags);
michael@0 40
michael@0 41 /**
michael@0 42 * Retrieves all URLs tagged with the given tag.
michael@0 43 *
michael@0 44 * @param aTag
michael@0 45 * tag name
michael@0 46 * @returns Array of uris tagged with aTag.
michael@0 47 */
michael@0 48 nsIVariant getURIsForTag(in AString aTag);
michael@0 49
michael@0 50 /**
michael@0 51 * Retrieves all tags set for the given URL.
michael@0 52 *
michael@0 53 * @param aURI
michael@0 54 * a URL.
michael@0 55 * @returns array of tags (sorted by name).
michael@0 56 */
michael@0 57 void getTagsForURI(in nsIURI aURI,
michael@0 58 [optional] out unsigned long length,
michael@0 59 [retval, array, size_is(length)] out wstring aTags);
michael@0 60
michael@0 61 /**
michael@0 62 * Retrieves all tags used to tag URIs in the data-base (sorted by name).
michael@0 63 */
michael@0 64 readonly attribute nsIVariant allTags;
michael@0 65
michael@0 66 /**
michael@0 67 * Whether any tags exist.
michael@0 68 *
michael@0 69 * @note This is faster than allTags.length, since doesn't need to sort tags.
michael@0 70 */
michael@0 71 readonly attribute boolean hasTags;
michael@0 72 };
michael@0 73
michael@0 74 %{C++
michael@0 75
michael@0 76 #define TAGGING_SERVICE_CID "@mozilla.org/browser/tagging-service;1"
michael@0 77
michael@0 78 %}

mercurial