intl/unicharutil/public/nsIUGenCategory.h

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 #ifndef nsIUGenCategory_h__
michael@0 6 #define nsIUGenCategory_h__
michael@0 7
michael@0 8
michael@0 9 #include "nsISupports.h"
michael@0 10 #include "nscore.h"
michael@0 11
michael@0 12 // {671fea05-fcee-4b1c-82a3-6eb03eda8ddc}
michael@0 13 #define NS_IUGENCATEGORY_IID \
michael@0 14 { 0x671fea05, 0xfcee, 0x4b1c, \
michael@0 15 { 0x82, 0xa3, 0x6e, 0xb0, 0x3e, 0xda, 0x8d, 0xdc } }
michael@0 16
michael@0 17
michael@0 18 class nsIUGenCategory : public nsISupports {
michael@0 19
michael@0 20 public:
michael@0 21
michael@0 22 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUGENCATEGORY_IID)
michael@0 23
michael@0 24 /**
michael@0 25 * Read http://unicode.org/reports/tr44/#General_Category_Values
michael@0 26 * for the detailed definition of the following categories
michael@0 27 */
michael@0 28 typedef enum {
michael@0 29 kUndefined = 0,
michael@0 30 kMark = 1, // Mn, Mc, and Me
michael@0 31 kNumber = 2, // Nd, Nl, and No
michael@0 32 kSeparator = 3, // Zs, Zl, and Zp
michael@0 33 kOther = 4, // Cc, Cf, Cs, Co, and Cn
michael@0 34 kLetter = 5, // Lu, Ll, Lt, Lm, and Lo
michael@0 35 kPunctuation = 6, // Pc, Pd, Ps, Pe, Pi, Pf, and Po
michael@0 36 kSymbol = 7 // Sm, Sc, Sk, and So
michael@0 37 } nsUGenCategory;
michael@0 38
michael@0 39 /**
michael@0 40 * Give a Unichar, return a nsUGenCategory
michael@0 41 */
michael@0 42 virtual nsUGenCategory Get(uint32_t aChar) = 0;
michael@0 43 };
michael@0 44
michael@0 45 NS_DEFINE_STATIC_IID_ACCESSOR(nsIUGenCategory, NS_IUGENCATEGORY_IID)
michael@0 46
michael@0 47 #endif /* nsIUGenCategory_h__ */

mercurial