2016-11-17 20:07:59 +00:00
|
|
|
/***
|
|
|
|
* a thin wrapper over a datastore for getting and putting block objects
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete a block based on its Cid
|
|
|
|
* @param cid the Cid to look for
|
|
|
|
* @param returns true(1) on success
|
|
|
|
*/
|
|
|
|
int ipfs_blockstore_delete(struct Cid* cid) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
|
|
* Determine if the Cid can be found
|
|
|
|
* @param cid the Cid to look for
|
|
|
|
* @returns true(1) if found
|
|
|
|
*/
|
|
|
|
int ipfs_blockstore_has(struct Cid* cid) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
|
|
* Find a block based on its Cid
|
|
|
|
* @param cid the Cid to look for
|
|
|
|
* @param block where to put the data to be returned
|
|
|
|
* @returns true(1) on success
|
|
|
|
*/
|
|
|
|
int ipfs_blockstore_get(struct Cid* cid, struct Block* block) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
|
|
* Put a block in the blockstore
|
|
|
|
* @param block the block to store
|
|
|
|
* @returns true(1) on success
|
|
|
|
*/
|
|
|
|
int ipfs_blockstore_put(struct Block* block) {
|
2016-11-28 21:13:46 +00:00
|
|
|
// from blockstore.go line 118
|
|
|
|
// TODO: Get Datastore key
|
|
|
|
// TODO: send to Put with key
|
2016-11-17 20:07:59 +00:00
|
|
|
return 0;
|
|
|
|
}
|