diff options
author | Olivier Guiter <olivier.guiter@linux.intel.com> | 2012-10-22 15:52:53 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-10-24 17:50:14 +0200 |
commit | d70849d9b843793034d89e50638cb7359c34d07c (patch) | |
tree | 44aed4931076ee27fdd7803a7feba406a1abe86c /include | |
parent | 3178ceb440a0dbf97288ce4752a3ffa545175d22 (diff) | |
download | neard-d70849d9b843793034d89e50638cb7359c34d07c.tar.gz neard-d70849d9b843793034d89e50638cb7359c34d07c.tar.bz2 neard-d70849d9b843793034d89e50638cb7359c34d07c.zip |
handover: Change carriers type to bitfield
This would allow multiple carriers at the same time (e.g. Bluetooth
and Wifi)
Diffstat (limited to 'include')
-rw-r--r-- | include/ndef.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/ndef.h b/include/ndef.h index 943811c..fdc5006 100644 --- a/include/ndef.h +++ b/include/ndef.h @@ -32,10 +32,11 @@ struct near_ndef_message { uint8_t *data; }; -enum near_ndef_handover_carrier { - NEAR_CARRIER_BLUETOOTH, - NEAR_CARRIER_WIFI, -}; +/* near_ndef_handover_carrier*/ +#define NEAR_CARRIER_EMPTY 0x00 +#define NEAR_CARRIER_BLUETOOTH 0x01 /* bit 0 */ +#define NEAR_CARRIER_WIFI 0x02 /* bit 1 */ +#define NEAR_CARRIER_UNKNOWN 0x80 /* Bit 7 */ int near_ndef_count_records(uint8_t *ndef_in, size_t ndef_in_length, uint8_t record_type); @@ -54,7 +55,7 @@ struct near_ndef_message *near_ndef_prepare_uri_record(uint8_t identifier, struct near_ndef_message *near_ndef_prepare_handover_record(char* type_name, struct near_ndef_record *record, - enum near_ndef_handover_carrier carrier); + uint8_t carriers); struct near_ndef_message * near_ndef_prepare_smartposter_record(uint8_t uri_identifier, |