SCTC
the soundcloud.com terminal client
Functions
cache.h File Reference
#include "track.h"
Include dependency graph for cache.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool cache_track_exists (struct track *track)
 Check weather a track is cached or not. More...
 
size_t cache_track_get (struct track *track, void *buffer)
 Load a track from the cache into buffer. More...
 
bool cache_track_save (struct track *track, void *buffer, size_t size)
 Save data for a specific track to cache. More...
 

Function Documentation

bool cache_track_exists ( struct track track)

Check weather a track is cached or not.

Parameters
trackThe track to search for
Returns
true if track is cached, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

size_t cache_track_get ( struct track track,
void *  buffer 
)

Load a track from the cache into buffer.

Parameters
trackThe track to load
bufferThe buffer receiving the data
Returns
The number of bytes written to buffer (0 if track is not within the cache)

Here is the call graph for this function:

Here is the caller graph for this function:

bool cache_track_save ( struct track track,
void *  buffer,
size_t  size 
)

Save data for a specific track to cache.

Parameters
trackThe track to save data for
bufferThe data to save
sizeThe number of Bytes to save
Returns
true if saving to cache was successfull, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function: