summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2021-05-31 17:49:31 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2021-05-31 17:51:07 +0900
commit07b1df271468f8dc9905a84bb98b31b8cb5a04de (patch)
tree77c941759fb50efe30d08b483acbda702138bcac /src
parenta5a25e3b8830166fee3be5977f9237b0674e3af0 (diff)
downloadise-default-07b1df271468f8dc9905a84bb98b31b8cb5a04de.tar.gz
ise-default-07b1df271468f8dc9905a84bb98b31b8cb5a04de.tar.bz2
ise-default-07b1df271468f8dc9905a84bb98b31b8cb5a04de.zip
Fix build error on x86_64 architecture
Change-Id: Ie8fedf329ff6259a534130cd3cdf8c4945d44f3d Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/nmt.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nmt.cpp b/src/nmt.cpp
index ea25266..654ca2f 100644
--- a/src/nmt.cpp
+++ b/src/nmt.cpp
@@ -27,6 +27,7 @@
#undef LOG_TAG
#define LOG_TAG "ISE_DEFAULT"
+#ifdef SUPPORT_NMT
static samsung_ai_nmt_h g_nmt_h;
static bool g_selected_text_exist = false;
@@ -95,9 +96,11 @@ static void _nmt_translate_result_cb(samsung_ai_nmt_h nmt_h, unsigned int reques
translated_text = NULL;
}
}
+#endif
bool nmt_init()
{
+#ifdef SUPPORT_NMT
int ret = samsung_ai_nmt_create(&g_nmt_h, _nmt_connection_status_changed_cb, NULL);
if (ret != SAMSUNG_AI_NMT_ERROR_NONE) {
LOGE("Failed to initialize");
@@ -111,10 +114,14 @@ bool nmt_init()
}
return true;
+#else
+ return false;
+#endif
}
void nmt_shutdown()
{
+#ifdef SUPPORT_NMT
int ret = IME_ERROR_NONE;
if (g_nmt_h) {
ret = samsung_ai_nmt_destroy(g_nmt_h);
@@ -124,10 +131,12 @@ void nmt_shutdown()
g_nmt_h = NULL;
}
+#endif
}
void nmt_translate(const char *source_language, const char *target_language)
{
+#ifdef SUPPORT_NMT
int ret = IME_ERROR_NONE;
char *text = NULL;
unsigned int request_id = 0;
@@ -165,4 +174,5 @@ void nmt_translate(const char *source_language, const char *target_language)
free(text);
text = NULL;
+#endif
}