extensions/spellcheck/src/mozPersonalDictionary.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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 #ifndef mozPersonalDictionary_h__
michael@0 7 #define mozPersonalDictionary_h__
michael@0 8
michael@0 9 #include "nsCOMPtr.h"
michael@0 10 #include "nsString.h"
michael@0 11 #include "mozIPersonalDictionary.h"
michael@0 12 #include "nsIUnicodeEncoder.h"
michael@0 13 #include "nsIObserver.h"
michael@0 14 #include "nsWeakReference.h"
michael@0 15 #include "nsTHashtable.h"
michael@0 16 #include "nsCRT.h"
michael@0 17 #include "nsCycleCollectionParticipant.h"
michael@0 18 #include "nsHashKeys.h"
michael@0 19
michael@0 20 #define MOZ_PERSONALDICTIONARY_CONTRACTID "@mozilla.org/spellchecker/personaldictionary;1"
michael@0 21 #define MOZ_PERSONALDICTIONARY_CID \
michael@0 22 { /* 7EF52EAF-B7E1-462B-87E2-5D1DBACA9048 */ \
michael@0 23 0X7EF52EAF, 0XB7E1, 0X462B, \
michael@0 24 { 0X87, 0XE2, 0X5D, 0X1D, 0XBA, 0XCA, 0X90, 0X48 } }
michael@0 25
michael@0 26 class mozPersonalDictionary : public mozIPersonalDictionary,
michael@0 27 public nsIObserver,
michael@0 28 public nsSupportsWeakReference
michael@0 29 {
michael@0 30 public:
michael@0 31 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
michael@0 32 NS_DECL_MOZIPERSONALDICTIONARY
michael@0 33 NS_DECL_NSIOBSERVER
michael@0 34 NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(mozPersonalDictionary, mozIPersonalDictionary)
michael@0 35
michael@0 36 mozPersonalDictionary();
michael@0 37 virtual ~mozPersonalDictionary();
michael@0 38
michael@0 39 nsresult Init();
michael@0 40
michael@0 41 protected:
michael@0 42 bool mDirty; /* has the dictionary been modified */
michael@0 43 nsTHashtable<nsUnicharPtrHashKey> mDictionaryTable;
michael@0 44 nsTHashtable<nsUnicharPtrHashKey> mIgnoreTable;
michael@0 45 nsCOMPtr<nsIUnicodeEncoder> mEncoder; /*Encoder to use to compare with spellchecker word */
michael@0 46 };
michael@0 47
michael@0 48 #endif

mercurial