4 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __DEF_BLUETOOTH_SHARE_COMMON_H_
21 #define __DEF_BLUETOOTH_SHARE_COMMON_H_
28 #include <tzplatform_config.h>
30 /* Define Error type */
31 #define BT_SHARE_FAIL -1
32 #define BT_SHARE_ERROR_NONE 0
34 #define BT_DEFAULT_MEM_PHONE 0
35 #define BT_DEFAULT_MEM_MMC 1
37 #define STORAGE_PATH_LEN_MAX 255
39 #define BT_ADDRESS_STRING_SIZE 18 /**< This specifies bluetooth device address string length */
40 #define BT_ADDRESS_LENGTH 6 /**< This specifies bluetooth device address length */
42 #define BT_OBEX_PATH_PREFIX "/opt/usr/media"
43 #define BT_OBEX_DEFAULT_PATH "/opt/usr/home/owner/media"
45 #define BT_DOWNLOAD_DEFAULT_PHONE_FOLDER "/opt/usr/home/owner/media/Downloads"
46 #define BT_DOWNLOAD_DEFAULT_MMC_FOLDER "/opt/media/SDCardA1"
47 #define BT_DOWNLOAD_DEFAULT_MEDIA_FOLDER "/opt/usr/home/owner/media/Downloads"
48 #define BT_DOWNLOAD_PHONE_ROOT "/opt/usr/home/owner/media/"
49 #define BT_DOWNLOAD_MMC_ROOT "/opt/media/SDCardA1"
50 #define BT_FTP_FOLDER "/opt/share/bt-ftp"
51 #define BT_FTP_FOLDER_PHONE "/opt/share/bt-ftp/Media/"
52 #define BT_FTP_FOLDER_MMC "/opt/share/bt-ftp/SD_External/"
54 #define BT_TMP_DIR "/opt/usr/home/owner/media/Downloads/"
55 #define BT_TMP_FILE BT_TMP_DIR"bluetooth_content_share"
56 #define TXT_FILE_NAME BT_TMP_DIR"bluetooth_content_share.txt"
57 #define HTML_FILE_NAME BT_TMP_DIR"bluetooth_content_share.html"
58 #define TXT_FILE_FORMAT BT_TMP_DIR"bluetooth_content_share%s.txt"
59 #define HTML_FILE_FORMAT BT_TMP_DIR"bluetooth_content_share%s.html"
60 #define HTML_FORMAT "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"/></head><body><a href=\"%s\">%s</a></body></html>"
61 #define BT_CONTACT_SHARE_TMP_DIR "/opt/usr/home/owner/media/Downloads/"
63 #define BT_SHARE_DATA_DIR tzplatform_mkpath(TZ_SYS_GLOBALUSER_DATA, "bluetooth-share")
71 BT_STATUS_OFF = 0x0000,
72 BT_STATUS_ON = 0x0001,
73 BT_STATUS_BT_VISIBLE = 0x0002,
74 BT_STATUS_TRANSFER = 0x0004,
77 int _bt_share_block_sleep(gboolean is_block);
78 int _bt_set_transfer_indicator(gboolean state);
79 char *_bt_share_create_transfer_file(char *text);
80 void _bt_remove_tmp_file(char *file_path);
81 void _bt_remove_vcf_file(char *file_path);
82 char *_bt_get_time_of_the_day(void);
83 void _bt_get_default_storage(char *storage);
84 char *_bt_share_get_storage_path(int storage_type);
85 int _bt_share_get_active_uid(uid_t *uid);
86 void _bt_convert_addr_type_to_string(char *address, char *addr);
87 int _bt_get_available_int_memory(double *dAvail);
88 gboolean _bt_get_available_ext_memory(unsigned long long *available_mem_size);
93 #endif /* __DEF_BLUETOOTH_SHARE_COMMON_H_ */