c8fdb084e4
The files are now stored in the same format. Now it is necessary to reverse engineer the directory structure
27 lines
725 B
C
27 lines
725 B
C
/***
|
|
* Merkledag methods
|
|
*/
|
|
#ifndef __IPFS_MERKLEDAG_H__
|
|
#define __IPFS_MERKLEDAG_H__
|
|
|
|
#include "ipfs/merkledag/node.h"
|
|
#include "ipfs/repo/fsrepo/fs_repo.h"
|
|
|
|
/***
|
|
* Adds a node to the dagService and blockService
|
|
* @param node the node to add
|
|
* @param cid the resultant cid that was added
|
|
* @returns true(1) on success
|
|
*/
|
|
int ipfs_merkledag_add(struct Node* node, struct FSRepo* fs_repo);
|
|
|
|
/***
|
|
* Retrieves a node from the datastore based on the cid
|
|
* @param cid the key to look for
|
|
* @param node the node to be created
|
|
* @param fs_repo the repository
|
|
* @returns true(1) on success
|
|
*/
|
|
int ipfs_merkledag_get(const unsigned char* hash, size_t hash_size, struct Node** node, const struct FSRepo* fs_repo);
|
|
|
|
#endif
|