From 3590e7ab9e3cc8ec7d7f803ef5e0a582ae2313a4 Mon Sep 17 00:00:00 2001 From: Agnieszka Janowicz Date: Mon, 21 Dec 2015 14:09:02 +0100 Subject: [PATCH] [SAMPLE APP][Stream-player] Initialization description added Change-Id: I0dd715472558d2690c88fa66e78ac33f23ecc3d3 Signed-off-by: Michal Skorupinski Signed-off-by: Agnieszka Janowicz --- .../html/mobile_n/stream-player-mn.html | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html b/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html index 21f6169..5edb70c 100644 --- a/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html +++ b/org.tizen.sampledescriptions/html/mobile_n/stream-player-mn.html @@ -141,6 +141,30 @@ +

Application Initialization:

+

The entire application life-cycle is implemented in the main.c file, using the common Tizen application structure:

+ +
+   int main(int argc, char *argv[])
+   {
+      int ret = 0;
+
+      ui_app_lifecycle_callback_s event_callback = {0,};
+      app_event_handler_h handlers[5] = {NULL, };
+
+      event_callback.create = __app_create;
+      event_callback.terminate = __app_terminate;
+
+      ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, __ui_app_lang_changed, NULL);
+
+      ret = ui_app_main(argc, argv, &event_callback, NULL);
+      // Error handling
+   }
+
+ +The Stream-Player application's initialization is done within the __app_create() callback function where the player_model_init() function is responsible for the model's initialization. The view_create_base_gui() function is used to initialize the view module. On the application's termination, the __app_terminate() callback function is invoked, and all resources allocated within the model are freed. + + -- 2.7.4