From 9ba3112b9705d48b7a333f43a4d11a45c5ad5d8f Mon Sep 17 00:00:00 2001 From: Jose Marcial Vieira Bisneto Date: Thu, 1 Dec 2016 19:25:16 -0300 Subject: [PATCH] path/namesys: Unified resolver struct. --- include/ipfs/namesys/namesys.h | 6 ++++++ include/ipfs/path/path.h | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/ipfs/namesys/namesys.h b/include/ipfs/namesys/namesys.h index ef6fda6..b07ed57 100644 --- a/include/ipfs/namesys/namesys.h +++ b/include/ipfs/namesys/namesys.h @@ -43,7 +43,13 @@ int (*func)(char**, char*); } resolvers; + // Resolver provides path resolution to IPFS + // It has a pointer to a DAGService, which is uses to resolve nodes. + // TODO: now that this is more modular, try to unify this code with the + // the resolvers in namesys typedef struct s_resolver { + //DAGService DAG; + //NodeLink *lnk; // resolveOnce looks up a name once (without recursion). int (*resolveOnce) (char **, char *); } resolver; diff --git a/include/ipfs/path/path.h b/include/ipfs/path/path.h index 2b3fdbb..f2a97c1 100644 --- a/include/ipfs/path/path.h +++ b/include/ipfs/path/path.h @@ -35,13 +35,4 @@ int ParseCidToPath (char *dst, char *txt); int ParsePath (char *dst, char *txt); int PathIsValid (char *p); - - // Resolver provides path resolution to IPFS - // It has a pointer to a DAGService, which is uses to resolve nodes. - // TODO: now that this is more modular, try to unify this code with the - // the resolvers in namesys - typedef struct s_resolver { - DAGService DAG; - int (*ResolveOnce)(NodeLink **lnk, Context ctx, DAGService *ds, Node **nd, char *name); - } Resolver; #endif // IPFS_PATH_H