Codebase list libfreefare / e7f8581
fix *get_supported_modulation and *get_supported_baud_rate protos in nfc_driver and public ones. Romuald Conty 12 years ago
3 changed file(s) with 32 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
7272 NFC_EXPORT int nfc_abort_command (nfc_device *pnd);
7373 NFC_EXPORT size_t nfc_list_devices (nfc_context *context, nfc_connstring connstrings[], size_t connstrings_len);
7474 NFC_EXPORT int nfc_idle (nfc_device *pnd);
75 NFC_EXPORT int nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt);
76 NFC_EXPORT int nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br);
7775
7876 /* NFC initiator: act as "reader" */
7977 NFC_EXPORT int nfc_initiator_init (nfc_device *pnd);
104102 /* Special data accessors */
105103 NFC_EXPORT const char *nfc_device_get_name (nfc_device *pnd);
106104 NFC_EXPORT const char *nfc_device_get_connstring (nfc_device *pnd);
105 NFC_EXPORT int nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
106 NFC_EXPORT int nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);
107107
108108 /* Properties accessors */
109109 NFC_EXPORT int nfc_device_set_property_int (nfc_device *pnd, const nfc_property property, const int value);
150150
151151 int (*device_set_property_bool) (struct nfc_device *pnd, const nfc_property property, const bool bEnable);
152152 int (*device_set_property_int) (struct nfc_device *pnd, const nfc_property property, const int value);
153 int (*get_supported_modulation) (struct nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt);
154 int (*get_supported_baud_rate) (struct nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br);
153 int (*get_supported_modulation) (struct nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
154 int (*get_supported_baud_rate) (struct nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);
155155
156156 int (*abort_command) (struct nfc_device *pnd);
157157 int (*idle) (struct nfc_device *pnd);
269269 return szDeviceFound;
270270 }
271271
272 /** @ingroup dev
273 * @brief Get supported modulations.
274 * @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
275 * @param pnd \a nfc_device struct pointer that represent currently used device
276 * @param mode \a nfc_mode.
277 * @param supported_mt pointer of \a nfc_modulation_type array.
278 *
279 */
280 int
281 nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt)
282 {
283 HAL (get_supported_modulation, pnd, mode, supported_mt);
284 }
285
286 /** @ingroup dev
287 * @brief Get supported baud rates.
288 * @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
289 * @param pnd \a nfc_device struct pointer that represent currently used device
290 * @param nmt \a nfc_modulation_type.
291 * @param supported_br pointer of \a nfc_baud_rate array.
292 *
293 */
294 int
295 nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br)
296 {
297 HAL (get_supported_baud_rate, pnd, nmt, supported_br);
298 }
299
300272 /** @ingroup properties
301273 * @brief Set a device's integer-property value
302274 * @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
1016988 return pnd->connstring;
1017989 }
1018990
991 /** @ingroup data
992 * @brief Get supported modulations.
993 * @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
994 * @param pnd \a nfc_device struct pointer that represent currently used device
995 * @param mode \a nfc_mode.
996 * @param supported_mt pointer of \a nfc_modulation_type array.
997 *
998 */
999 int
1000 nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt)
1001 {
1002 HAL (get_supported_modulation, pnd, mode, supported_mt);
1003 }
1004
1005 /** @ingroup data
1006 * @brief Get supported baud rates.
1007 * @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
1008 * @param pnd \a nfc_device struct pointer that represent currently used device
1009 * @param nmt \a nfc_modulation_type.
1010 * @param supported_br pointer of \a nfc_baud_rate array.
1011 *
1012 */
1013 int
1014 nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br)
1015 {
1016 HAL (get_supported_baud_rate, pnd, nmt, supported_br);
1017 }
1018
10191019 /* Misc. functions */
10201020
10211021 /** @ingroup misc