aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/dictionary.h
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-05-15 11:04:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-15 11:04:51 -0700
commit5ca33bdc5b48e90c313350baf7ad3e8c45ac4f8c (patch)
treee2e56d1d3f61fe6fd6b6dd496f62261bde04351a /native/jni/src/dictionary.h
parentfa51a86b314fe75f7766bc1055c5f2d93eaadd58 (diff)
parent12b35158efe759c772454059b69615b6c6b6b854 (diff)
downloadlatinime-5ca33bdc5b48e90c313350baf7ad3e8c45ac4f8c.tar.gz
latinime-5ca33bdc5b48e90c313350baf7ad3e8c45ac4f8c.tar.xz
latinime-5ca33bdc5b48e90c313350baf7ad3e8c45ac4f8c.zip
am 12b35158: am 1919072c: Merge "[ZF1] Check profanity in Java rather than in native"
* commit '12b35158efe759c772454059b69615b6c6b6b854': [ZF1] Check profanity in Java rather than in native
Diffstat (limited to 'native/jni/src/dictionary.h')
-rw-r--r--native/jni/src/dictionary.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/native/jni/src/dictionary.h b/native/jni/src/dictionary.h
index 0653d3ca9..2ad5b6c0b 100644
--- a/native/jni/src/dictionary.h
+++ b/native/jni/src/dictionary.h
@@ -31,6 +31,7 @@ class UnigramDictionary;
class Dictionary {
public:
// Taken from SuggestedWords.java
+ static const int KIND_MASK_KIND = 0xFF; // Mask to get only the kind
static const int KIND_TYPED = 0; // What user typed
static const int KIND_CORRECTION = 1; // Simple correction/suggestion
static const int KIND_COMPLETION = 2; // Completion (suggestion with appended chars)
@@ -41,6 +42,10 @@ class Dictionary {
static const int KIND_SHORTCUT = 7; // A shortcut
static const int KIND_PREDICTION = 8; // A prediction (== a suggestion with no input)
+ static const int KIND_MASK_FLAGS = 0xFFFFFF00; // Mask to get the flags
+ static const int KIND_FLAG_POSSIBLY_OFFENSIVE = 0x80000000;
+ static const int KIND_FLAG_EXACT_MATCH = 0x40000000;
+
Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust);
int getSuggestions(ProximityInfo *proximityInfo, void *traverseSession, int *xcoordinates,