xpcom/base/nsIStatusReporter.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: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsISimpleEnumerator;
michael@0 10
michael@0 11 /*
michael@0 12 * Status reporters show Firefox's service status.
michael@0 13 */
michael@0 14
michael@0 15 [scriptable, uuid(ffcb716c-deeb-44ea-9d9d-ab25dc6980a8)]
michael@0 16 interface nsIStatusReporter : nsISupports
michael@0 17 {
michael@0 18 readonly attribute ACString name;
michael@0 19 /*
michael@0 20 * The name of the process containing this reporter. Each reporter initially
michael@0 21 * has "" in this field, indicating that it applies to the current process.
michael@0 22 */
michael@0 23 readonly attribute ACString process;
michael@0 24 /*
michael@0 25 * A human-readable status description.
michael@0 26 */
michael@0 27 readonly attribute AUTF8String description;
michael@0 28 };
michael@0 29
michael@0 30 [scriptable, uuid(fd531273-3319-4fcd-90f2-9f53876c3828)]
michael@0 31 interface nsIStatusReporterManager : nsISupports
michael@0 32 {
michael@0 33
michael@0 34 /*
michael@0 35 * Return an enumerator of nsIStatusReporters that are currently registered.
michael@0 36 */
michael@0 37 nsISimpleEnumerator enumerateReporters();
michael@0 38
michael@0 39 /*
michael@0 40 * Register the given nsIStatusReporter. After a reporter is registered,
michael@0 41 * it will be available via enumerateReporters(). The Manager service
michael@0 42 * will hold a strong reference to the given reporter.
michael@0 43 */
michael@0 44 void registerReporter(in nsIStatusReporter reporter);
michael@0 45
michael@0 46 /*
michael@0 47 * Unregister the given status reporter.
michael@0 48 */
michael@0 49 void unregisterReporter(in nsIStatusReporter reporter);
michael@0 50
michael@0 51 /*
michael@0 52 * Initialize.
michael@0 53 */
michael@0 54 void init();
michael@0 55
michael@0 56 /*
michael@0 57 * Dump service status as a json file
michael@0 58 */
michael@0 59 void dumpReports();
michael@0 60 };
michael@0 61
michael@0 62 %{C++
michael@0 63
michael@0 64 /*
michael@0 65 * Note that this defaults 'process' to "", which is usually what's desired.
michael@0 66 */
michael@0 67 #define NS_STATUS_REPORTER_IMPLEMENT(_classname, _name, _desc_Function) \
michael@0 68 class StatusReporter_##_classname MOZ_FINAL : public nsIStatusReporter { \
michael@0 69 public: \
michael@0 70 NS_DECL_ISUPPORTS \
michael@0 71 NS_IMETHOD GetName(nsACString &name) \
michael@0 72 { name.AssignLiteral(_name); return NS_OK; } \
michael@0 73 NS_IMETHOD GetProcess(nsACString &process) \
michael@0 74 { process.Truncate(); return NS_OK; } \
michael@0 75 NS_IMETHOD GetDescription(nsACString &desc) \
michael@0 76 { _desc_Function(desc); return NS_OK; } \
michael@0 77 }; \
michael@0 78 NS_IMPL_ISUPPORTS(StatusReporter_##_classname, nsIStatusReporter)
michael@0 79
michael@0 80 #define NS_STATUS_REPORTER_NAME(_classname) StatusReporter_##_classname
michael@0 81
michael@0 82 nsresult NS_RegisterStatusReporter(nsIStatusReporter *reporter);
michael@0 83 nsresult NS_UnregisterStatusReporter(nsIStatusReporter *reporter);
michael@0 84 nsresult NS_DumpStatusReporter();
michael@0 85
michael@0 86 #define NS_STATUS_REPORTER_MANAGER_CID \
michael@0 87 { 0xe8eb4e7e, 0xf2cf, 0x45e5, \
michael@0 88 { 0xb8, 0xa4, 0x6a, 0x0f, 0x50, 0x18, 0x84, 0x63 } }
michael@0 89 %}

mercurial