[TBT][tbtcoreapp][ACR-957][DPTTIZEN-2928 : Added TCs for CBHM APIs] 28/159528/6
authormaneesha <maneesha.k@samsung.com>
Wed, 8 Nov 2017 05:59:40 +0000 (11:29 +0530)
committershobhit verma <shobhit.v@samsung.com>
Mon, 27 Nov 2017 10:27:24 +0000 (10:27 +0000)
Change-Id: I2ca297ba71c0101021150935f284ea7e1b523950
Signed-off-by: maneesha <maneesha.k@samsung.com>
release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk
release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk
tbtcoreapp/.cproject
tbtcoreapp/inc/model/tbt-info.h
tbtcoreapp/inc/utils/app_module_config.h
tbtcoreapp/inc/view/tbt-cbhm-view.h [new file with mode: 0644]
tbtcoreapp/res/edje/3.0/mobile/cbhm_callback_viewer.edc [new file with mode: 0755]
tbtcoreapp/res/edje/4.0/mobile/cbhm_callback_viewer.edc [new file with mode: 0755]
tbtcoreapp/src/model/tbt-list.c
tbtcoreapp/src/view/tbt-cbhm-view.c [new file with mode: 0755]
tbtcoreapp/src/view/tbt-genlist-view.c

index c3130bf5f8a0827adcdd68a084cac92ca20287b4..3de5c9870858cd093fde79899024260d1b079b65 100644 (file)
Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ
index 6c8408cba17a4f0ed9d8d39fbe14808fe87db0d6..4af3362202f945d0772ab9fa287f131140cb3457 100644 (file)
Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk differ
index e79b3f3f191950784f7f8c5a80f25b6f2cd29c04..88dae342c84325d0b4bea1231b1b9f48c1f5c04d 100644 (file)
                                                <toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug.966772140" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug">
                                                        <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1146520664" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
                                                        <builder autoBuildTarget="all" buildPath="${workspace_loc:/tbtcoreapp}/Debug" enableAutoBuild="true" id="org.tizen.nativecore.target.sbi.gnu.builder.482328865" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/>
-                                                       <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.921707253" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
+                                                       <tool command="arm-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.921707253" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
                                                        <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.1141142708" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
                                                                <option id="gnu.cpp.compiler.option.optimization.level.1995167770" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.debugging.level.core.1231413559" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.94795005" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-4.0-device.core_llvm37.armel.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-4.0-device.core_llvm40.armel"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1151584155" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.705018152" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
                                                                <option id="sbi.gnu.c.compiler.option.debugging.level.core.1866251786" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" value="gnu.c.debugging.level.max" valueType="enumerated"/>
                                                                <option id="sbi.gnu.c.compiler.option.828406008" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-4.0-device.core_llvm37.armel.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-4.0-device.core_llvm40.armel"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.2054553498" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
                                                                </inputType>
                                                        </tool>
-                                                       <tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.692653264" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+                                                       <tool command="#{PLATFORM_DEFAULT_GCC_PREFIX}as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.692653264" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
                                                                <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1386960240" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
                                                        <tool id="org.tizen.nativecore.tool.fnmapgen.2050008912" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/>
                                                <toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.release.100788679" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.release">
                                                        <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.2024417825" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
                                                        <builder buildPath="${workspace_loc:/tbtcoreapp}/Release" id="org.tizen.nativecore.target.sbi.gnu.builder.262999466" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/>
-                                                       <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.1926911209" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
+                                                       <tool command="i586-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.1926911209" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/>
                                                        <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.1390758993" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler">
                                                                <option id="gnu.cpp.compiler.option.optimization.level.491448994" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.debugging.level.core.570472136" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.1605381289" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core_llvm37.i386.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-4.0-emulator.core_llvm40.i386"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.117486491" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1195619816" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
                                                                <option id="sbi.gnu.c.compiler.option.debugging.level.core.1479764417" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core"/>
                                                                <option id="sbi.gnu.c.compiler.option.789625662" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core_llvm37.i386.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-4.0-emulator.core_llvm40.i386"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1046681201" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
                                                                </inputType>
                                                        </tool>
