about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-09-02T10·39-0400
committerShea Levy <shea@shealevy.com>2016-09-02T10·39-0400
commit53b27ddce22869430e2ab0932c32d8e3c3844564 (patch)
tree35dc94e0137edd8cd73a31ae7a387d3d7df08b3e /src/libstore/store-api.hh
parenta91954f0c658e90b08f7f6e371305281e4d7d329 (diff)
Factor a function to get the store type from a URI out of the main RegisterStoreImplementation
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 76a2f5e9c7..3d8b4fbbb0 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -5,6 +5,7 @@
 #include "crypto.hh"
 #include "lru-cache.hh"
 #include "sync.hh"
+#include "globals.hh"
 
 #include <atomic>
 #include <limits>
@@ -590,6 +591,15 @@ void removeTempRoots();
 ref<Store> openStore(const std::string & uri = getEnv("NIX_REMOTE"));
 
 
+enum StoreType {
+    tDaemon,
+    tLocal,
+    tOther
+};
+
+
+StoreType getStoreType(const std::string & uri = getEnv("NIX_REMOTE"), const std::string & stateDir = settings.nixStateDir);
+
 /* Return the default substituter stores, defined by the
    ‘substituters’ option and various legacy options like
    ‘binary-caches’. */