diff --git a/HACKING b/HACKING index fb8a41c..bf48308 100644 --- a/HACKING +++ b/HACKING @@ -49,5 +49,17 @@ infrastructure ready for hacking the new card support: when it finds your tag; - Edit the freefare_free_tags() function so that it calls _tag_free() to free your tags; - - Create libfreefare/.c and implement all that's missing ;-) - + - Create libfreefare/.c and implement all that's missing: + - _tag_new() SHALL allocate all data-structure the tag may need to + use during it's lifetime. We do not want to have any function to fail + later because the running system is out of resources; + - _connect() SHOULD initialise data allocated by _tag_new(). + Keep in mind that a single tag may be disconnected from and connected + to again, without being freed in the meantime. Since all memory + allocations are done in _tag_new(), your code SHOULD only care + about initialising these data structures; + - _disconnect() MAY do more that just send a disconnect command to + the tag. At time of writing I have no idea what it could be but who + knows... + - _tag_free() SHALL free all resources allocated for the tag + (surprising, isn't it?)