-                                                       <tool command="i386-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1856546451" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+                                                       <tool command="#{PLATFORM_DEFAULT_GCC_PREFIX}as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1856546451" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
                                                                <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1371467971" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
                                                        <tool id="org.tizen.nativecore.tool.fnmapgen.318987509" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/>
index dbc2dbcfa0369be5280e3f1324581807b049b97d..679b58dfd824d9a2ddfe89b06d2306de10f65c8e 100755 (executable)
@@ -306,7 +306,10 @@ typedef enum {
        TBT_APP_MULTICLASS,
 
        TBT_APP_USBHOST,
-       TBT_APP_MOTION_DETECTION
+       TBT_APP_MOTION_DETECTION,
+       TBT_APP_CBHM_CHANGE_CALLBACK,
+       TBT_APP_CBHM_MONITOR_CALLBACK,
+       TBT_APP_CBHM_TYPE_GET
        //TBT_APP_DALI_SCROLL_BAR
 
 } tbt_app_type_e;
index e036b7e302184d04f8f82093ad9757f04b1a7b09..4f21240051d9d9a84823aa964a7756d2fae5cea5 100755 (executable)
 #define TBT_MODULE_APP_USBHOST
 #define TBT_MODULE_MOTION
 #define TBT_MODULE_APP_MOTION_DETECTION
+#define TBT_MODULE_CBHM
+#define TBT_MODULE_APP_CBHM_CHANGE_CALLBACK
+#define TBT_MODULE_APP_CBHM_TYPE_GET
+#define TBT_MODULE_APP_CBHM_MONITOR_CALLBACK
 #endif
