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_API_H_
21 #define __DEF_BLUETOOTH_SHARE_API_H_
30 #define EXPORT_API __attribute__((visibility("default")))
34 BT_SHARE_ERR_NONE = 0,
35 BT_SHARE_ERR_INTERNAL = -1,
36 BT_SHARE_ERR_INVALID_PARAM = -2,
37 BT_SHARE_ERR_UNKNOWN = -3
44 unsigned int tr_status;
60 EXPORT_API sqlite3 *bt_share_open_db(void);
62 EXPORT_API int bt_share_close_db(sqlite3 *db);
64 EXPORT_API int bt_share_add_tr_data(sqlite3 *db, int db_table, bt_tr_data_t *data);
66 EXPORT_API int bt_share_update_tr_data(sqlite3 *db, int db_table, int id, bt_tr_data_t *data);
68 EXPORT_API bt_tr_data_t *bt_share_get_tr_data(sqlite3 *db, int db_table, int id);
70 EXPORT_API GSList *bt_share_get_all_tr_data_list(sqlite3 *db, int db_table);
72 EXPORT_API GSList *bt_share_get_completed_tr_data_list(sqlite3 *db, int db_table);
74 EXPORT_API GSList *bt_share_get_tr_data_list_by_status(sqlite3 *db, int db_table, int status);
76 EXPORT_API unsigned int bt_share_get_last_session_id(sqlite3 *db, int db_table);
78 EXPORT_API int bt_share_release_tr_data_list(GSList *list);
80 EXPORT_API int bt_share_get_tr_data_count(sqlite3 *db, int db_table);
82 EXPORT_API int bt_share_remove_tr_data_by_id(sqlite3 *db, int db_table, int id);
84 EXPORT_API int bt_share_remove_tr_data_by_status(sqlite3 *db, int db_table, int status);
86 EXPORT_API int bt_share_remove_tr_data_by_notification(sqlite3 *db, int db_table);
88 EXPORT_API int bt_share_remove_all_tr_data(sqlite3 *db, int db_table);
94 #endif /* __DEF_BLUETOOTH_SHARE_API_H_ */