Closed catharsis closed 8 years ago
It might be worthwhile to look into adding another level of indirection on top of libspotifys opaque types (with our own ditto) and handling allocation and frees through that.
As a side gain, that would also be beneficial if libspotify is eventually replaced by some other library, since it would serve to achieve better decoupling between the spotify code and the file system code.
Nothing has happened with this, I'm closing it due to lack of activity on my part, since that probably means it doesn't hurt enough to worry about just yet.
Currently, there is just a bunch of void pointers being juggled about, which are casted appropriately depending on context. It works ok, but comes with a bunch of uncomfortable restrictions, such as not being able to update borrowed data client-side to reflect updates received from the server conveniently. Another issue is that the ownership of data is not clear. Currently this is dealt with by simply never freeing/deleting libspotify objects - an approach that is obviously flawed.