diff options
| -rw-r--r-- | data.c | 14 | ||||
| -rw-r--r-- | snac.h | 2 |
2 files changed, 16 insertions, 0 deletions
| @@ -658,6 +658,20 @@ int object_del_if_unref(const char *id) | |||
| 658 | } | 658 | } |
| 659 | 659 | ||
| 660 | 660 | ||
| 661 | double object_ctime_by_md5(const char *md5) | ||
| 662 | { | ||
| 663 | xs *fn = _object_fn_by_md5(md5); | ||
| 664 | return f_ctime(fn); | ||
| 665 | } | ||
| 666 | |||
| 667 | |||
| 668 | double object_ctime(const char *id) | ||
| 669 | { | ||
| 670 | xs *md5 = xs_md5_hex(id, strlen(id)); | ||
| 671 | return object_ctime_by_md5(md5); | ||
| 672 | } | ||
| 673 | |||
| 674 | |||
| 661 | d_char *_object_index_fn(const char *id, const char *idxsfx) | 675 | d_char *_object_index_fn(const char *id, const char *idxsfx) |
| 662 | /* returns the filename of an object's index */ | 676 | /* returns the filename of an object's index */ |
| 663 | { | 677 | { |
| @@ -77,6 +77,8 @@ int object_get_by_md5(const char *md5, xs_dict **obj); | |||
| 77 | int object_get(const char *id, xs_dict **obj); | 77 | int object_get(const char *id, xs_dict **obj); |
| 78 | int object_del(const char *id); | 78 | int object_del(const char *id); |
| 79 | int object_del_if_unref(const char *id); | 79 | int object_del_if_unref(const char *id); |
| 80 | double object_ctime_by_md5(const char *md5); | ||
| 81 | double object_ctime(const char *id); | ||
| 80 | int object_admire(const char *id, const char *actor, int like); | 82 | int object_admire(const char *id, const char *actor, int like); |
| 81 | 83 | ||
| 82 | int object_likes_len(const char *id); | 84 | int object_likes_len(const char *id); |