* If this function returns true, the main loop of the sertvice starts.
* If this function returns false, the service is terminated.
*/
-static bool app_create(void *user_data)
+static bool srv_create(void *user_data)
{
return true;
}
* @brief This callback function is called when another application.
* sends the launch request to the service.
*/
-static void app_control(app_control_h app_control, void *user_data)
+static void srv_control(app_control_h app_control, void *user_data)
{
/* Handle the launch request. */
}
* @brief This callback function is called once after the main loop.
* of the service exits.
*/
-static void app_terminate(void *user_data)
+static void srv_terminate(void *user_data)
{
/* Release all resources. */
}
/**
- * @brief This function will be called when the language is changed.
- */
-static void service_lang_changed(app_event_info_h event_info, void *user_data)
-{
- char *locale = NULL;
-
- system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
-
- if (locale != NULL) {
- elm_language_set(locale);
- free(locale);
- }
- return;
-}
-
-/**
* @brief Main function of the service.
*/
int main(int argc, char *argv[])
service_app_lifecycle_callback_s event_callback = {0, };
app_event_handler_h handlers[5] = {NULL, };
- event_callback.create = app_create;
- event_callback.terminate = app_terminate;
- event_callback.app_control = app_control;
+ event_callback.create = srv_create;
+ event_callback.terminate = srv_terminate;
+ event_callback.app_control = srv_control;
/*
* If you want to handling more events,