/* * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Flora License, Version 1.1 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://floralicense.org/license/ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "gear-racing-controller.h" #include "model/model_cloud_connection.h" #include "controller/controller_name_input.h" #include "view_manager/view_manager.h" static s_controller s_info = { 0, }; void controller_name_input_destroy(void) { model_cloud_connection_unsubscirbe_event(); } static void _connected_cb(s_model_cloud_connection_cb_data *model_data) { view_manager_set_view(VIEW_HELP); } void controller_name_input_init(t_view_update_cb view_update_cb) { s_info.view_update_cb = view_update_cb; model_cloud_connection_subscribe_event(_connected_cb); } void controller_name_input_back(void) { controller_name_input_destroy(); } void controller_name_input_next() { model_cloud_connection_model_state_change(); } void controller_player_name_set(const char *player_name) { model_cloud_connection_player_name_set(player_name); }