Home | History | Annotate | Download | only in include
      1 /*
      2  * Copyright (C) 2008,2009  OMRON SOFTWARE Co., Ltd.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef _NJ_ERR_H_
     18 #define _NJ_ERR_H_
     19 
     20 #define NJ_ERR_CODE_MASK        (0x7F00)
     21 #define NJ_ERR_FUNC_MASK        (0x00FF)
     22 
     23 #define NJ_GET_ERR_CODE(x)      ((x) & NJ_ERR_CODE_MASK)
     24 #define NJ_GET_ERR_FUNC(x)      ((x) & NJ_ERR_FUNC_MASK)
     25 
     26 #define NJ_SET_ERR_VAL(x, y)    ((NJ_INT16)((x) | (y) | 0x8000))
     27 
     28 #define NJ_ERR_PARAM_DIC_NULL                       (0x0000)
     29 #define NJ_ERR_PARAM_YOMI_NULL                      (0x0100)
     30 #define NJ_ERR_PARAM_YOMI_SIZE                      (0x0200)
     31 #define NJ_ERR_PARAM_RESULT_NULL                    (0x0500)
     32 #define NJ_ERR_YOMI_TOO_LONG                        (0x0600)
     33 #define NJ_ERR_NO_RULEDIC                           (0x0800)
     34 #define NJ_ERR_PARAM_OPERATION                      (0x0900)
     35 #define NJ_ERR_PARAM_MODE                           (0x0A00)
     36 #define NJ_ERR_PARAM_KANJI_NULL                     (0x0B00)
     37 #define NJ_ERR_CANDIDATE_TOO_LONG                   (0x0C00)
     38 #define NJ_ERR_PARAM_CURSOR_NULL                    (0x0D00)
     39 #define NJ_ERR_DIC_TYPE_INVALID                     (0x0E00)
     40 #define NJ_ERR_DIC_HANDLE_NULL                      (0x0F00)
     41 #define NJ_ERR_FORMAT_INVALID                       (0x1000)
     42 #define NJ_ERR_NO_CANDIDATE_LIST                    (0x1100)
     43 #define NJ_ERR_AREASIZE_INVALID                     (0x1300)
     44 #define NJ_ERR_BUFFER_NOT_ENOUGH                    (0x1400)
     45 #define NJ_ERR_HINSI_GROUP_INVALID                  (0x1500)
     46 #define NJ_ERR_CREATE_TYPE_INVALID                  (0x1600)
     47 #define NJ_ERR_WORD_INFO_NULL                       (0x1700)
     48 #define NJ_ERR_DIC_NOT_FOUND                        (0x1800)
     49 #define NJ_ERR_CANNOT_GET_QUE                       (0x1900)
     50 #define NJ_ERR_INVALID_FLAG                         (0x1A00)
     51 #define NJ_ERR_INVALID_RESULT                       (0x1B00)
     52 #define NJ_ERR_INTERNAL                             (0x1D00)
     53 #define NJ_ERR_USER_YOMI_INVALID                    (0x1E00)
     54 #define NJ_ERR_USER_KOUHO_INVALID                   (0x1F00)
     55 #define NJ_ERR_USER_DIC_FULL                        (0x2000)
     56 #define NJ_ERR_SAME_WORD                            (0x2100)
     57 #define NJ_ERR_DIC_BROKEN                           (0x2200)
     58 #define NJ_ERR_WORD_NOT_FOUND                       (0x2400)
     59 #define NJ_ERR_DIC_VERSION_INVALID                  (0x2A00)
     60 #define NJ_ERR_DIC_FREQ_INVALID                     (0x2B00)
     61 #define NJ_ERR_CACHE_NOT_ENOUGH                     (0x2C00)
     62 #define NJ_ERR_CACHE_BROKEN                         (0x2D00)
     63 #define NJ_ERR_PARAM_ENV_NULL                       (0x2E00)
     64 #define NJ_ERR_PARAM_ILLEGAL_CHAR_LEN               (0x3200)
     65 
     66 
     67 #define NJ_FUNC_NJD_B_GET_CANDIDATE                 (0x0010)
     68 #define NJ_FUNC_NJD_B_GET_STROKE                    (0x0061)
     69 #define NJ_FUNC_NJD_B_SEARCH_WORD                   (0x0062)
     70 
     71 #define NJ_FUNC_NJD_F_GET_WORD                      (0x0011)
     72 #define NJ_FUNC_NJD_F_GET_STROKE                    (0x0012)
     73 #define NJ_FUNC_NJD_F_GET_CANDIDATE                 (0x0013)
     74 #define NJ_FUNC_NJD_L_DELETE_WORD                   (0x0014)
     75 #define NJ_FUNC_NJD_L_ADD_WORD                      (0x0015)
     76 #define NJ_FUNC_NJD_L_UNDO_LEARN                    (0x0016)
     77 #define NJ_FUNC_DELETE_INDEX                        (0x0017)
     78 #define NJ_FUNC_INSERT_INDEX                        (0x0018)
     79 #define NJ_FUNC_QUE_STRCMP_COMPLETE_WITH_HYOUKI     (0x0019)
     80 #define NJ_FUNC_NJD_L_GET_WORD                      (0x001B)
     81 #define NJ_FUNC_NJD_L_GET_CANDIDATE                 (0x001C)
     82 #define NJ_FUNC_NJD_L_GET_STROKE                    (0x001D)
     83 #define NJ_FUNC_QUE_STRCMP_FORWARD                  (0x001E)
     84 #define NJ_FUNC_NJD_L_CHECK_DIC                     (0x001F)
     85 #define NJ_FUNC_SEARCH_RANGE_BY_YOMI                (0x0020)
     86 #define NJ_FUNC_STR_QUE_CMP                         (0x0021)
     87 #define NJ_FUNC_WRITE_LEARN_DATA                    (0x0022)
     88 #define NJ_FUNC_NJD_R_CHECK_GROUP                   (0x0064)
     89 
     90 #define NJ_FUNC_CHECK_SEARCH_CURSOR                 (0x0023)
     91 #define NJ_FUNC_GET_WORD_AND_SEARCH_NEXT_WORD       (0x0024)
     92 
     93 #define NJ_FUNC_NJD_GET_WORD_DATA                   (0x0025)
     94 #define NJ_FUNC_NJD_GET_WORD                        (0x0027)
     95 #define NJ_FUNC_NJD_CHECK_DIC                       (0x0028)
     96 
     97 #define NJ_FUNC_NJ_CREATE_DIC                       (0x0029)
     98 #define NJ_FUNC_NJD_GET_STROKE                      (0x002A)
     99 #define NJ_FUNC_NJD_GET_CANDIDATE                   (0x002B)
    100 #define NJ_FUNC_NJ_SEARCH_WORD                      (0x002C)
    101 #define NJ_FUNC_NJ_GET_WORD                         (0x002D)
    102 #define NJ_FUNC_NJ_ADD_WORD                         (0x002E)
    103 #define NJ_FUNC_NJ_DELETE_WORD                      (0x002F)
    104 #define NJ_FUNC_NJ_CHECK_DIC                        (0x0030)
    105 #define NJ_FUNC_NJD_L_MAKE_SPACE                    (0x0053)
    106 #define NJ_FUNC_SEARCH_RANGE_BY_YOMI_MULTI          (0x0054)
    107 #define NJ_FUNC_NJD_L_GET_RELATIONAL_WORD           (0x0055)
    108 #define NJ_FUNC_QUE_STRCMP_INCLUDE                  (0x0056)
    109 #define NJ_FUNC_IS_CONTINUED                        (0x0057)
    110 #define NJ_FUNC_CONTINUE_CNT                        (0x0058)
    111 
    112 #define NJ_FUNC_SEARCH_WORD                         (0x003C)
    113 
    114 #define NJ_FUNC_NJ_SELECT                           (0x0040)
    115 #define NJ_FUNC_NJ_INIT                             (0x0041)
    116 #define NJ_FUNC_NJ_GET_CANDIDATE                    (0x0042)
    117 #define NJ_FUNC_NJ_GET_STROKE                       (0x0043)
    118 
    119 #define NJ_FUNC_NJ_MANAGE_LEARNDIC                  (0x0093)
    120 
    121 #endif
    122