X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fcloudlog.c;h=7730d0e3f48c28e9b0020ad0b16fa70038503113;hb=7f47ef48ce38ab71fc414bee592a9078ed1c0a7a;hp=a37776a41e6c2a55a76c0a707761dbf5a60d10cf;hpb=34a5a18782c0656f05c81c3dbcc6e65600726765;p=bluesky.git diff --git a/bluesky/cloudlog.c b/bluesky/cloudlog.c index a37776a..7730d0e 100644 --- a/bluesky/cloudlog.c +++ b/bluesky/cloudlog.c @@ -268,6 +268,16 @@ BlueSkyCloudLog *bluesky_cloudlog_get(BlueSkyFS *fs, BlueSkyCloudID id) return item; } +/* Attempt to prefetch a cloud log item. This does not guarantee that it will + * be made available, but does make it more likely that a future call to + * bluesky_cloudlog_fetch will complete quickly. */ +void bluesky_cloudlog_prefetch(BlueSkyCloudLog *log) +{ + gchar *id = bluesky_cloudlog_id_to_string(log->id); + g_print("Prefetch for %s\n", id); + g_free(id); +} + /* Ensure that a cloud log item is loaded in memory, and if not read it in. * TODO: Make asynchronous, and make this also fetch from the cloud. Right now * we only read from the log. Log item must be locked. */