Fix API reference and return value of ttse_main 37/89337/4 accepted/tizen/common/20160927.152543 accepted/tizen/ivi/20160927.084114 accepted/tizen/mobile/20160927.084329 accepted/tizen/tv/20160927.084305 accepted/tizen/wearable/20160927.084203 submit/tizen/20160926.225027
authorsooyeon.kim <sooyeon.kim@samsung.com>
Fri, 23 Sep 2016 06:40:00 +0000 (15:40 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Fri, 23 Sep 2016 09:29:39 +0000 (18:29 +0900)
Change-Id: I82e75d3b52d8344fe1c1f4e07bd8e63953241c40
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
include/tts.h
include/ttse.h
server/ttse.c

index eb3bd3d..ff1d0d8 100644 (file)
@@ -850,7 +850,7 @@ int tts_unset_default_voice_changed_cb(tts_h tts);
  * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
  *
  * @param[in] tts The TTS handle
- * @param]in] callback The callback function to register
+ * @param[in] callback The callback function to register
  * @param[in] user_data The user data to be passed to the callback function
  *
  * @return 0 on success, otherwise a negative error value
@@ -889,4 +889,8 @@ int tts_unset_engine_changed_cb(tts_h tts);
 }
 #endif
 
+/**
+ * @}@}
+ */
+
 #endif /* __TTS_H__ */
index 744f459..c2dbfde 100755 (executable)
@@ -650,4 +650,8 @@ int ttse_set_private_data_requested_cb(ttse_private_data_requested_cb callback_f
 }
 #endif
 
+/**
+ * @}@}
+ */
+
 #endif /* __TTSE_H__ */
index 358d38a..d5ab9e9 100755 (executable)
@@ -56,6 +56,7 @@ int ttse_main(int argc, char** argv, ttse_request_callback_s *callback)
 {
        bundle *b = NULL;
        ttsd_mode_e mode = TTSD_MODE_DEFAULT;
+       int ret = TTSE_ERROR_NONE;
 
        b = bundle_import_from_argv(argc, argv);
        if (NULL != b) {
@@ -76,6 +77,7 @@ int ttse_main(int argc, char** argv, ttse_request_callback_s *callback)
                        SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to get data from bundle");
                }
                bundle_free(b);
+               val = NULL;
        } else {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to get bundle");
        }
@@ -86,17 +88,21 @@ int ttse_main(int argc, char** argv, ttse_request_callback_s *callback)
 
        if (!ecore_init()) {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to initialize Ecore");
-               return -1;
+               return TTSE_ERROR_OPERATION_FAILED;
        }
 
        if (0 != ttsd_dbus_open_connection()) {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to open dbus connection");
-               return -1;
+               ecore_shutdown();
+               return TTSE_ERROR_OPERATION_FAILED;
        }
 
-       if (0 != ttsd_initialize(callback)) {
+       ret = ttsd_initialize(callback);
+       if (0 != ret) {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to initialize");
-               return -1;
+               ttsd_dbus_close_connection();
+               ecore_shutdown();
+               return ret;
        }
 
        if (0 != ttsd_network_initialize()) {
@@ -111,7 +117,7 @@ int ttse_main(int argc, char** argv, ttse_request_callback_s *callback)
        SLOG(LOG_DEBUG, tts_tag(), "====");
        SLOG(LOG_DEBUG, tts_tag(), "");
 
-       return 0;
+       return TTSE_ERROR_NONE;
 }
 
 int ttse_get_speed_range(int* min, int* normal, int* max)