diff --git a/tbtcoreapp/inc/view/tbt-cbhm-view.h b/tbtcoreapp/inc/view/tbt-cbhm-view.h
new file mode 100644 (file)
index 0000000..bd90698
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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.
+ *******************************************************************************/
+/**
+ * @file       tbt-cbhm-callbacks.h
+ * @brief   covers cbhm callbacks for item changes, monitor and type get
+ * @since_tizen 4.0
+ * @author     Maneesha Karn(maneesha.k@samsung.com)
+ * @date       November, 2017
+ * @bug                NA
+ * @credit
+ *
+ */
+
+#ifndef __TBT_CBHM_CALLBACKS_H__
+#define __TBT_CBHM_CALLBACKS_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_CBHM
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+
+
+/**
+ * @typedef cbhm_callbacks_view
+ * @since_tizen 4.0
+ */
+typedef struct _cbhm_callbacks_view cbhm_callbacks_view;
+
+/**
+ * @brief Create CBHM test view
+ * @since_tizen 4.0
+ * @param[in] navi Parent naviframe
+ * @param[in] custom structute to hold tbt application information
+ * @param[in] item of the main tbt menu
+ * @return Pointer of cbhm_callbacks_view on success, otherwise NULL
+ */
+cbhm_callbacks_view *cbhm_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_LOCAL_VIEW_H__
diff --git a/tbtcoreapp/res/edje/3.0/mobile/cbhm_callback_viewer.edc b/tbtcoreapp/res/edje/3.0/mobile/cbhm_callback_viewer.edc
new file mode 100755 (executable)
index 0000000..ff25c93
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+collections
+{
+   base_scale: 1.8;
+   group
+   {
+      name: "cbhm_test";
+      parts{
+         part{
+            name: "_title";
+            type: SWALLOW;
+            description{
+               state: "default" 0.0;
+               align: 0.0 0.0;
+               visible: 1;
+               rel1 {relative: 0.0 0.0;}
+               rel2 {relative: 1.0 0.1;}
+            }
+         }
+
+         part{
+            name: "_callback";
+            type: SWALLOW;
+            description{
+               state: "default" 0.0;
+               align: 0.0 0.0;
+               visible: 1;
+               rel1 {relative: 0.0 0.1;}
+               rel2 {relative: 1.0 0.2;}
+            }
+         }
+         part{
+            name: "controlr_part";
+            type: SWALLOW;
+            description {
+               state: "default" 0.0;
+               rel1 {relative: 0.0 0.8;}
+               rel2 {relative: 1.0 1.0;}
+               visible: 1;
+            }
+         }
+
+         swallow {
+            name: "_edittext";
+            type: SWALLOW;
+            desc {
+               state: "default" 0 0;
+               visible: 1;
+               align: 0.5 0.5;
+               color: 236 255 255 249;
+               rel1.relative: 0.0 0.3;
+               rel2.relative: 1.0 0.70;
+            }
+         }
+      }
+   }
+}
\ No newline at end of file
diff --git a/tbtcoreapp/res/edje/4.0/mobile/cbhm_callback_viewer.edc b/tbtcoreapp/res/edje/4.0/mobile/cbhm_callback_viewer.edc
new file mode 100755 (executable)
index 0000000..d645787
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+collections
+{
+   base_scale: 1.8;
+   group
+   {
+      name: "cbhm_test";
+      parts{
+         part{
+            name: "_title";
+            type: SWALLOW;
+            description{
+               state: "default" 0.0;
+               align: 0.0 0.0;
+               visible: 1;
+               rel1 {relative: 0.0 0.0; }
+               rel2 {relative: 1.0 0.1; }
+            }
+         }
+
+         part{
+            name: "_callback";
+            type: SWALLOW;
+            description{
+               state: "default" 0.0;
+               align: 0.0 0.0;
+               visible: 1;
+               rel1 {relative: 0.0 0.1;}
+               rel2 {relative: 1.0 0.2;}
+            }
+         }
+         part{
+            name: "controlr_part";
+            type: SWALLOW;
+            description {
+               state: "default" 0.0;
+               rel1 {relative: 0.0 0.8;}
+               rel2 {relative: 1.0 1.0;}
+               visible: 1;
+            }
+         }
+
+         swallow {
+            name: "_edittext";
+            type: SWALLOW;
+            desc {
+               state: "default" 0 0;
+               visible: 1;
+               align: 0.5 0.5;
+               color: 236 255 255 249;
+               rel1.relative: 0.0 0.3;
+               rel2.relative: 1.0 0.70;
+            }
+         }
+      }
+   }
+}
index 4fc6210420481c034e681f4892a9d6568d772fcd..1bfaeab75c44ad3b11e83aba951e4e5e05aa5c9f 100755 (executable)
@@ -2850,6 +2850,38 @@ static tbt_info tbtapps[] =
                        .result = 0,
                        .required_features_count = 1,
                        .features_required = {FEATURE_ACTIVITY_RECOGNITION}
+               },
+       #endif
+#endif
+#ifdef TBT_MODULE_CBHM
+       #ifdef TBT_MODULE_APP_CBHM_CHANGE_CALLBACK
+               {
+                       .name = "CBHM Change Item Callback",
+                       .parent = "CBHM",
+                       .apptype = TBT_APP_CBHM_CHANGE_CALLBACK,
+                       .icon_name = "dummy",
+                       .info = "1.Please type text into the Editor <br/>2.Copy the Text - Notice Label does not change<br/>3.Now Press 'Add Callback' button <br/>4. Select another text and copy or 'Show ClipBoard' and delete any element, this action should display Callback Message <br/>5. Now press 'Remove Callback'<br/>6. Copy text into the ClipBoard and Label should not change<br/>7. You can click 'Clear Label' to display fresh alerts",
+                       .result = 0
+               },
+       #endif
+       #ifdef TBT_MODULE_APP_CBHM_MONITOR_CALLBACK
+               {
+                       .name = "CBHM Monitor Callback",
+                       .parent = "CBHM",
+                       .apptype = TBT_APP_CBHM_MONITOR_CALLBACK,
+                       .icon_name = "dummy",
+                       .info = "1.Please press 'Add Monitor CB' button it should display message with active status as one. <br/>2. Press 'Remove Monitor CB' and it should Display it in label without error<br/>3. If both above steps are proper Test Case Passes else it Fails",
+                       .result = 0
+               },
+       #endif
+       #ifdef TBT_MODULE_APP_CBHM_TYPE_GET
+               {
+                       .name = "CBHM last Item Type Get",
+                       .parent = "CBHM",
+                       .apptype = TBT_APP_CBHM_TYPE_GET,
+                       .icon_name = "dummy",
+                       .info = "1.Please press any one of Copy button to copy the type of element to ClipBoard. <br/> 2. Press 'Display Type' button to display the last item added to clipboard <br/> If The displayed type is as per selection the Test Case Passes else it Fails",
+                       .result = 0
                }
        #endif
 #endif
