4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 * Girishashok Joshi <girish.joshi@samsung.com>
8 * Chanyeol Park <chanyeol.park@samsung.com>
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
24 #ifndef __DEF_BT_PB_AGENT_H_
25 #define __DEF_BT_PB_AGENT_H_
31 #include "bluetooth_map_types.h"
34 BT_MAP_AGENT_ERROR_INTERNAL,
35 BT_MAP_AGENT_ERROR_CANCEL,
36 } bt_map_agent_error_t;
38 #define BT_MAP_SERVICE_OBJECT_PATH "/org/bluez/map_agent"
39 #define BT_MAP_SERVICE_NAME "org.bluez.map_agent"
40 #define BT_MAP_SERVICE_INTERFACE "org.bluez.MapAgent"
43 #define LOG_TAG "BLUETOOTH_AGENT_MAP"
44 #define INFO(fmt, args...) SLOGI(fmt, ##args)
45 #define DBG(fmt, args...) SLOGD(fmt, ##args)
46 #define ERR(fmt, args...) SLOGE(fmt, ##args)
48 #define DBG_SECURE(fmt, args...) SECURE_SLOGD(fmt, ##args)
49 #define ERR_SECURE(fmt, args...) SECURE_SLOGE(fmt, ##args)
51 #define FUCNTION_CALLS
53 #define FN_START DBG("ENTER==>")
54 #define FN_END DBG("EXIT===>")
60 #define retv_if(expr, val) \
63 ERR("(%s) return", #expr); \
68 void _bt_mns_client_event_notify(gchar *event, guint64 handle,
69 gchar *folder, gchar *old_folder,
71 int _bt_update_id(guint64 map_id, int new_uid, int msg_type);
72 gboolean _bt_validate_msg_data(message_info_t *msg_info);
73 void _bt_message_info_free(gpointer data);
74 void _get_msg_timestamp(time_t *ltime, char *timestamp);
75 guint64 _bt_add_id(int uid, int msg_type);
76 guint64 _bt_validate_uid(int uid, int msg_type);
77 gboolean is_mns_connected(void);
78 gchar *__bt_get_sms_pdu_from_msg_data(gchar *number, char *msg, time_t tm,
80 gboolean _bt_verify_read_status(message_info_t *msg_info, guint8 read_status);
81 gboolean _bt_verify_sender(message_info_t *msg_info, char *sender);
82 gboolean _bt_verify_receiver(message_info_t *msg_info, char *receiver);
83 gboolean _bt_verify_time(message_info_t *msg_info, map_msg_filter_t *filter);
84 gboolean _bt_filter_priority(message_info_t *msg_info, guint8 priority);
85 #endif /* __DEF_BT_AGENT_H_ */