diff options
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 18 |
1 files changed, 9 insertions, 9 deletions
| @@ -411,6 +411,15 @@ d_char *_object_fn(const char *id) | |||
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | 413 | ||
| 414 | int object_here(char *id) | ||
| 415 | /* checks if an object is already downloaded */ | ||
| 416 | { | ||
| 417 | xs *fn = _object_fn(id); | ||
| 418 | |||
| 419 | return mtime(fn) > 0.0; | ||
| 420 | } | ||
| 421 | |||
| 422 | |||
| 414 | int object_get_by_md5(const char *md5, d_char **obj, const char *type) | 423 | int object_get_by_md5(const char *md5, d_char **obj, const char *type) |
| 415 | /* returns a stored object, optionally of the requested type */ | 424 | /* returns a stored object, optionally of the requested type */ |
| 416 | { | 425 | { |
| @@ -758,15 +767,6 @@ d_char *_timeline_find_fn(snac *snac, char *id) | |||
| 758 | } | 767 | } |
| 759 | 768 | ||
| 760 | 769 | ||
| 761 | int timeline_here(snac *snac, char *id) | ||
| 762 | /* checks if an object is already downloaded */ | ||
| 763 | { | ||
| 764 | xs *fn = _timeline_find_fn(snac, id); | ||
| 765 | |||
| 766 | return fn != NULL; | ||
| 767 | } | ||
| 768 | |||
| 769 | |||
| 770 | d_char *timeline_find(snac *snac, char *id) | 770 | d_char *timeline_find(snac *snac, char *id) |
| 771 | /* gets a message from the timeline by id */ | 771 | /* gets a message from the timeline by id */ |
| 772 | { | 772 | { |