xpcom/ds/nsICollection.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: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 "nsISerializable.idl"
michael@0 7
michael@0 8 interface nsIEnumerator;
michael@0 9
michael@0 10 [scriptable, uuid(83b6019c-cbc4-11d2-8cca-0060b0fc14a3)]
michael@0 11 interface nsICollection : nsISerializable
michael@0 12 {
michael@0 13
michael@0 14 uint32_t Count();
michael@0 15 nsISupports GetElementAt(in uint32_t index);
michael@0 16 void QueryElementAt(in uint32_t index, in nsIIDRef uuid,
michael@0 17 [iid_is(uuid),retval] out nsQIResult result);
michael@0 18 void SetElementAt(in uint32_t index, in nsISupports item);
michael@0 19 void AppendElement(in nsISupports item);
michael@0 20 void RemoveElement(in nsISupports item);
michael@0 21
michael@0 22 nsIEnumerator Enumerate();
michael@0 23
michael@0 24 void Clear();
michael@0 25
michael@0 26 };
michael@0 27
michael@0 28 %{C++
michael@0 29
michael@0 30 #ifndef nsCOMPtr_h__
michael@0 31 #include "nsCOMPtr.h"
michael@0 32 #endif
michael@0 33
michael@0 34 class nsQueryElementAt : public nsCOMPtr_helper
michael@0 35 {
michael@0 36 public:
michael@0 37 nsQueryElementAt( nsICollection* aCollection, uint32_t aIndex, nsresult* aErrorPtr )
michael@0 38 : mCollection(aCollection),
michael@0 39 mIndex(aIndex),
michael@0 40 mErrorPtr(aErrorPtr)
michael@0 41 {
michael@0 42 // nothing else to do here
michael@0 43 }
michael@0 44
michael@0 45 virtual nsresult NS_FASTCALL operator()( const nsIID& aIID, void** ) const;
michael@0 46
michael@0 47 private:
michael@0 48 nsICollection* mCollection;
michael@0 49 uint32_t mIndex;
michael@0 50 nsresult* mErrorPtr;
michael@0 51 };
michael@0 52
michael@0 53 inline
michael@0 54 const nsQueryElementAt
michael@0 55 do_QueryElementAt( nsICollection* aCollection, uint32_t aIndex, nsresult* aErrorPtr = 0 )
michael@0 56 {
michael@0 57 return nsQueryElementAt(aCollection, aIndex, aErrorPtr);
michael@0 58 }
michael@0 59
michael@0 60 %}

mercurial