--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef CONTROLLER_CONTROLLER_CONNECTION_SUCCESSED_H_
+#define CONTROLLER_CONTROLLER_CONNECTION_SUCCESSED_H_
+
+#include "controller/controller_base.h"
+
+void controller_connection_successed_init(t_view_update_cb view_update_cb);
+void controller_connection_successed_back_btn(void);
+void controller_connection_successed_next_page();
+
+#endif /* CONTROLLER_CONTROLLER_CONNECTION_SUCCESSED_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef CONTROLLER_CONTROLLER_EMERGENCY_STOP_H_
+#define CONTROLLER_CONTROLLER_EMERGENCY_STOP_H_
+
+#include "controller/controller_base.h"
+
+void controller_emergency_stop_init(t_view_update_cb view_update_cb);
+void controller_emergency_stop_back_btn(void);
+void controller_emergency_stop_next_page();
+
+#endif /* CONTROLLER_CONTROLLER_EMERGENCY_STOP_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef CONTROLLER_CONTROLLER_HELP_H_
+#define CONTROLLER_CONTROLLER_HELP_H_
+
+#include "controller/controller_base.h"
+
+void controller_help_init(t_view_update_cb view_update_cb);
+void controller_help_back_btn(void);
+void controller_help_next_page();
+
+#endif /* CONTROLLER_CONTROLLER_HELP_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef CONTROLLER_CONTROLLER_NAME_INPUT_H_
+#define CONTROLLER_CONTROLLER_NAME_INPUT_H_
+
+#include "controller/controller_base.h"
+
+void controller_name_input_init(t_view_update_cb view_update_cb);
+void controller_name_input_back_btn(void);
+void controller_name_input_next_page();
+
+#endif /* CONTROLLER_CONTROLLER_NAME_INPUT_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef CONTROLLER_CONTROLLER_NETWORK_FAILURE_H_
+#define CONTROLLER_CONTROLLER_NETWORK_FAILURE_H_
+
+#include "controller/controller_base.h"
+
+void controller_network_failure_init(t_view_update_cb view_update_cb);
+void controller_network_failure_back_btn(void);
+void controller_network_failure_next_page();
+
+#endif /* CONTROLLER_CONTROLLER_NETWORK_FAILURE_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef CONTROLLER_CONTROLLER_RACING_H_
+#define CONTROLLER_CONTROLLER_RACING_H_
+
+#include "controller/controller_base.h"
+
+void controller_racing_init(t_view_update_cb view_update_cb);
+void controller_racing_back_btn(void);
+void controller_racing_next_page();
+
+#endif /* CONTROLLER_CONTROLLER_RACING_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef CONTROLLER_CONTROLLER_RESET_H_
+#define CONTROLLER_CONTROLLER_RESET_H_
+
+#include "controller/controller_base.h"
+
+void controller_reset_init(t_view_update_cb view_update_cb);
+void controller_reset_back_btn(void);
+void controller_reset_next_page();
+
+#endif /* CONTROLLER_CONTROLLER_RESET_H_ */
#ifndef VIEW_VIEW_CAR_SELECTION_H_
#define VIEW_VIEW_CAR_SELECTION_H_
-void car_selection_init(Evas_Object *parent);
+void view_car_selection_init(Evas_Object *parent);
#endif /* VIEW_VIEW_CAR_SELECTION_H_ */
#ifndef VIEW_VIEW_CONNECT_TO_CAR_H_
#define VIEW_VIEW_CONNECT_TO_CAR_H_
-
#include "gear-racing-controller.h"
-void connect_to_car_init(Evas_Object *parent);
+void view_connect_to_car_init(Evas_Object *parent);
#endif /* VIEW_VIEW_CONNECT_TO_CAR_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef VIEW_VIEW_CONNECTION_SUCCESSED_H_
+#define VIEW_VIEW_CONNECTION_SUCCESSED_H_
+
+void view_connection_successed_init(Evas_Object *parent);
+
+#endif /* VIEW_VIEW_CONNECTION_SUCCESSED_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef VIEW_VIEW_EMERGENCY_STOP_H_
+#define VIEW_VIEW_EMERGENCY_STOP_H_
+
+
+void view_emergency_stop_init(Evas_Object *parent);
+
+#endif /* VIEW_VIEW_EMERGENCY_STOP_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef VIEW_VIEW_HELP_H_
+#define VIEW_VIEW_HELP_H_
+
+
+void view_help_init(Evas_Object *parent);
+
+#endif /* VIEW_VIEW_HELP_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef VIEW_VIEW_NAME_INPUT_H_
+#define VIEW_VIEW_NAME_INPUT_H_
+
+
+void view_name_input_init(Evas_Object *parent);
+
+#endif /* VIEW_VIEW_NAME_INPUT_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef VIEW_VIEW_NETWORK_FAILURE_H_
+#define VIEW_VIEW_NETWORK_FAILURE_H_
+
+
+void view_network_failure_init(Evas_Object *parent);
+
+#endif /* VIEW_VIEW_NETWORK_FAILURE_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef VIEW_VIEW_RACING_H_
+#define VIEW_VIEW_RACING_H_
+
+
+void view_racing_init(Evas_Object *parent);
+
+#endif /* VIEW_VIEW_RACING_H_ */
--- /dev/null
+/*
+* 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.
+*/
+
+
+#ifndef VIEW_VIEW_RESET_H_
+#define VIEW_VIEW_RESET_H_
+
+
+void view_reset_init(Evas_Object *parent);
+
+#endif /* VIEW_VIEW_RESET_H_ */
typedef enum _e_view_id {
VIEW_CONNECT_TO_CAR,
VIEW_CAR_SELECTION,
+ VIEW_CONNECTION_SUCCESSED,
+ VIEW_NAME_INPUT,
+ VIEW_HELP,
+ VIEW_RACING,
+ VIEW_EMERGENCY_STOP,
+ VIEW_RESET,
+ VIEW_NETWORK_FAILURE,
} view_id;
void view_manager_set_view(view_id id);
static void _connected_cb(void *is_connected)
{
- view_manager_set_view(VIEW_CONNECT_TO_CAR);
+ view_manager_set_view(VIEW_CONNECTION_SUCCESSED);
controller_car_selection_destroy();
}
--- /dev/null
+/*
+* 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_connection.h"
+#include "controller/controller_connection_successed.h"
+#include "view_manager/view_manager.h"
+
+static s_controller *controller = NULL;
+
+static void _connection_successed_destroy(void)
+{
+ free(controller);
+}
+
+static void _connected_cb(void *is_connected)
+{
+ view_manager_set_view(VIEW_NAME_INPUT);
+ _connection_successed_destroy();
+}
+
+void controller_connection_successed_init(t_view_update_cb view_update_cb)
+{
+ controller = calloc(1, sizeof(s_controller));
+ controller->view_update_cb = view_update_cb;
+
+ model_connection_subscribe_event(_connected_cb);
+}
+
+void controller_connection_successed_back_btn(void)
+{
+ _connection_successed_destroy();
+}
+
+void controller_connection_successed_next_page()
+{
+ model_connection_connect();
+}
+
--- /dev/null
+/*
+* 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_connection.h"
+#include "controller/controller_emergency_stop.h"
+#include "view_manager/view_manager.h"
+
+static s_controller *controller = NULL;
+
+static void controller_emergency_stop_destroy(void)
+{
+ free(controller);
+}
+
+static void _connected_cb(void *is_connected)
+{
+ view_manager_set_view(VIEW_RESET);
+ controller_emergency_stop_destroy();
+}
+
+void controller_emergency_stop_init(t_view_update_cb view_update_cb)
+{
+ controller = calloc(1, sizeof(s_controller));
+ controller->view_update_cb = view_update_cb;
+
+ model_connection_subscribe_event(_connected_cb);
+}
+
+void controller_emergency_stop_back_btn(void)
+{
+ controller_emergency_stop_destroy();
+}
+
+void controller_emergency_stop_next_page()
+{
+ model_connection_connect();
+}
+
--- /dev/null
+/*
+* 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_connection.h"
+#include "controller/controller_help.h"
+#include "view_manager/view_manager.h"
+
+static s_controller *controller = NULL;
+
+static void controller_help_destroy(void)
+{
+ free(controller);
+}
+
+static void _connected_cb(void *is_connected)
+{
+ view_manager_set_view(VIEW_RACING);
+ controller_help_destroy();
+}
+
+void controller_help_init(t_view_update_cb view_update_cb)
+{
+ controller = calloc(1, sizeof(s_controller));
+ controller->view_update_cb = view_update_cb;
+
+ model_connection_subscribe_event(_connected_cb);
+}
+
+void controller_help_back_btn(void)
+{
+ controller_help_destroy();
+}
+
+void controller_help_next_page()
+{
+ model_connection_connect();
+}
+
--- /dev/null
+/*
+* 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_connection.h"
+#include "controller/controller_name_input.h"
+#include "view_manager/view_manager.h"
+
+static s_controller *controller = NULL;
+
+static void controller_name_input_destroy(void)
+{
+ free(controller);
+}
+
+static void _connected_cb(void *is_connected)
+{
+ view_manager_set_view(VIEW_HELP);
+ controller_name_input_destroy();
+}
+
+void controller_name_input_init(t_view_update_cb view_update_cb)
+{
+ controller = calloc(1, sizeof(s_controller));
+ controller->view_update_cb = view_update_cb;
+
+ model_connection_subscribe_event(_connected_cb);
+}
+
+void controller_name_input_back_btn(void)
+{
+ controller_name_input_destroy();
+}
+
+void controller_name_input_next_page()
+{
+ model_connection_connect();
+}
+
--- /dev/null
+/*
+* 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_connection.h"
+#include "controller/controller_network_failure.h"
+#include "view_manager/view_manager.h"
+
+static s_controller *controller = NULL;
+
+static void controller_network_failure_destroy(void)
+{
+ free(controller);
+}
+
+static void _connected_cb(void *is_connected)
+{
+ view_manager_set_view(VIEW_CONNECT_TO_CAR);
+ controller_network_failure_destroy();
+}
+
+void controller_network_failure_init(t_view_update_cb view_update_cb)
+{
+ controller = calloc(1, sizeof(s_controller));
+ controller->view_update_cb = view_update_cb;
+
+ model_connection_subscribe_event(_connected_cb);
+}
+
+void controller_network_failure_back_btn(void)
+{
+ controller_network_failure_destroy();
+}
+
+void controller_network_failure_next_page()
+{
+ model_connection_connect();
+}
+
--- /dev/null
+/*
+* 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_connection.h"
+#include "controller/controller_racing.h"
+#include "view_manager/view_manager.h"
+
+static s_controller *controller = NULL;
+
+static void controller_racing_destroy(void)
+{
+ free(controller);
+}
+
+static void _connected_cb(void *is_connected)
+{
+ view_manager_set_view(VIEW_EMERGENCY_STOP);
+ controller_racing_destroy();
+}
+
+void controller_racing_init(t_view_update_cb view_update_cb)
+{
+ controller = calloc(1, sizeof(s_controller));
+ controller->view_update_cb = view_update_cb;
+
+ model_connection_subscribe_event(_connected_cb);
+}
+
+void controller_racing_back_btn(void)
+{
+ controller_racing_destroy();
+}
+
+void controller_racing_next_page()
+{
+ model_connection_connect();
+}
+
--- /dev/null
+/*
+* 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_connection.h"
+#include "controller/controller_reset.h"
+#include "view_manager/view_manager.h"
+
+static s_controller *controller = NULL;
+
+static void controller_reset_destroy(void)
+{
+ free(controller);
+}
+
+static void _connected_cb(void *is_connected)
+{
+ view_manager_set_view(VIEW_NAME_INPUT);
+ controller_reset_destroy();
+}
+
+void controller_reset_init(t_view_update_cb view_update_cb)
+{
+ controller = calloc(1, sizeof(s_controller));
+ controller->view_update_cb = view_update_cb;
+
+ model_connection_subscribe_event(_connected_cb);
+}
+
+void controller_reset_back_btn(void)
+{
+ controller_reset_destroy();
+}
+
+void controller_reset_next_page()
+{
+ model_connection_connect();
+}
+
*/
#include "gear-racing-controller.h"
+#include "view/view_car_selection.h"
#include "view/view_base.h"
#include "view/view_car_selection.h"
+#include "controller/controller_car_selection.h"
#include "controller/controller_connect_to_car.h"
#include "controller/controller_car_selection.h"
#include "view_manager/view_manager.h"
view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
}
-void car_selection_init(Evas_Object *parent)
+void view_car_selection_init(Evas_Object *parent)
{
controller_car_selection_init(NULL);
_car_selection_create_gui(parent);
#include "gear-racing-controller.h"
#include "view/view_base.h"
#include "view_manager/view_manager.h"
+#include "view/view_connect_to_car.h"
typedef struct _s_connect_to_car {
Evas_Object *layout;
}
-void connect_to_car_init(Evas_Object *parent)
+void view_connect_to_car_init(Evas_Object *parent)
{
connect_to_car_create_gui(parent);
controller_connect_to_car_init(NULL);
--- /dev/null
+/*
+* 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 "view/view_base.h"
+#include "view/view_connection_successed.h"
+#include "view_manager/view_manager.h"
+#include "controller/controller_connection_successed.h"
+
+typedef struct s_view_connection_successed {
+ Evas_Object *layout;
+} s_view_connection_successed;
+
+static s_view_connection_successed s_info = { 0,};
+
+static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_win_lower(view_manager_get_win());
+ controller_connection_successed_back_btn();
+}
+
+static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ controller_connection_successed_next_page();
+}
+
+static void _view_connection_successed_create_gui(Evas_Object *parent)
+{
+ s_info.layout = view_base_create_layout(parent);
+ eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
+ elm_layout_text_set(s_info.layout, "txt_title", "Connection successed");
+
+ view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
+ view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
+}
+
+void view_connection_successed_init(Evas_Object *parent)
+{
+ controller_connection_successed_init(NULL);
+ _view_connection_successed_create_gui(parent);
+}
--- /dev/null
+/*
+* 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 "view/view_base.h"
+#include "view/view_emergency_stop.h"
+#include "view_manager/view_manager.h"
+#include "controller/controller_emergency_stop.h"
+
+typedef struct _s_view_emergency_stop {
+ Evas_Object *layout;
+} s_view_emergency_stop;
+
+static s_view_emergency_stop s_info = { 0,};
+
+static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_win_lower(view_manager_get_win());
+ controller_emergency_stop_back_btn();
+}
+
+static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ controller_emergency_stop_next_page();
+}
+
+static void _view_emergency_stop_create_gui(Evas_Object *parent)
+{
+ s_info.layout = view_base_create_layout(parent);
+ eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
+ elm_layout_text_set(s_info.layout, "txt_title", "Emergency Stop");
+
+ view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
+ view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
+}
+
+void view_emergency_stop_init(Evas_Object *parent)
+{
+ controller_emergency_stop_init(NULL);
+ _view_emergency_stop_create_gui(parent);
+}
--- /dev/null
+/*
+* 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 "view/view_base.h"
+#include "view/view_help.h"
+#include "view_manager/view_manager.h"
+#include "controller/controller_help.h"
+
+typedef struct _s_view_help {
+ Evas_Object *layout;
+} s_view_help;
+
+static s_view_help s_info = { 0,};
+
+static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_win_lower(view_manager_get_win());
+ controller_help_back_btn();
+}
+
+static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ controller_help_next_page();
+}
+
+static void _view_help_create_gui(Evas_Object *parent)
+{
+ s_info.layout = view_base_create_layout(parent);
+ eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
+ elm_layout_text_set(s_info.layout, "txt_title", "Help");
+
+ view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
+ view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
+}
+
+void view_help_init(Evas_Object *parent)
+{
+ controller_help_init(NULL);
+ _view_help_create_gui(parent);
+}
--- /dev/null
+/*
+* 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 "view/view_base.h"
+#include "view/view_name_input.h"
+#include "view_manager/view_manager.h"
+#include "controller/controller_name_input.h"
+
+typedef struct _ss_view_name_input {
+ Evas_Object *layout;
+} s_view_name_input;
+
+static s_view_name_input s_info = { 0,};
+
+static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_win_lower(view_manager_get_win());
+ controller_name_input_back_btn();
+}
+
+static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ controller_name_input_next_page();
+}
+
+static void _view_name_input_create_gui(Evas_Object *parent)
+{
+ s_info.layout = view_base_create_layout(parent);
+ eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
+ elm_layout_text_set(s_info.layout, "txt_title", "Name input");
+
+ view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
+ view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
+}
+
+void view_name_input_init(Evas_Object *parent)
+{
+ controller_name_input_init(NULL);
+ _view_name_input_create_gui(parent);
+}
--- /dev/null
+/*
+* 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 "view/view_base.h"
+#include "view/view_network_failure.h"
+#include "view_manager/view_manager.h"
+#include "controller/controller_network_failure.h"
+
+typedef struct _s_view_network_failure {
+ Evas_Object *layout;
+} s_view_network_failure;
+
+static s_view_network_failure s_info = { 0,};
+
+static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_win_lower(view_manager_get_win());
+ controller_network_failure_back_btn();
+}
+
+static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ controller_network_failure_next_page();
+}
+
+static void _view_network_failure_create_gui(Evas_Object *parent)
+{
+ s_info.layout = view_base_create_layout(parent);
+ eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
+ elm_layout_text_set(s_info.layout, "txt_title", "Network failure");
+
+ view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
+ view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
+}
+
+void view_network_failure_init(Evas_Object *parent)
+{
+ controller_network_failure_init(NULL);
+ _view_network_failure_create_gui(parent);
+}
--- /dev/null
+/*
+* 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 "view/view_base.h"
+#include "view/view_racing.h"
+#include "view_manager/view_manager.h"
+#include "controller/controller_racing.h"
+
+typedef struct _s_view_racing {
+ Evas_Object *layout;
+} s_view_racing;
+
+static s_view_racing s_info = { 0,};
+
+static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_win_lower(view_manager_get_win());
+ controller_racing_back_btn();
+}
+
+static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ controller_racing_next_page();
+}
+
+static void _view_racing_create_gui(Evas_Object *parent)
+{
+ s_info.layout = view_base_create_layout(parent);
+ eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
+ elm_layout_text_set(s_info.layout, "txt_title", "Racing");
+
+ view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
+ view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
+}
+
+void view_racing_init(Evas_Object *parent)
+{
+ controller_racing_init(NULL);
+ _view_racing_create_gui(parent);
+}
--- /dev/null
+/*
+* 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 "view/view_base.h"
+#include "view/view_reset.h"
+#include "view_manager/view_manager.h"
+#include "controller/controller_reset.h"
+
+typedef struct _s_view_reset {
+ Evas_Object *layout;
+} s_view_reset;
+
+static s_view_reset s_info = { 0,};
+
+static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_win_lower(view_manager_get_win());
+ controller_reset_back_btn();
+}
+
+static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ controller_reset_next_page();
+}
+
+static void _view_reset_create_gui(Evas_Object *parent)
+{
+ s_info.layout = view_base_create_layout(parent);
+ eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
+ elm_layout_text_set(s_info.layout, "txt_title", "Reset");
+
+ view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
+ view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
+}
+
+void view_reset_init(Evas_Object *parent)
+{
+ controller_reset_init(NULL);
+ _view_reset_create_gui(parent);
+}
*/
#include <assert.h>
+#include <view_manager/view_manager.h>
#include <view/view_connect_to_car.h>
#include <view/view_car_selection.h>
-#include <view_manager/view_manager.h>
+#include "view/view_connection_successed.h"
+#include "view/view_emergency_stop.h"
+#include "view/view_help.h"
+#include "view/view_name_input.h"
+#include "view/view_network_failure.h"
+#include "view/view_racing.h"
+#include "view/view_reset.h"
+
typedef struct _s_ui {
Evas_Object *win;
Evas_Object *conform;
{
switch (id) {
case VIEW_CONNECT_TO_CAR:
- connect_to_car_init(s_info.conform);
+ view_connect_to_car_init(s_info.conform);
break;
case VIEW_CAR_SELECTION:
- car_selection_init(s_info.conform);
+ view_car_selection_init(s_info.conform);
+ break;
+ case VIEW_CONNECTION_SUCCESSED:
+ view_connection_successed_init(s_info.conform);
+ break;
+ case VIEW_NAME_INPUT:
+ view_name_input_init(s_info.conform);
+ break;
+ case VIEW_HELP:
+ view_help_init(s_info.conform);
+ break;
+ case VIEW_RACING:
+ view_racing_init(s_info.conform);
+ break;
+ case VIEW_EMERGENCY_STOP:
+ view_emergency_stop_init(s_info.conform);
+ break;
+ case VIEW_RESET:
+ view_reset_init(s_info.conform);
+ break;
+ case VIEW_NETWORK_FAILURE:
+ view_network_failure_init(s_info.conform);
+ break;
break;
default:
break;