aboutsummaryrefslogtreecommitdiffstats
path: root/attrib
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2010-07-22 16:50:59 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2010-08-09 18:06:44 -0400
commit735bc5019a487e62b293c60c0fd819481c9925ed (patch)
treedad689c4963765cfe49c921a216eedece0afa1c0 /attrib
parentcb1b86a6abc692a0daa73d62454d1052d6a688d1 (diff)
downloadbluez-735bc5019a487e62b293c60c0fd819481c9925ed.tar.gz
bluez-735bc5019a487e62b293c60c0fd819481c9925ed.tar.xz
bluez-735bc5019a487e62b293c60c0fd819481c9925ed.zip
Fix ATT utility functions naming
If we want to support both client and server roles, we must be clear that we are encoding/decoding requests or responses.
Diffstat (limited to 'attrib')
-rw-r--r--attrib/att.c10
-rw-r--r--attrib/att.h10
-rw-r--r--attrib/client.c3
3 files changed, 11 insertions, 12 deletions
diff --git a/attrib/att.c b/attrib/att.c
index 47926488..14dd274c 100644
--- a/attrib/att.c
+++ b/attrib/att.c
@@ -85,7 +85,7 @@ void att_data_list_free(struct att_data_list *list)
free(list);
}
-uint16_t att_read_by_grp_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
+uint16_t enc_read_by_grp_req(uint16_t start, uint16_t end, uuid_t *uuid,
uint8_t *pdu, int len)
{
uint16_t *p16;
@@ -112,7 +112,7 @@ uint16_t att_read_by_grp_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
return 7;
}
-struct att_data_list *att_read_by_grp_type_decode(const uint8_t *pdu, int len)
+struct att_data_list *dec_read_by_grp_resp(const uint8_t *pdu, int len)
{
struct att_data_list *list;
const uint8_t *ptr;
@@ -137,13 +137,13 @@ struct att_data_list *att_read_by_grp_type_decode(const uint8_t *pdu, int len)
return list;
}
-uint16_t att_find_by_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
+uint16_t enc_find_by_type_req(uint16_t start, uint16_t end, uuid_t *uuid,
uint8_t *pdu, int len)
{
return 0;
}
-uint16_t att_read_by_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
+uint16_t enc_read_by_type_req(uint16_t start, uint16_t end, uuid_t *uuid,
uint8_t *pdu, int len)
{
uint16_t *p16;
@@ -170,7 +170,7 @@ uint16_t att_read_by_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
return 7;
}
-struct att_data_list *add_read_by_type_decode(const uint8_t *pdu, int len)
+struct att_data_list *dec_read_by_type_resp(const uint8_t *pdu, int len)
{
struct att_data_list *list;
const uint8_t *ptr;
diff --git a/attrib/att.h b/attrib/att.h
index b7c975e7..0a16ff1b 100644
--- a/attrib/att.h
+++ b/attrib/att.h
@@ -123,14 +123,14 @@ struct att_data_list {
void att_data_list_free(struct att_data_list *list);
const char *att_ecode2str(uint8_t status);
-uint16_t att_read_by_grp_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
+uint16_t enc_read_by_grp_req(uint16_t start, uint16_t end, uuid_t *uuid,
uint8_t *pdu, int len);
-uint16_t att_find_by_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
+uint16_t enc_find_by_type_req(uint16_t start, uint16_t end, uuid_t *uuid,
uint8_t *pdu, int len);
-struct att_data_list *att_read_by_grp_type_decode(const uint8_t *pdu, int len);
-uint16_t att_read_by_type_encode(uint16_t start, uint16_t end, uuid_t *uuid,
+struct att_data_list *dec_read_by_grp_resp(const uint8_t *pdu, int len);
+uint16_t enc_read_by_type_req(uint16_t start, uint16_t end, uuid_t *uuid,
uint8_t *pdu, int len);
-struct att_data_list *add_read_by_type_decode(const uint8_t *pdu, int len);
+struct att_data_list *dec_read_by_type_resp(const uint8_t *pdu, int len);
#ifdef __cplusplus
}
diff --git a/attrib/client.c b/attrib/client.c
index 2f1698eb..d840c767 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -142,8 +142,7 @@ static guint gatt_discover_primary(GAttrib *attrib, uint16_t start,
sdp_uuid16_create(&uuid, GATT_PRIM_SVC_UUID);
- plen = att_read_by_grp_type_encode(start, end,
- &uuid, pdu, sizeof(pdu));
+ plen = enc_read_by_grp_req(start, end, &uuid, pdu, sizeof(pdu));
if (plen == 0)
return 0;