More buildout of necessary structs

This commit is contained in:
jmjatlanta 2016-10-27 13:11:34 -05:00
parent bc9bfff86e
commit 9c309ebbc6
37 changed files with 785 additions and 55 deletions

13
core/Makefile Normal file
View file

@ -0,0 +1,13 @@
CC = gcc
CFLAGS = -O0
LFLAGS =
DEPS = builder.h ipfs_node.h
OBJS = builder.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: $(OBJS)
clean:
rm -f *.o

14
core/builder.c Normal file
View file

@ -0,0 +1,14 @@
//
// builder.c
// c-ipfs
//
// Created by John Jones on 10/27/16.
// Copyright © 2016 JMJAtlanta. All rights reserved.
//
#include "builder.h"
int core_builder_new_node(struct Context* context, struct BuildCfg* build_cfg, struct IpfsNode* buildConfig) {
// TODO: Implement this methods
return 0;
}

29
core/builder.h Normal file
View file

@ -0,0 +1,29 @@
//
// builder.h
// c-ipfs
//
// Created by John Jones on 10/27/16.
// Copyright © 2016 JMJAtlanta. All rights reserved.
//
#ifndef __CORE_BUILDER_H__
#define __CORE_BUILDER_H__
#include <stdio.h>
#include "../commands/context.h"
#include "../repo/config/config.h"
struct BuildCfg {
int online;
// ExtraOpts map[string]bool
int permanent;
int nil_repo;
//struct RoutingOption routing;
//struct HostOption host;
//struct Repo repo;
};
int core_builder_new_node(struct Context* context, struct BuildCfg* build_cfg, struct IpfsNode* buildConfig);
#endif /* builder_h */

21
core/ipfs_node.h Normal file
View file

@ -0,0 +1,21 @@
//
// ipfs_node.h
// c-ipfs
//
// Created by John Jones on 10/27/16.
// Copyright © 2016 JMJAtlanta. All rights reserved.
//
#ifndef __CORE_IPFS_NODE_H__
#define __CORE_IPFS_NODE_H__
struct IpfsNode {
//struct PeerId identity;
//struct Repo repo;
//struct Pinner pinning; // an interface
//struct Mount** mounts;
//struct PrivKey* private_key;
// TODO: Add more here
};
#endif /* ipfs_node_h */