Arbiter
Dependency manager library that supports decentralization
Classes | Functions
Resolver.h File Reference

Go to the source code of this file.

Classes

struct  ArbiterResolverBehaviors
 User-provided behaviors for how dependency resolution should work. More...
 

Functions

ArbiterResolverArbiterCreateResolver (ArbiterResolverBehaviors behaviors, const struct ArbiterDependencyList *dependencyList, ArbiterUserContext context)
 Creates a dependency resolver, implemented using the given behaviors, which will attempt to pick compatible versions of all dependencies in dependencyList and transitive dependencies thereof. More...
 
const void * ArbiterResolverContext (const ArbiterResolver *resolver)
 Returns any context data which was provided to ArbiterCreateResolver(). More...
 
struct ArbiterResolvedDependencyGraphArbiterResolverCreateResolvedDependencyGraph (ArbiterResolver *resolver, char **error)
 Attempts to resolve all dependencies. More...
 

Function Documentation

§ ArbiterCreateResolver()

ArbiterResolver* ArbiterCreateResolver ( ArbiterResolverBehaviors  behaviors,
const struct ArbiterDependencyList dependencyList,
ArbiterUserContext  context 
)

Creates a dependency resolver, implemented using the given behaviors, which will attempt to pick compatible versions of all dependencies in dependencyList and transitive dependencies thereof.

The returned dependency resolver must be freed with ArbiterFree().

§ ArbiterResolverContext()

const void* ArbiterResolverContext ( const ArbiterResolver resolver)

Returns any context data which was provided to ArbiterCreateResolver().

The returned pointer is only guaranteed to remain valid for the current scope.

§ ArbiterResolverCreateResolvedDependencyGraph()

struct ArbiterResolvedDependencyGraph* ArbiterResolverCreateResolvedDependencyGraph ( ArbiterResolver resolver,
char **  error 
)

Attempts to resolve all dependencies.

Returns the graph of resolved dependencies, or NULL if an error occurred. The caller is responsible for freeing the returned graph. If NULL is returned and error is not NULL, it may be set to a string describing the error, which the caller is responsible for freeing.