diff --git a/tbtcoreapp/src/view/tbt-cbhm-view.c b/tbtcoreapp/src/view/tbt-cbhm-view.c
new file mode 100755 (executable)
index 0000000..4a25660
--- /dev/null
@@ -0,0 +1,558 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  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.
+ *******************************************************************************/
+/**
+ * @file       tbt-cbhm-callbacks.c
+ * @brief      Checks cbhm callbacks added, removed for item change, monitor add and get type of item copied to clipboard
+ *
+ * @author     Maneesha Karn (maneesha.k@samsung.com)
+ * @date       November, 2017
+ * @bug                NA
+ * @credit
+ *
+ */
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_CBHM
+
+#include <Elementary.h>
+#include <locations.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-cbhm-view.h"
+#include "view/tbt-common-view.h"
+#include "utils/config.h"
+#include "cbhm.h"
+
+bool __is_cbhm_test_running = false;
+
+struct _cbhm_callbacks_view {
+       common_view* view;
+       location_manager_h manager;
+
+       Evas_Object *lat_label;
+       Evas_Object *lon_label;
+       Evas_Object *button1;
+       Evas_Object *button2;
+       Evas_Object *button3;
+       Evas_Object *button4;
+       Evas_Object *editfield;
+       tbt_app_type_e apptype;
+       cbhm_h cbhm_handle;
+       bool callbackAdded;
+       bool monitorAdded;
+};
+
+static void _app_destroy_cb(void* this);
+static Evas_Object *add_control_layout(cbhm_callbacks_view *this,
+               Evas_Object *parent);
+static void update(cbhm_callbacks_view *this);
+static void _add_cb_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _rem_cb_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _clear_label_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _show_clipboard_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _add_monitor_callback_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _remove_monitor_callback_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void on_cbhm_item_changed(cbhm_h cbhm_handle, int item_count,
+               void *data);
+static void on_monitor_item_changed(cbhm_h cbhm_handle, bool active_state,
+               void *data);
+static void _text_type_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _markup_type_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _html_type_button_pressed_cb(void *data, Evas_Object *obj,
+               void *event_info);
+static void _selection_type_set_cb(cbhm_sel_type_e type,
+               void *data);
+static void _selection_type_show(void *data, Evas_Object *obj,
+               void *event_info);
+static char *get_selection_type(cbhm_sel_type_e type);
+
+
+static char *get_selection_type(cbhm_sel_type_e type)
+{
+       char msg[40];
+       switch(type)
+       {
+       case CBHM_SEL_TYPE_TEXT :
+               snprintf(msg, sizeof(msg), "CBHM_SEL_TYPE_TEXT");
+               break;
+       case CBHM_SEL_TYPE_HTML :
+               snprintf(msg, sizeof(msg), "CBHM_SEL_TYPE_HTML");
+               break;
+       case CBHM_SEL_TYPE_MARKUP :
+               snprintf(msg, sizeof(msg), "CBHM_SEL_TYPE_MARKUP");
+               break;
+       case CBHM_SEL_TYPE_NONE :
+               snprintf(msg, sizeof(msg), "CBHM_SEL_TYPE_NONE");
+               break;
+       case CBHM_SEL_TYPE_IMAGE :
+               snprintf(msg, sizeof(msg), "CBHM_SEL_TYPE_IMAGE");
+               break;
+       default :
+               snprintf(msg, sizeof(msg), "Unknow Type");
+
+       }
+       return strdup(msg);
+}
+
+
+/**
+ * @function           cbhm_callbacks_view_add
+ * @since_tizen                4.0
+ * @description                CBHM Callbacks View Add
+ * @parameter          Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return                 cbhm_callbacks_view*
+ */
+cbhm_callbacks_view *cbhm_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+
+       RETVM_IF(NULL == navi, NULL, "navi is null");
+
+       int nRet;
+       char msg[100];
+       cbhm_callbacks_view *this = NULL;
+
+       this = calloc(1, sizeof(cbhm_callbacks_view));
+       RETVM_IF(!this, NULL, "calloc failed");
+
+       this->view = calloc(1, sizeof(common_view));
+       RETVM_IF(!this->view, NULL, "calloc failed");
+
+       tbt_info->layout_group = "cbhm_test";
+       tbt_info->layout_file = get_edje_path("cbhm_callback_viewer.edj");
+
+       common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+
+
+       RETVM_IF(NULL == this->view, NULL, "navi is null");
+       nRet = cbhm_open_service(&(this->cbhm_handle));
+       RETVM_IF(nRet != CBHM_ERROR_NONE, NULL, "cbhm_open_service failed");
+       RETVM_IF(this->cbhm_handle == NULL, NULL, "cbhm_handle is NULL");
+
+       this->apptype = tbt_info->apptype;
+       this->lat_label = ui_utils_label_add(this->view->layout, "???");
+       this->lon_label = ui_utils_label_add(this->view->layout, "???");
+
+       elm_label_line_wrap_set(this->lat_label, ELM_WRAP_CHAR);
+       elm_label_line_wrap_set(this->lat_label, ELM_WRAP_CHAR);
+
+       ui_utils_label_set_text(this->lat_label, "???", "left");
+       ui_utils_label_set_text(this->lon_label, "???", "left");
+
+       elm_object_part_content_set(this->view->layout, "_title",
+                       this->lat_label);
+       elm_object_part_content_set(this->view->layout, "_callback",
+                       this->lon_label);
+
+       Evas_Object *table = add_control_layout(this, this->view->layout);
+       elm_object_part_content_set(this->view->layout, "controlr_part",
+                       table);
+
+       if(this->apptype == TBT_APP_CBHM_CHANGE_CALLBACK)
+       {
+               //Create an editfield
+               this->editfield = ui_utils_entry_add(this, this->view->layout, ELM_INPUT_PANEL_LAYOUT_NORMAL, "Trial Text");
+               elm_entry_input_panel_language_set(this->editfield, ELM_INPUT_PANEL_LANG_AUTOMATIC);
+               snprintf(msg, sizeof(msg), "Editor - Please click and type here");
+               elm_object_part_text_set(this->editfield, PART_ENTRY_GUIDE, msg);
+               elm_object_part_content_set(this->view->layout, "_edittext", this->editfield);
+       }
+       __is_cbhm_test_running = true;
+       this->callbackAdded = false;
+       this->monitorAdded = false;
+       update(this);
+
+       return this;
+}
+
+
+/**
+ * @function           add_control_layout
+ * @since_tizen                4.0
+ * @description                Add Control Layout
+ * @parameter          cbhm_callbacks_view*: CBHM Callbacks View Pointer, Evas_Object*: Evas Object Pointer
+ * @return             static Evas_Object*
+ */
+static Evas_Object *add_control_layout(cbhm_callbacks_view *this,              Evas_Object *parent)
+{
+       RETVM_IF(NULL == this, NULL, "view is NULL");
+
+       Evas_Object *table = elm_table_add(parent);
+
+       evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(table);
+
+       elm_table_padding_set(table, TABLE_PADDING_HORIZONTAL,
+                       TABLE_PADDING_VERTICAL);
+
+       if(this->apptype == TBT_APP_CBHM_CHANGE_CALLBACK )
+       {
+               this->button1 = ui_utils_push_button_add(this, table, "Add Callback",
+                       _add_cb_button_pressed_cb);
+               this->button2 = ui_utils_push_button_add(this, table, "Remove Callback",
+                               _rem_cb_button_pressed_cb);
+               this->button3= ui_utils_push_button_add(this, table, "Clear Label",
+                               _clear_label_button_pressed_cb);
+               this->button4= ui_utils_push_button_add(this, table, "Show ClipBoard",
+                                       _show_clipboard_button_pressed_cb);
+       }
+       else if(this->apptype ==  TBT_APP_CBHM_MONITOR_CALLBACK)
+       {
+               this->button1= ui_utils_push_button_add(this, table, "Add Monitor CB",
+                               _add_monitor_callback_button_pressed_cb);
+               this->button2 = ui_utils_push_button_add(this, table, "Remove Monitor CB",
+                               _remove_monitor_callback_button_pressed_cb);
+               this->button3= ui_utils_push_button_add(this, table, "Clear Label",
+                               _clear_label_button_pressed_cb);
+               this->button4  = ui_utils_push_button_add(this, table, "Show Clipboard",
+                               _show_clipboard_button_pressed_cb);
+       }
+       else
+       {
+               this->button1  = ui_utils_push_button_add(this, table, "Copy Text",
+                               _text_type_button_pressed_cb);
+               this->button2  = ui_utils_push_button_add(this, table, "Copy Markup",
+                               _markup_type_button_pressed_cb);
+               this->button3  = ui_utils_push_button_add(this, table, "Copy HTML",
+                               _html_type_button_pressed_cb);
+               this->button4  = ui_utils_push_button_add(this, table, "Display Type",
+                               _selection_type_show);
+       }
+       elm_table_pack(table, this->button1, 0, 0, 1, 1);
+       elm_table_pack(table, this->button2, 1, 0, 2, 1);
+       elm_table_pack(table, this->button3, 0, 1, 1, 2);
+       elm_table_pack(table, this->button4, 1, 1, 2, 2);
+       return table;
+}
+
+/**
+ * @function           _add_cb_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                Add Callback Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _add_cb_button_pressed_cb(void *data, Evas_Object *obj,    void *event_info)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       RETM_IF(NULL == this, "cbhm_callbacks_view is null");
+
+       int nRet = 0;
+
+       if(this->callbackAdded == false)
+       {
+               nRet = cbhm_item_changed_callback_add(this->cbhm_handle, on_cbhm_item_changed, data);
+               RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_item_changed_callback_add failed");
+               this->callbackAdded = true;
+       }
+
+       update(this);
+}
+
+/**
+ * @function           _rem_cb_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 Remove Callback Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _rem_cb_button_pressed_cb(void *data, Evas_Object *obj,    void *event_info)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       int nRet = 0;
+       RETM_IF(NULL == this, "cbhm_callbacks_view is null");
+
+       if(this->callbackAdded == true)
+       {
+               nRet = cbhm_item_changed_callback_remove(this->cbhm_handle, on_cbhm_item_changed, data);
+               RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_item_changed_callback_remove failed");
+               this->callbackAdded = false;
+       }
+
+       update(this);
+}
+
+/**
+ * @function           _clear_label_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 Clear Label Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _clear_label_button_pressed_cb(void *data, Evas_Object *obj,       void *event_info)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       RETM_IF(NULL == this, "cbhm_callbacks_view is null");
+       ui_utils_label_set_text(this->lat_label, "Cleared Label", "left");
+       ui_utils_label_set_text(this->lon_label, "Waiting for Event", "left");
+}
+
+
+
+/**
+ * @function           _show_clipboard_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 Show Clipboard Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _show_clipboard_button_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       RETM_IF(NULL == this, "cbhm_callbacks_view is null");
+       int nRet = cbhm_show(this->cbhm_handle);
+       RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_show failed");
+       ui_utils_label_set_text(this->lat_label, "Show Clipboard", "left");
+}
+
+
+/**
+ * @function           _add_monitor_callback_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 Add Monitor Callback Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _add_monitor_callback_button_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       if(this->monitorAdded == false)
+       {
+               int nRet = cbhm_monitor_callback_add(this->cbhm_handle, on_monitor_item_changed, data);
+               RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_monitor_callback_add failed");
+               ui_utils_label_set_text(this->lat_label, "Add Monitor Callback", "left");
+               this->monitorAdded = true;
+       }
+}
+
+
+/**
+ * @function           _remove_monitor_callback_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 Remove Monitor Calback Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _remove_monitor_callback_button_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       if(this->monitorAdded == true)
+       {
+               int nRet = cbhm_monitor_callback_remove(this->cbhm_handle, on_monitor_item_changed, data);
+               RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_monitor_callback_remove failed");
+               ui_utils_label_set_text(this->lat_label, "Remove Monitor Callback", "left");
+               this->monitorAdded = false;
+       }
+}
+
+/**
+ * @function           _text_type_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 Text Type Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _text_type_button_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       _selection_type_set_cb(CBHM_SEL_TYPE_TEXT, data);
+}
+
+/**
+ * @function           _markup_type_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 Markup Type BUtton Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+
+static void _markup_type_button_pressed_cb(void *data, Evas_Object *obj,       void *event_info)
+{
+       _selection_type_set_cb(CBHM_SEL_TYPE_MARKUP, data);
+}
+
+/**
+ * @function           _html_type_button_pressed_cb
+ * @since_tizen                4.0
+ * @description                 HTML type  Button Pressed Cb
+ * @parameter          void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer
+ * @return             static void
+ */
+static void _html_type_button_pressed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       _selection_type_set_cb(CBHM_SEL_TYPE_HTML, data);
+}
+
+/**
+ * @function            _selection_type_set_cb
+ * @since_tizen                4.0
+ * @description                 Selection Type Set Cb
+ * @parameter          cbhm_sel_type_e: Type, void *: Data
+ * @return             static void
+ */
+static void _selection_type_set_cb(cbhm_sel_type_e type, void *data)
+{
+       int nRet;
+       char *hello_str;
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       hello_str = (char *) malloc(50);
+       snprintf(hello_str, 50, "String : %s", get_selection_type(type));
+
+       nRet = cbhm_selection_type_set(this->cbhm_handle, type);
+       RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_selection_type_set failed");
+
+       nRet = cbhm_selection_set(this->cbhm_handle, type, hello_str, strlen(hello_str));
+       RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_selection_set failed");
+}
+
+
+/**
+ * @function           _selection_type_show
+ * @since_tizen                4.0
+ * @description                 Show the selection type
+ * @parameter          void* : Data, Evas_Object*: Evas Object Pointer, void* : Event Information
+ * @return             static void
+ */
+static void _selection_type_show(void *data, Evas_Object *obj, void *event_info)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       int nRet;
+       cbhm_sel_type_e sType;
+
+       nRet = cbhm_latest_item_type_get(this->cbhm_handle, &sType);
+       RETM_IF(nRet != CBHM_ERROR_NONE, "cbhm_latest_item_type_get failed");
+
+       switch(sType)
+       {
+       case CBHM_SEL_TYPE_MARKUP :
+               ui_utils_label_set_text(this->lat_label, "Selection Type is Markup", "left");
+               break;
+       case CBHM_SEL_TYPE_TEXT :
+               ui_utils_label_set_text(this->lat_label, "Selection Type is Text", "left");
+               break;
+       case CBHM_SEL_TYPE_HTML :
+               ui_utils_label_set_text(this->lat_label, "Selection Type is HTML", "left");
+               break;
+       default :
+               ui_utils_label_set_text(this->lat_label, "Unknown Type", "left");
+       }
+}
+
+
+/**
+ * @function           update
+ * @since_tizen                4.0
+ * @description                Update
+ * @parameter          cbhm_callbacks_view*: CBHM Callbacks View Pointer
+ * @return             static void
+ */
+static void update(cbhm_callbacks_view *this)
+{
+       RETM_IF(NULL == this, "cbhm_callbacks_view is null");
+
+       if (this->callbackAdded)
+       {
+               ui_utils_label_set_text(this->lat_label, "Callback added", "left");
+               ui_utils_label_set_text(this->lon_label, "Waiting for callback...",
+                               "left");
+       }
+       else
+       {
+               ui_utils_label_set_text(this->lat_label, "No Callback Added", "left");
+               ui_utils_label_set_text(this->lon_label, "Waiting for callback...",
+                               "left");
+       }
+}
+
+
+/**
+ * @function            on_cbhm_item_changed
+ * @since_tizen                4.0
+ * @description                Callback on CBHM Item Changed
+ * @parameter          cbhm_handle: CBHM Handle, int: Item Count, void*: Void Pointer
+ * @return                     static void
+ */
+static void on_cbhm_item_changed(cbhm_h cbhm_handle, int item_count, void *data)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       RETM_IF(NULL == this, "cbhm_callbacks_view is null");
+       char msg[100];
+       snprintf(msg, sizeof(msg), "CBHM Item Changed Callback Hit with item number %d", item_count);
+       ui_utils_label_set_text(this->lon_label, msg,
+                       "left");
+}
+
+
+/**
+ * @function           on_monitor_item_changed
+ * @since_tizen                4.0
+ * @description                Callback on Monitor Item Changed
+ * @parameter          cbhm_handle: CBHM Handle ,bool: active state, void*: Void Pointer
+ * @return                     static void
+ */
+static void on_monitor_item_changed(cbhm_h cbhm_handle, bool active_state, void *data)
+{
+       cbhm_callbacks_view *this = (cbhm_callbacks_view*) data;
+       RETM_IF(NULL == this, "cbhm_callbacks_view is null");
+       char msg[100];
+       snprintf(msg, sizeof(msg), "CBHM Monitor Changed Callback Hit with active state %d", active_state);
+       ui_utils_label_set_text(this->lon_label, msg,
+                       "left");
+return;
+}
+
+
+/**
+ * @function           _app_destroy_cb
+ * @since_tizen                4.0
+ * @description                 App Destroy Cb
+ * @parameter          void*: Void Pointer
+ * @return             static void
+ */
+static void _app_destroy_cb(void* this)
+{
+       RETM_IF(NULL == this, "data is NULL");
+
+       cbhm_callbacks_view *view = NULL;
+       view = (cbhm_callbacks_view*) this;
+       RETM_IF(NULL == view, "view is NULL");
+
+       __is_cbhm_test_running = false;
+
+       if(view->callbackAdded == true)
+               cbhm_item_changed_callback_remove(view->cbhm_handle, on_cbhm_item_changed, view);
+
+       if(view->monitorAdded == true)
+               cbhm_monitor_callback_remove(view->cbhm_handle, on_monitor_item_changed, view);
+
+       if(view->cbhm_handle != NULL)
+               cbhm_close_service(view->cbhm_handle);
+
+       SAFE_DELETE(view->view);
+       SAFE_DELETE(view);
+}
+
+
+#endif
index 8c8d083224008c8e1e1414c69587715184d5ce4f..d0b1e75355121a6bd27ee7a788de4da3a4b67de1 100755 (executable)
 #include "view/tbt-multiclass-view.h"
 #include "view/tbt-usb-host-view.h"
 #include "view/tbt-motion-detection-view.h"
+#include "view/tbt-cbhm-view.h"
+
 typedef struct
 {
        Evas_Object *win;
@@ -1257,6 +1259,17 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void
                                motion_detection_view_add(view->navi, info, it);
                                break;
                #endif
+               #ifdef TBT_MODULE_CBHM
+                       case TBT_APP_CBHM_CHANGE_CALLBACK :
+                               cbhm_view_add(view->navi, info, it);
+                               break;
+                       case TBT_APP_CBHM_MONITOR_CALLBACK :
+                               cbhm_view_add(view->navi, info, it);
+                               break;
+                       case TBT_APP_CBHM_TYPE_GET :
+                               cbhm_view_add(view->navi, info, it);
+                               break;
+               #endif
                default:
                        assert(false);
                        break;