diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2014-03-25 11:42:59 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-25 17:24:01 +0200 |
commit | f1956438cc6038eef324b3adf8e446f1b84dfb2f (patch) | |
tree | aeb189381de5fee90606f16464c1a84b18480f18 /profiles | |
parent | 22a0f404fd1c49d61a553b694fa0ed7c48f016a1 (diff) | |
download | bluez-f1956438cc6038eef324b3adf8e446f1b84dfb2f.tar.gz |
gatt: Move Characteristic properties to attrib/gatt.h
Properties are defined by GATT specification. This patch moves and
renames the defines related to Characteristic properties bits from
attrib/att.h to attrib/gatt.h
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/alert/server.c | 20 | ||||
-rw-r--r-- | profiles/input/hog.c | 4 | ||||
-rw-r--r-- | profiles/proximity/immalert.c | 2 | ||||
-rw-r--r-- | profiles/proximity/linkloss.c | 2 | ||||
-rw-r--r-- | profiles/proximity/reporter.c | 2 | ||||
-rw-r--r-- | profiles/thermometer/thermometer.c | 4 | ||||
-rw-r--r-- | profiles/time/server.c | 10 |
7 files changed, 22 insertions, 22 deletions
diff --git a/profiles/alert/server.c b/profiles/alert/server.c index 92d4fb69d..1612d6cb2 100644 --- a/profiles/alert/server.c +++ b/profiles/alert/server.c @@ -806,8 +806,8 @@ static void register_phone_alert_service(struct alert_adapter *al_adapter) gatt_service_add(al_adapter->adapter, GATT_PRIM_SVC_UUID, &uuid, /* Alert Status characteristic */ GATT_OPT_CHR_UUID16, ALERT_STATUS_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ | - ATT_CHAR_PROPER_NOTIFY, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_READ | + GATT_CHR_PROP_NOTIFY, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, alert_status_read, al_adapter->adapter, GATT_OPT_CCC_GET_HANDLE, @@ -816,13 +816,13 @@ static void register_phone_alert_service(struct alert_adapter *al_adapter) &al_adapter->hnd_value[NOTIFY_ALERT_STATUS], /* Ringer Control Point characteristic */ GATT_OPT_CHR_UUID16, RINGER_CP_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_WRITE_WITHOUT_RESP, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_WRITE_WITHOUT_RESP, GATT_OPT_CHR_VALUE_CB, ATTRIB_WRITE, ringer_cp_write, NULL, /* Ringer Setting characteristic */ GATT_OPT_CHR_UUID16, RINGER_SETTING_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ | - ATT_CHAR_PROPER_NOTIFY, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_READ | + GATT_CHR_PROP_NOTIFY, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, ringer_setting_read, al_adapter->adapter, GATT_OPT_CCC_GET_HANDLE, @@ -909,35 +909,35 @@ static void register_alert_notif_service(struct alert_adapter *al_adapter) gatt_service_add(al_adapter->adapter, GATT_PRIM_SVC_UUID, &uuid, /* Supported New Alert Category */ GATT_OPT_CHR_UUID16, SUPP_NEW_ALERT_CAT_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_READ, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, supp_new_alert_cat_read, al_adapter->adapter, GATT_OPT_CHR_VALUE_GET_HANDLE, &al_adapter->supp_new_alert_cat_handle, /* New Alert */ GATT_OPT_CHR_UUID16, NEW_ALERT_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_NOTIFY, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_NOTIFY, GATT_OPT_CCC_GET_HANDLE, &al_adapter->hnd_ccc[NOTIFY_NEW_ALERT], GATT_OPT_CHR_VALUE_GET_HANDLE, &al_adapter->hnd_value[NOTIFY_NEW_ALERT], /* Supported Unread Alert Category */ GATT_OPT_CHR_UUID16, SUPP_UNREAD_ALERT_CAT_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_READ, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, supp_unread_alert_cat_read, al_adapter->adapter, GATT_OPT_CHR_VALUE_GET_HANDLE, &al_adapter->supp_unread_alert_cat_handle, /* Unread Alert Status */ GATT_OPT_CHR_UUID16, UNREAD_ALERT_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_NOTIFY, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_NOTIFY, GATT_OPT_CCC_GET_HANDLE, &al_adapter->hnd_ccc[NOTIFY_UNREAD_ALERT], GATT_OPT_CHR_VALUE_GET_HANDLE, &al_adapter->hnd_value[NOTIFY_UNREAD_ALERT], /* Alert Notification Control Point */ GATT_OPT_CHR_UUID16, ALERT_NOTIF_CP_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_WRITE, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_WRITE, GATT_OPT_CHR_VALUE_CB, ATTRIB_WRITE, alert_notif_cp_write, NULL, GATT_OPT_INVALID); diff --git a/profiles/input/hog.c b/profiles/input/hog.c index 25985ecb1..a11e04e46 100644 --- a/profiles/input/hog.c +++ b/profiles/input/hog.c @@ -598,10 +598,10 @@ static void forward_report(struct hog_device *hogdev, if (hogdev->attrib == NULL) return; - if (report->decl->properties & ATT_CHAR_PROPER_WRITE) + if (report->decl->properties & GATT_CHR_PROP_WRITE) gatt_write_char(hogdev->attrib, report->decl->value_handle, data, size, output_written_cb, hogdev); - else if (report->decl->properties & ATT_CHAR_PROPER_WRITE_WITHOUT_RESP) + else if (report->decl->properties & GATT_CHR_PROP_WRITE_WITHOUT_RESP) gatt_write_cmd(hogdev->attrib, report->decl->value_handle, data, size, NULL, NULL); } diff --git a/profiles/proximity/immalert.c b/profiles/proximity/immalert.c index 1638cf9cb..3d50b8d63 100644 --- a/profiles/proximity/immalert.c +++ b/profiles/proximity/immalert.c @@ -252,7 +252,7 @@ void imm_alert_register(struct btd_adapter *adapter) /* Alert level characteristic */ GATT_OPT_CHR_UUID16, ALERT_LEVEL_CHR_UUID, GATT_OPT_CHR_PROPS, - ATT_CHAR_PROPER_WRITE_WITHOUT_RESP, + GATT_CHR_PROP_WRITE_WITHOUT_RESP, GATT_OPT_CHR_VALUE_CB, ATTRIB_WRITE, imm_alert_alert_lvl_write, imadapter, GATT_OPT_INVALID); diff --git a/profiles/proximity/linkloss.c b/profiles/proximity/linkloss.c index db168203a..476803ac4 100644 --- a/profiles/proximity/linkloss.c +++ b/profiles/proximity/linkloss.c @@ -294,7 +294,7 @@ void link_loss_register(struct btd_adapter *adapter) /* Alert level characteristic */ GATT_OPT_CHR_UUID16, ALERT_LEVEL_CHR_UUID, GATT_OPT_CHR_PROPS, - ATT_CHAR_PROPER_READ | ATT_CHAR_PROPER_WRITE, + GATT_CHR_PROP_READ | GATT_CHR_PROP_WRITE, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, link_loss_alert_lvl_read, lladapter, GATT_OPT_CHR_VALUE_CB, ATTRIB_WRITE, diff --git a/profiles/proximity/reporter.c b/profiles/proximity/reporter.c index 5861923d5..4beeb7cce 100644 --- a/profiles/proximity/reporter.c +++ b/profiles/proximity/reporter.c @@ -123,7 +123,7 @@ static void register_tx_power(struct btd_adapter *adapter) /* Power level characteristic */ bt_uuid16_create(&uuid, GATT_CHARAC_UUID); - atval[0] = ATT_CHAR_PROPER_READ | ATT_CHAR_PROPER_NOTIFY; + atval[0] = GATT_CHR_PROP_READ | GATT_CHR_PROP_NOTIFY; put_le16(h + 1, &atval[1]); put_le16(POWER_LEVEL_CHR_UUID, &atval[3]); attrib_db_add(adapter, h++, &uuid, ATT_NONE, ATT_NOT_PERMITTED, atval, 5); diff --git a/profiles/thermometer/thermometer.c b/profiles/thermometer/thermometer.c index 9462cc9b7..20575c055 100644 --- a/profiles/thermometer/thermometer.c +++ b/profiles/thermometer/thermometer.c @@ -721,12 +721,12 @@ static void process_thermometer_char(struct thermometer *t, gatt_read_char(t->attrib, c->value_handle, read_interval_cb, t); - if (c->properties & ATT_CHAR_PROPER_WRITE) { + if (c->properties & GATT_CHR_PROP_WRITE) { t->interval_val_handle = c->value_handle; need_desc = true; } - if (c->properties & ATT_CHAR_PROPER_INDICATE) { + if (c->properties & GATT_CHR_PROP_INDICATE) { t->attio_interval_id = g_attrib_register(t->attrib, ATT_OP_HANDLE_IND, c->value_handle, interval_ind_handler, t, NULL); diff --git a/profiles/time/server.c b/profiles/time/server.c index 31ddb0643..1716a5ea0 100644 --- a/profiles/time/server.c +++ b/profiles/time/server.c @@ -154,14 +154,14 @@ static gboolean register_current_time_service(struct btd_adapter *adapter) return gatt_service_add(adapter, GATT_PRIM_SVC_UUID, &uuid, /* CT Time characteristic */ GATT_OPT_CHR_UUID16, CT_TIME_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ | - ATT_CHAR_PROPER_NOTIFY, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_READ | + GATT_CHR_PROP_NOTIFY, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, current_time_read, adapter, /* Local Time Information characteristic */ GATT_OPT_CHR_UUID16, LOCAL_TIME_INFO_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_READ, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, local_time_info_read, adapter, @@ -218,13 +218,13 @@ static gboolean register_ref_time_update_service(struct btd_adapter *adapter) /* Time Update control point */ GATT_OPT_CHR_UUID16, TIME_UPDATE_CTRL_CHR_UUID, GATT_OPT_CHR_PROPS, - ATT_CHAR_PROPER_WRITE_WITHOUT_RESP, + GATT_CHR_PROP_WRITE_WITHOUT_RESP, GATT_OPT_CHR_VALUE_CB, ATTRIB_WRITE, time_update_control, adapter, /* Time Update status */ GATT_OPT_CHR_UUID16, TIME_UPDATE_STAT_CHR_UUID, - GATT_OPT_CHR_PROPS, ATT_CHAR_PROPER_READ, + GATT_OPT_CHR_PROPS, GATT_CHR_PROP_READ, GATT_OPT_CHR_VALUE_CB, ATTRIB_READ, time_update_status, adapter, |