c-ipfs/include/ipfs/thirdparty/ipfsaddr/ipfs_addr.h
2016-12-05 07:12:23 -05:00

23 lines
582 B
C

#ifndef ipfs_addr_h
#define ipfs_addr_h
struct IPFSAddr {
char* entire_string;
};
/**
* initialize a new IPFSAddr struct. NOTE: be sure to use ipfsaddr_free()
* @param addr the struct to initialize
* @param string the string that contains the address
* @returns true(1) on success, false(0) otherwise
*/
int ipfsaddr_new(struct IPFSAddr** addr, char* string);
/***
* frees allocated memory in the struct
* @param addr the struct that is going away
* @returns true(1) on success, false(0) otherwise
*/
int ipfsaddr_free(struct IPFSAddr* addr);
#endif /* ipfs_addr_h */