[ITC][tzsh-quickpanel][ACR-1321][Add][Deprecation][Added new APIs and enumeration... 16/198216/4
authorkanchan123 <kanchan.m@samsung.com>
Tue, 22 Jan 2019 09:47:42 +0000 (15:17 +0530)
committerPriya Kohli <priya.kohli@samsung.com>
Thu, 24 Jan 2019 06:42:18 +0000 (06:42 +0000)
Change-Id: If6324a8ba4372fcd0f494d6aa12adabba9dc77c2
Signed-off-by: kanchan123 <kanchan.m@samsung.com>
src/itc/tzsh-quickpanel/ITs-tzsh-quickpanel.c
src/itc/tzsh-quickpanel/tct-tzsh-quickpanel-native_mobile.h
src/itc/tzsh-quickpanel/tct-tzsh-quickpanel-native_tizeniot.h
src/itc/tzsh-quickpanel/tct-tzsh-quickpanel-native_wearable.h

index e5786aaf4b6d0759442e324309e0a9cf3217436b..b6b587b1e43167914343818d1c3a36e3167f5088 100755 (executable)
@@ -15,6 +15,9 @@
 //
 #include "ITs-tzsh-quickpanel-common.h"
 
+tzsh_quickpanel_type_e eQuickPanelTypeArray[] = {TZSH_QUICKPANEL_TYPE_UNKNOWN,
+                                                               TZSH_QUICKPANEL_TYPE_SYSTEM_DEFAULT,
+                                                               TZSH_QUICKPANEL_TYPE_CONTEXT_MENU};
 /**
  * @function           ITs_tzsh_quickpanel_startup
  * @description                Called before each test
@@ -32,7 +35,6 @@ void ITs_tzsh_quickpanel_startup(void)
        return;
 }
 
-
 /**
  * @function           ITs_tzsh_quickpanel_cleanup
  * @description                Called after each test
@@ -51,7 +53,7 @@ void ITs_tzsh_quickpanel_cleanup(void)
 *  @{
 */
 
-//& purpose: Creates a instance of tzsh object 
+//& purpose: Creates a instance of tzsh object
 //& type : auto
 /**
 * @testcase                    ITc_tzsh_quickpanel_tzsh_create_destroy_p
@@ -61,7 +63,6 @@ void ITs_tzsh_quickpanel_cleanup(void)
 * @type                                auto
 * @description                 Creates a instance of tzsh object
 * @scenario                            create handle\n
-*                                              
 * @apicovered                  tzsh_create, tzsh_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
@@ -82,7 +83,8 @@ int ITc_tzsh_quickpanel_tzsh_create_destroy_p(void)
 
        return 0;
 }
-//& purpose: Creates a quick panel object which handles quick-panel services
+
+//& purpose: Creates a quick panel object for a specific type which handles quick-panel services
 //& type : auto
 /**
 * @testcase                    ITc_tzsh_quickpanel_panel_create_destroy_p
@@ -90,11 +92,11 @@ int ITc_tzsh_quickpanel_tzsh_create_destroy_p(void)
 * @author                              SRID(shilpa.j)
 * @reviewer                            SRID(a.pandia1)
 * @type                                auto
-* @description                 Creates a quick panel object which handles quick-panel services
+* @description                 Creates a quick panel object for a specific type which handles quick-panel services
 * @scenario                            create an elm window\n
                                                create tzsh handle\n
-                                               create quick-panel handle\n*                                            
-* @apicovered                  tzsh_create, tzsh_destroy,tzsh_quickpanel_create,tzsh_quickpanel_destroy
+                                               create quick-panel handle\n
+* @apicovered                  tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
 * @precondition                        None
@@ -106,11 +108,13 @@ int ITc_tzsh_quickpanel_panel_create_destroy_p(void)
        tzsh_h htzsh = NULL;
        tzsh_quickpanel_h hpanel = NULL;
        tzsh_window tzWin = 0;
+       int nRet = 0;
        START_TEST;
        eWin = CreateWindow("quickpanel client");
        CHECK_HANDLE(eWin, "CreateWindow failed");
 
        evas_object_show(eWin);
+       int nSize = sizeof(eQuickPanelTypeArray)/sizeof(eQuickPanelTypeArray[0]);
 
        tzWin = elm_win_window_id_get(eWin);
        if(tzWin <=0)
@@ -118,17 +122,21 @@ int ITc_tzsh_quickpanel_panel_create_destroy_p(void)
                FPRINTF("\\n[Line : %d][%s]elm_win_window_id_get error returned negative  value for elm_win_window_id_get",__LINE__, API_NAMESPACE);
                return 1;
        }
-       
+
        htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
        CHECK_HANDLE(htzsh, "tzsh_create");
-       //Target API
-       hpanel = tzsh_quickpanel_create(htzsh, tzWin);
-       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create",tzsh_destroy(htzsh));
 
-       //Target API
-       int nRet = tzsh_quickpanel_destroy(hpanel);
-       PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh));
-       
+       for(int nCounter = 1; nCounter < nSize; nCounter++)
+       {
+               //Target API
+               hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, eQuickPanelTypeArray[nCounter]);
+               CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type",tzsh_destroy(htzsh));
+
+               //Target API
+               nRet = tzsh_quickpanel_destroy(hpanel);
+               PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh));
+       }
+
        nRet = tzsh_destroy(htzsh);
        PRINT_RESULT_NORETURN(TZSH_ERROR_NONE, nRet, "tzsh_destroy", TzshQuickpanelGetError(nRet));
 
@@ -147,8 +155,8 @@ int ITc_tzsh_quickpanel_panel_create_destroy_p(void)
 * @scenario                            create an elm window
                                                create tzsh handle
                                                create quick-panel handle
-                                               Shows the quickpanel service window                                             
-* @apicovered                  tzsh_quickpanel_show,tzsh_quickpanel_hide,tzsh_create, tzsh_destroy,tzsh_quickpanel_create,tzsh_quickpanel_destroy
+                                               Shows the quickpanel service window
+* @apicovered                  tzsh_quickpanel_show,tzsh_quickpanel_hide,tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
 * @precondition                        None
@@ -164,10 +172,10 @@ int ITc_tzsh_quickpanel_panel_show_hide_p(void)
        START_TEST;
        eWin = CreateWindow("quickpanel client");
        CHECK_HANDLE(eWin, "CreateWindow failed");
-   
-    evas_object_show(eWin);
 
-    tzWin = elm_win_window_id_get(eWin);
+       evas_object_show(eWin);
+
+       tzWin = elm_win_window_id_get(eWin);
        if(tzWin <=0)
        {
                FPRINTF("\\n[Line : %d][%s]elm_win_window_id_get error returned negative  value for elm_win_window_id_get",__LINE__, API_NAMESPACE);
@@ -176,10 +184,10 @@ int ITc_tzsh_quickpanel_panel_show_hide_p(void)
 
        htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
        CHECK_HANDLE(htzsh, "tzsh_create");
-       
-       hpanel = tzsh_quickpanel_create(htzsh, tzWin);
-       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create",tzsh_destroy(htzsh));
-       
+
+       hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, TZSH_QUICKPANEL_TYPE_SYSTEM_DEFAULT);
+       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type",tzsh_destroy(htzsh));
+
        //Target API
        int nRet = tzsh_quickpanel_show(hpanel);
        if (nRet != TZSH_ERROR_NO_SERVICE)
@@ -191,7 +199,7 @@ int ITc_tzsh_quickpanel_panel_show_hide_p(void)
                PRINT_RESULT_CLEANUP(TZSH_ERROR_NO_SERVICE, nRet, "tzsh_quickpanel_show", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
        }
 
-               //Target API
+       //Target API
         nRet = tzsh_quickpanel_hide(hpanel);
        if (nRet != TZSH_ERROR_NO_SERVICE)
        {
@@ -206,7 +214,7 @@ int ITc_tzsh_quickpanel_panel_show_hide_p(void)
 
        nRet = tzsh_quickpanel_destroy(hpanel);
        PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh));
-       
+
        nRet = tzsh_destroy(htzsh);
        PRINT_RESULT_NORETURN(TZSH_ERROR_NONE, nRet, "tzsh_destroy", TzshQuickpanelGetError(nRet));
 
@@ -225,8 +233,8 @@ int ITc_tzsh_quickpanel_panel_show_hide_p(void)
 * @scenario                            create an elm window\n
                                                create tzsh handle\n
                                                create quick-panel handle\n
-                                               Sets the scrollable state of the quickpanel service window                                              
-* @apicovered                  tzsh_quickpanel_scrollable_set,tzsh_quickpanel_scrollable_get,tzsh_create, tzsh_destroy,tzsh_quickpanel_create,tzsh_quickpanel_destroy
+                                               Sets the scrollable state of the quickpanel service window
+* @apicovered                  tzsh_quickpanel_scrollable_set,tzsh_quickpanel_scrollable_get,tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
 * @precondition                        None
@@ -255,14 +263,14 @@ int ITc_tzsh_quickpanel_scrollable_set_get_p(void)
 
        htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
        CHECK_HANDLE(htzsh, "tzsh_create");
-       
-       hpanel = tzsh_quickpanel_create(htzsh, tzWin);
-       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create",tzsh_destroy(htzsh));
+
+       hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, TZSH_QUICKPANEL_TYPE_SYSTEM_DEFAULT);
+       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type",tzsh_destroy(htzsh));
 
        //Target API
        int nRet = tzsh_quickpanel_scrollable_set(hpanel,true);
        PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_scrollable_set", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
-       
+
        nRet = tzsh_quickpanel_scrollable_get(hpanel,&tzsh_scrollable);
        if (nRet != TZSH_ERROR_NO_SERVICE)
        {
@@ -272,16 +280,15 @@ int ITc_tzsh_quickpanel_scrollable_set_get_p(void)
        {
                PRINT_RESULT_CLEANUP(TZSH_ERROR_NO_SERVICE, nRet, "tzsh_quickpanel_scrollable_get", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
        }
-       
+
        if(tzsh_scrollable  < 0)
        {
                FPRINTF("\\n[Line : %d][%s]tzsh_quickpanel_scrollable_get error returned negative  value for scroll",__LINE__, API_NAMESPACE);
                tzsh_quickpanel_destroy(hpanel);
                tzsh_destroy(htzsh);
-               return 1;               
-       
+               return 1;
        }
-       
+
        nRet = tzsh_quickpanel_destroy(hpanel);
        PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh));
 
@@ -303,8 +310,8 @@ int ITc_tzsh_quickpanel_scrollable_set_get_p(void)
 * @scenario                            create an elm window\n
                                                create tzsh handle\n
                                                create quick-panel handle\n
-                                               Get the visible state of the quickpanel                                                 
-* @apicovered                  tzsh_quickpanel_visible_get,tzsh_create, tzsh_destroy,tzsh_quickpanel_create,tzsh_quickpanel_destroy
+                                               Get the visible state of the quickpanel
+* @apicovered                  tzsh_quickpanel_visible_get,tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
 * @precondition                        None
@@ -333,9 +340,9 @@ int ITc_tzsh_quickpanel_visible_get_p(void)
 
        htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
        CHECK_HANDLE(htzsh, "tzsh_create");
-       
-       hpanel = tzsh_quickpanel_create(htzsh, tzWin);
-       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create",tzsh_destroy(htzsh));
+
+       hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, TZSH_QUICKPANEL_TYPE_SYSTEM_DEFAULT);
+       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type",tzsh_destroy(htzsh));
 
        int nRet = tzsh_quickpanel_show(hpanel);
        if (nRet != TZSH_ERROR_NO_SERVICE)
@@ -359,17 +366,16 @@ int ITc_tzsh_quickpanel_visible_get_p(void)
                        tzsh_quickpanel_destroy(hpanel);
                        tzsh_destroy(htzsh);
                        return 1;
-
                }
        }
        else
        {
                PRINT_RESULT_CLEANUP(TZSH_ERROR_NO_SERVICE, nRet, "tzsh_quickpanel_visible_get", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
        }
-               
+
        nRet = tzsh_quickpanel_destroy(hpanel);
        PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh));
-       
+
        nRet = tzsh_destroy(htzsh);
        PRINT_RESULT_NORETURN(TZSH_ERROR_NONE, nRet, "tzsh_destroy", TzshQuickpanelGetError(nRet));
 
@@ -388,8 +394,8 @@ int ITc_tzsh_quickpanel_visible_get_p(void)
 * @scenario                            create an elm window\n
                                                create tzsh handle\n
                                                create quick-panel handle\n
-                                               Get the visible state of the quickpanel                                                 
-* @apicovered                  tzsh_quickpanel_orientation_get,tzsh_create, tzsh_destroy,tzsh_quickpanel_create,tzsh_quickpanel_destroy
+                                               Get the visible state of the quickpanel
+* @apicovered                  tzsh_quickpanel_orientation_get,tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
 * @precondition                        None
@@ -418,11 +424,11 @@ int ITc_tzsh_quickpanel_orientation_get_p(void)
 
        htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
        CHECK_HANDLE(htzsh, "tzsh_create");
-       
-       hpanel = tzsh_quickpanel_create(htzsh, tzWin);
-       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create",tzsh_destroy(htzsh));
 
-               //Target API
+       hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, TZSH_QUICKPANEL_TYPE_SYSTEM_DEFAULT);
+       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type",tzsh_destroy(htzsh));
+
+       //Target API
        int nRet = tzsh_quickpanel_orientation_get(hpanel,&tzsh_state);
        if (nRet != TZSH_ERROR_NO_SERVICE)
        {
@@ -432,15 +438,14 @@ int ITc_tzsh_quickpanel_orientation_get_p(void)
                        FPRINTF("\\n[Line : %d][%s]tzsh_quickpanel_orientation_get error returned wrong value for state",__LINE__, API_NAMESPACE);
                        tzsh_quickpanel_destroy(hpanel);
                        tzsh_destroy(htzsh);
-                       return 1;               
-
+                       return 1;
                }
        }
        else
        {
                PRINT_RESULT_CLEANUP(TZSH_ERROR_NO_SERVICE, nRet, "tzsh_quickpanel_orientation_get", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
        }
-               
+
        nRet = tzsh_quickpanel_destroy(hpanel);
        PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh));
 
@@ -477,8 +482,8 @@ static void tzsh_quickpanel_VisibleCallback(int type, tzsh_quickpanel_event_info
 * @scenario                            create an elm window\n
                                                create tzsh handle\n
                                                create quick-panel handle\n
-                                               Adds the event handler                                          
-* @apicovered                  tzsh_quickpanel_event_handler_add,tzsh_quickpanel_event_visible_get,tzsh_quickpanel_event_handler_del,tzsh_create, tzsh_destroy,tzsh_quickpanel_create,tzsh_quickpanel_destroy
+                                               Adds the event handler
+* @apicovered                  tzsh_quickpanel_event_handler_add,tzsh_quickpanel_event_visible_get,tzsh_quickpanel_event_handler_del,tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
 * @precondition                        None
@@ -490,10 +495,10 @@ int ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p(void)
        tzsh_h htzsh = NULL;
        tzsh_quickpanel_h hpanel = NULL;
        tzsh_window tzWin = 0;
-       tzsh_quickpanel_event_handler_h hEventHandler;  
+       tzsh_quickpanel_event_handler_h hEventHandler;
 
        START_TEST;
-               
+
        eWin = CreateWindow("quickpanel client");
        CHECK_HANDLE(eWin, "CreateWindow failed");
 
@@ -508,10 +513,10 @@ int ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p(void)
 
        htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
        CHECK_HANDLE(htzsh, "tzsh_create");
-       
-       hpanel = tzsh_quickpanel_create(htzsh, tzWin);
-       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create",tzsh_destroy(htzsh));
-       
+
+       hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, TZSH_QUICKPANEL_TYPE_SYSTEM_DEFAULT);
+       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type",tzsh_destroy(htzsh));
+
        int  nRet = tzsh_quickpanel_show(hpanel);
        if (nRet != TZSH_ERROR_NO_SERVICE)
        {
@@ -521,8 +526,8 @@ int ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p(void)
        {
                PRINT_RESULT_CLEANUP(TZSH_ERROR_NO_SERVICE, nRet, "tzsh_quickpanel_show", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
        }
-         
-               //Target API            
+
+       //Target API
        hEventHandler = tzsh_quickpanel_event_handler_add(hpanel, TZSH_QUICKPANEL_EVENT_VISIBLE, tzsh_quickpanel_VisibleCallback, NULL);
 
        CHECK_HANDLE_CLEANUP(hEventHandler, "tzsh_quickpanel_event_handler_add",tzsh_quickpanel_destroy(hpanel);tzsh_destroy(htzsh));
@@ -543,11 +548,11 @@ static void tzsh_quickpanel_OrientationCallback(int type, tzsh_quickpanel_event_
 {
        tzsh_quickpanel_state_orientation_e eState;
        FPRINTF("[Line : %d][%s] Inside callback \"tzsh_quickpanel_VisibleCallback\"\\n", __LINE__, API_NAMESPACE);
-       
-       if (type != TZSH_QUICKPANEL_EVENT_ORIENTATION) 
+
+       if (type != TZSH_QUICKPANEL_EVENT_ORIENTATION)
                return;
        int nRet = tzsh_quickpanel_event_orientation_get(ev_info, &eState);
-        
+
        if(nRet != TZSH_ERROR_NONE)
        {
                FPRINTF("[Line : %d][%s] Inside callback \"tzsh_quickpanel_event_orientation_get failed\"\\n", __LINE__, API_NAMESPACE);
@@ -566,8 +571,8 @@ static void tzsh_quickpanel_OrientationCallback(int type, tzsh_quickpanel_event_
 * @scenario                            create an elm window\n
                                                create tzsh handle\n
                                                create quick-panel handle\n
-                                               Adds the event handler                                          
-* @apicovered                  tzsh_quickpanel_event_handler_add,tzsh_quickpanel_event_visible_get,tzsh_quickpanel_event_handler_del,tzsh_create, tzsh_destroy,tzsh_quickpanel_create,tzsh_quickpanel_destroy
+                                               Adds the event handler
+* @apicovered                  tzsh_quickpanel_event_handler_add,tzsh_quickpanel_event_visible_get,tzsh_quickpanel_event_handler_del,tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
 * @passcase                            When API return TZSH_ERROR_NONE
 * @failcase                            When API not return TZSH_ERROR_NONE
 * @precondition                        None
@@ -580,9 +585,9 @@ int ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p(void)
        tzsh_quickpanel_h hpanel = NULL;
        tzsh_window tzWin = 0;
        tzsh_quickpanel_event_handler_h hEventHandler;
-               
+
        START_TEST;
-               
+
        eWin = CreateWindow("quickpanel client");
        CHECK_HANDLE(eWin, "CreateWindow failed");
 
@@ -597,11 +602,11 @@ int ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p(void)
 
        htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
        CHECK_HANDLE(htzsh, "tzsh_create");
-       
-       hpanel = tzsh_quickpanel_create(htzsh, tzWin);
-       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create",tzsh_destroy(htzsh));
 
-               //Target API            
+       hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, TZSH_QUICKPANEL_TYPE_SYSTEM_DEFAULT);
+       CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type",tzsh_destroy(htzsh));
+
+       //Target API
        hEventHandler = tzsh_quickpanel_event_handler_add(hpanel, TZSH_QUICKPANEL_EVENT_ORIENTATION, tzsh_quickpanel_OrientationCallback, NULL);
        CHECK_HANDLE_CLEANUP(hEventHandler, "tzsh_quickpanel_event_handler_add",tzsh_quickpanel_destroy(hpanel);tzsh_destroy(htzsh));
 
@@ -610,11 +615,88 @@ int ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p(void)
 
        nRet = tzsh_quickpanel_destroy(hpanel);
        PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh));
-       
+
        nRet = tzsh_destroy(htzsh);
        PRINT_RESULT_NORETURN(TZSH_ERROR_NONE, nRet, "tzsh_destroy", TzshQuickpanelGetError(nRet));
 
        return 0;
 }
+
+//& purpose: Gets the type of the quickpanel
+//& type : auto
+/**
+* @testcase                    ITc_tzsh_quickpanel_type_get_p
+* @since_tizen                         5.5
+* @author                              SRID(kanchan.m)
+* @reviewer                            SRID(priya.kohli)
+* @type                                auto
+* @description                 Gets the type of the quickpanel
+* @scenario                            create an elm window\n
+                                               create tzsh handle\n
+                                               create quick-panel handle\n
+                                               Get the type of the quickpanel
+* @apicovered                  tzsh_quickpanel_type_get,tzsh_create, tzsh_destroy,tzsh_quickpanel_create_with_type,tzsh_quickpanel_destroy
+* @passcase                            When API return TZSH_ERROR_NONE
+* @failcase                            When API not return TZSH_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_tzsh_quickpanel_type_get_p(void)
+{
+       Evas_Object *eWin = NULL;
+       tzsh_h htzsh = NULL;
+       tzsh_quickpanel_h hpanel = NULL;
+       tzsh_window tzWin = 0;
+       tzsh_quickpanel_type_e tzsh_type = -1;
+       int nRet = 0;
+       START_TEST;
+       eWin = CreateWindow("quickpanel client");
+       CHECK_HANDLE(eWin, "CreateWindow failed");
+
+       evas_object_show(eWin);
+       int nSize = sizeof(eQuickPanelTypeArray)/sizeof(eQuickPanelTypeArray[0]);
+
+       tzWin = elm_win_window_id_get(eWin);
+       if(tzWin <=0)
+       {
+               FPRINTF("\\n[Line : %d][%s]elm_win_window_id_get error returned negative value for elm_win_window_id_get",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       htzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
+       CHECK_HANDLE(htzsh, "tzsh_create");
+
+       for(int nCounter = 1; nCounter < nSize; nCounter++)
+       {
+               hpanel = tzsh_quickpanel_create_with_type(htzsh, tzWin, eQuickPanelTypeArray[nCounter]);
+               CHECK_HANDLE_CLEANUP(hpanel, "tzsh_quickpanel_create_with_type", tzsh_destroy(htzsh));
+
+               //Target API
+               nRet = tzsh_quickpanel_type_get(hpanel, &tzsh_type);
+               if (nRet != TZSH_ERROR_NO_SERVICE)
+               {
+                       PRINT_RESULT_CLEANUP(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_type_get", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
+                       if(tzsh_type != eQuickPanelTypeArray[nCounter])
+                       {
+                               FPRINTF("\\n[Line : %d][%s]tzsh_quickpanel_type_get error returned wrong value for type",__LINE__, API_NAMESPACE);
+                               tzsh_quickpanel_destroy(hpanel);
+                               tzsh_destroy(htzsh);
+                               return 1;
+                       }
+               }
+               else
+               {
+                       PRINT_RESULT_CLEANUP(TZSH_ERROR_NO_SERVICE, nRet, "tzsh_quickpanel_type_get", TzshQuickpanelGetError(nRet),tzsh_destroy(htzsh);tzsh_quickpanel_destroy(hpanel));
+               }
+
+       nRet = tzsh_quickpanel_destroy(hpanel);
+       PRINT_RESULT_NORETURN(TZSH_ERROR_NONE, nRet, "tzsh_quickpanel_destroy", TzshQuickpanelGetError(nRet));
+       }
+
+       nRet = tzsh_destroy(htzsh);
+       PRINT_RESULT_NORETURN(TZSH_ERROR_NONE, nRet, "tzsh_destroy", TzshQuickpanelGetError(nRet));
+
+    return 0;
+}
 /** @} */
 /** @} */
index 54c1176cd1ce73b82c416c91b906c58e92076c78..9c734f6db708fcbd270d27d08332bd9db00d20e5 100755 (executable)
@@ -30,6 +30,7 @@ extern int ITc_tzsh_quickpanel_visible_get_p(void);
 extern int ITc_tzsh_quickpanel_orientation_get_p(void);
 extern int ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p(void);
 extern int ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p(void);
+extern int ITc_tzsh_quickpanel_type_get_p(void);
 
 testcase tc_array[] = {
        {"ITc_tzsh_quickpanel_tzsh_create_destroy_p",ITc_tzsh_quickpanel_tzsh_create_destroy_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
@@ -40,6 +41,7 @@ testcase tc_array[] = {
        {"ITc_tzsh_quickpanel_orientation_get_p",ITc_tzsh_quickpanel_orientation_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {"ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p",ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {"ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p",ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
+       {"ITc_tzsh_quickpanel_type_get_p",ITc_tzsh_quickpanel_type_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {NULL, NULL}
 };
 
index 54c1176cd1ce73b82c416c91b906c58e92076c78..9c734f6db708fcbd270d27d08332bd9db00d20e5 100755 (executable)
@@ -30,6 +30,7 @@ extern int ITc_tzsh_quickpanel_visible_get_p(void);
 extern int ITc_tzsh_quickpanel_orientation_get_p(void);
 extern int ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p(void);
 extern int ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p(void);
+extern int ITc_tzsh_quickpanel_type_get_p(void);
 
 testcase tc_array[] = {
        {"ITc_tzsh_quickpanel_tzsh_create_destroy_p",ITc_tzsh_quickpanel_tzsh_create_destroy_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
@@ -40,6 +41,7 @@ testcase tc_array[] = {
        {"ITc_tzsh_quickpanel_orientation_get_p",ITc_tzsh_quickpanel_orientation_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {"ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p",ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {"ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p",ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
+       {"ITc_tzsh_quickpanel_type_get_p",ITc_tzsh_quickpanel_type_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {NULL, NULL}
 };
 
index 54c1176cd1ce73b82c416c91b906c58e92076c78..9c734f6db708fcbd270d27d08332bd9db00d20e5 100755 (executable)
@@ -30,6 +30,7 @@ extern int ITc_tzsh_quickpanel_visible_get_p(void);
 extern int ITc_tzsh_quickpanel_orientation_get_p(void);
 extern int ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p(void);
 extern int ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p(void);
+extern int ITc_tzsh_quickpanel_type_get_p(void);
 
 testcase tc_array[] = {
        {"ITc_tzsh_quickpanel_tzsh_create_destroy_p",ITc_tzsh_quickpanel_tzsh_create_destroy_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
@@ -40,6 +41,7 @@ testcase tc_array[] = {
        {"ITc_tzsh_quickpanel_orientation_get_p",ITc_tzsh_quickpanel_orientation_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {"ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p",ITc_tzsh_quickpanel_event_handler_Visible_add_delete_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {"ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p",ITc_tzsh_quickpanel_event_handler_orientation_add_delete_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
+       {"ITc_tzsh_quickpanel_type_get_p",ITc_tzsh_quickpanel_type_get_p,ITs_tzsh_quickpanel_startup,ITs_tzsh_quickpanel_cleanup},
        {NULL, NULL}
 };