about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-08-30T21·28+0200
committerDaiderd Jordan <daiderd@gmail.com>2018-09-02T10·54+0200
commit070823baa4c3c397c8a5eb0378944187e7f4903c (patch)
tree5c0260ee081c74d4fb1965063e8445f6a9156640 /src/libstore/store-api.hh
parentc9a08540c3d64d1285928d1ce3d3d416a2547dd9 (diff)
Store: expose the protocol version used by a store
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 7c5b495a4482..c2f964e11f76 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -598,6 +598,12 @@ public:
        a notion of connection. Otherwise this is a no-op. */
     virtual void connect() { };
 
+    /* Get the protocol version of this store or it's connection. */
+    virtual unsigned int getProtocol()
+    {
+        return 0;
+    };
+
     /* Get the priority of the store, used to order substituters. In
        particular, binary caches can specify a priority field in their
        "nix-cache-info" file. Lower value means higher priority. */