c-ipfs/include/ipfs/repo/config/swarm.h
John Jones 50ffade515 More work on storage and cleanup
Added flatfs, as well as fixed some memory leaks. Valgrind across tests
now reports 0 memory leaks.
2016-11-28 08:09:00 -05:00

34 lines
877 B
C

//
// swarm.h
// c-ipfs
//
// Created by John Jones on 11/2/16.
// Copyright © 2016 JMJAtlanta. All rights reserved.
//
#ifndef swarm_h
#define swarm_h
struct SwarmAddresses {
int num_addresses;
char** addresses;
};
/**
* add addresses to the SwarmAddresses struct
* @param swarm_addresses the structure
* @param addresses the array of addresses to store
* @param array_length the number of elements in addresses array
* @returns true(1) on success
*/
int repo_config_swarm_address_init(struct SwarmAddresses* swarm_addresses, char** addresses, int array_length);
int repo_config_swarm_address_new(struct SwarmAddresses** swarm_addresses);
/***
* free up memory from repo_config_swarm_address_new
* @param swarm_addresses the structure
* @returns true(1)
*/
int repo_config_swarm_address_free(struct SwarmAddresses* swarm_addresses);
#endif /* swarm_h */