Add the condition about contact service function for TV 34/83034/1 accepted/tizen/common/20160809.184107 accepted/tizen/common/20160819.131153 accepted/tizen/ivi/20160809.232756 accepted/tizen/ivi/20160819.063554 accepted/tizen/mobile/20160809.232822 accepted/tizen/mobile/20160819.063603 accepted/tizen/tv/20160809.232638 accepted/tizen/tv/20160819.063535 accepted/tizen/wearable/20160809.232851 accepted/tizen/wearable/20160819.063542 submit/tizen/20160809.064342 submit/tizen/20160819.042643
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 9 Aug 2016 01:09:08 +0000 (10:09 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 9 Aug 2016 01:09:08 +0000 (10:09 +0900)
Change-Id: I832a4467714c077c85c778eb34a65c5d9fceb232
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
CMakeLists.txt
include/bt-type-define.h
include/bt-util.h
packaging/ug-bluetooth-efl.spec
src/libraries/bt-util.c
src/ui/bt-main-view.c

index a09094d..c6b11d2 100644 (file)
@@ -26,6 +26,34 @@ src/libraries/bt-net-connection.c
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
+IF(TIZEN_TV)
+SET(PKG_MODULES
+       elementary
+       appcore-efl
+       ui-gadget-1
+       dlog
+       vconf
+       edbus
+       evas
+       edje
+       ecore
+       eina
+       aul
+       syspopup-caller
+       gobject-2.0
+       motion
+       capi-network-bluetooth
+       capi-network-connection
+       capi-system-device
+       capi-appfw-application
+       notification
+       efl-extension
+       glib-2.0
+       gio-2.0
+       dpm
+)
+ADD_DEFINITIONS("-DTIZEN_TV")
+ELSE(TIZEN_TV)
 SET(PKG_MODULES
        elementary
        appcore-efl
@@ -52,6 +80,7 @@ SET(PKG_MODULES
        dpm
        contacts-service2
 )
+ENDIF(TIZEN_TV)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})
index 76d571e..1ae2770 100644 (file)
@@ -130,7 +130,9 @@ extern "C" {
 
 #define BT_APPCONTROL_VISIBILITY_MIME "application/x-bluetooth-visibility"
 
+#ifndef TIZEN_TV
 #define BT_VCF_FOLDER_PATH "/tmp/"
+#endif
 
 /* AppControl Output */
 #define BT_APPCONTROL_ADDRESS "http://tizen.org/appcontrol/data/bluetooth/address"
index e2b0bd7..861fc2d 100644 (file)
@@ -103,9 +103,11 @@ gboolean _bt_util_is_space_str(const char *name_str);
 void _bt_util_max_len_reached_cb(void *data, Evas_Object *obj,
                                        void *event_info);
 
+#ifndef TIZEN_TV
 char *_bt_util_vcard_create_from_id(int id, bool my_profile, const char *working_dir);
 
 char *_bt_util_vcard_create_from_id_list(const int *id_list, int count, const char *working_dir, volatile bool *cancel);
+#endif
 
 int _bt_util_create_dpm_context(void *ug_data);
 
index 31d66b2..e1b5307 100644 (file)
@@ -38,8 +38,11 @@ BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(notification)
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(gio-2.0)
-BuildRequires: pkgconfig(contacts-service2)
 BuildRequires: pkgconfig(dpm)
+%if "%{?profile}" != "tv"
+BuildRequires: pkgconfig(contacts-service2)
+%endif
+
 
 %description
 UI gadget about the bluetooth
@@ -63,7 +66,13 @@ export CFLAGS="$CFLAGS -DTIZEN_HID -DTIZEN_COMMON"
 %endif
 
 export LDFLAGS
-cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}
+
+%cmake \
+%if "%{?profile}" == "tv"
+       -DTIZEN_TV=YES \
+%endif
+
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}
 
 make %{?jobs:-j%jobs}
 
index 04cf151..9e742b4 100644 (file)
 #include <aul.h>
 #include <notification.h>
 #include <dpm/restriction.h>
+#ifndef TIZEN_TV
 #include <contacts.h>
 #include <dirent.h>
 #include <fcntl.h>
+#endif
 
 #include "bt-main-ug.h"
 #include "bt-util.h"
@@ -775,6 +777,7 @@ gboolean _bt_util_is_dpm_restricted(void *handle)
        return (dpm_state == 0) ? TRUE : FALSE;
 }
 
+#ifndef TIZEN_TV
 static bool __bt_util_file_exists(const char *file)
 {
        bool res = false;
@@ -1025,3 +1028,4 @@ char *_bt_util_vcard_create_from_id_list(const int *id_list, int count, const ch
 
        return vcard_path;
 }
+#endif
index 8442c51..cc16df1 100644 (file)
 
 #define MULTI_SHARE_SERVICE_DATA_PATH "http://tizen.org/appcontrol/data/path"
 #define APP_CONTROL_OPERATION_SHARE_CONTACT "http://tizen.org/appcontrol/operation/share_contact"
+#ifndef TIZEN_TV
 #define APP_CONTROL_MIME_CONTACT "application/vnd.tizen.contact"
 #define APP_CONTROL_MY_PROFILE_DATA_TYPE "my_profile"
+#endif
 #define SERVICE_SHARE_CONTACT_MODE "http://tizen.org/appcontrol/data/social/namecard_share_mode"
 #define SERVICE_SHARE_CONTACT_ITEM "http://tizen.org/appcontrol/data/social/item_type"
 #define SHARE_CONTACT_DATA_PATH "/opt/usr/media/Downloads/.bluetooth"
@@ -4232,6 +4234,7 @@ int _bt_main_request_pairing_with_effect(bt_ug_data *ugd,
 
 void __bt_main_parse_service(bt_ug_data *ugd, app_control_h service)
 {
+#ifndef TIZEN_TV
        char *uri_scheme = NULL;;
        char *body_text = NULL;
        char *launch_type = NULL;
@@ -4518,6 +4521,7 @@ void __bt_main_parse_service(bt_ug_data *ugd, app_control_h service)
 
        if(mime)
                free(mime);
+#endif
 }
 
 void _bt_main_init_status(bt_ug_data *ugd, void *data)