33#include " pool.hh"
44#include " remote-store.hh"
55#include " serve-protocol.hh"
6+ #include " serve-protocol-impl.hh"
67#include " build-result.hh"
78#include " store-api.hh"
89#include " path-with-outputs.hh"
9- #include " common-protocol.hh"
10- #include " common-protocol-impl.hh"
1110#include " ssh.hh"
1211#include " derivations.hh"
1312#include " callback.hh"
@@ -50,37 +49,31 @@ struct LegacySSHStore : public virtual LegacySSHStoreConfig, public virtual Stor
5049 bool good = true ;
5150
5251 /* *
53- * Coercion to `CommonProto ::ReadConn`. This makes it easy to use the
54- * factored out common protocol serialisers with a
52+ * Coercion to `ServeProto ::ReadConn`. This makes it easy to use the
53+ * factored out serve protocol searlizers with a
5554 * `LegacySSHStore::Connection`.
5655 *
57- * The common protocol connection types are unidirectional, unlike
56+ * The serve protocol connection types are unidirectional, unlike
5857 * this type.
59- *
60- * @todo Use server protocol serializers, not common protocol
61- * serializers, once we have made that distiction.
6258 */
63- operator CommonProto ::ReadConn ()
59+ operator ServeProto ::ReadConn ()
6460 {
65- return CommonProto ::ReadConn {
61+ return ServeProto ::ReadConn {
6662 .from = from,
6763 };
6864 }
6965
7066 /*
71- * Coercion to `CommonProto ::WriteConn`. This makes it easy to use the
72- * factored out common protocol searlizers with a
67+ * Coercion to `ServeProto ::WriteConn`. This makes it easy to use the
68+ * factored out serve protocol searlizers with a
7369 * `LegacySSHStore::Connection`.
7470 *
75- * The common protocol connection types are unidirectional, unlike
71+ * The serve protocol connection types are unidirectional, unlike
7672 * this type.
77- *
78- * @todo Use server protocol serializers, not common protocol
79- * serializers, once we have made that distiction.
8073 */
81- operator CommonProto ::WriteConn ()
74+ operator ServeProto ::WriteConn ()
8275 {
83- return CommonProto ::WriteConn {
76+ return ServeProto ::WriteConn {
8477 .to = to,
8578 };
8679 }
@@ -183,7 +176,7 @@ struct LegacySSHStore : public virtual LegacySSHStoreConfig, public virtual Stor
183176 auto deriver = readString (conn->from );
184177 if (deriver != " " )
185178 info->deriver = parseStorePath (deriver);
186- info->references = CommonProto ::Serialise<StorePathSet>::read (*this , *conn);
179+ info->references = ServeProto ::Serialise<StorePathSet>::read (*this , *conn);
187180 readLongLong (conn->from ); // download size
188181 info->narSize = readLongLong (conn->from );
189182
@@ -217,7 +210,7 @@ struct LegacySSHStore : public virtual LegacySSHStoreConfig, public virtual Stor
217210 << printStorePath (info.path )
218211 << (info.deriver ? printStorePath (*info.deriver ) : " " )
219212 << info.narHash .to_string (Base16, false );
220- CommonProto ::write (*this , *conn, info.references );
213+ ServeProto ::write (*this , *conn, info.references );
221214 conn->to
222215 << info.registrationTime
223216 << info.narSize
@@ -246,7 +239,7 @@ struct LegacySSHStore : public virtual LegacySSHStoreConfig, public virtual Stor
246239 conn->to
247240 << exportMagic
248241 << printStorePath (info.path );
249- CommonProto ::write (*this , *conn, info.references );
242+ ServeProto ::write (*this , *conn, info.references );
250243 conn->to
251244 << (info.deriver ? printStorePath (*info.deriver ) : " " )
252245 << 0
@@ -331,7 +324,7 @@ struct LegacySSHStore : public virtual LegacySSHStoreConfig, public virtual Stor
331324 if (GET_PROTOCOL_MINOR (conn->remoteVersion ) >= 3 )
332325 conn->from >> status.timesBuilt >> status.isNonDeterministic >> status.startTime >> status.stopTime ;
333326 if (GET_PROTOCOL_MINOR (conn->remoteVersion ) >= 6 ) {
334- auto builtOutputs = CommonProto ::Serialise<DrvOutputs>::read (*this , *conn);
327+ auto builtOutputs = ServeProto ::Serialise<DrvOutputs>::read (*this , *conn);
335328 for (auto && [output, realisation] : builtOutputs)
336329 status.builtOutputs .insert_or_assign (
337330 std::move (output.outputName ),
@@ -409,10 +402,10 @@ struct LegacySSHStore : public virtual LegacySSHStoreConfig, public virtual Stor
409402 conn->to
410403 << ServeProto::Command::QueryClosure
411404 << includeOutputs;
412- CommonProto ::write (*this , *conn, paths);
405+ ServeProto ::write (*this , *conn, paths);
413406 conn->to .flush ();
414407
415- for (auto & i : CommonProto ::Serialise<StorePathSet>::read (*this , *conn))
408+ for (auto & i : ServeProto ::Serialise<StorePathSet>::read (*this , *conn))
416409 out.insert (i);
417410 }
418411
@@ -425,10 +418,10 @@ struct LegacySSHStore : public virtual LegacySSHStoreConfig, public virtual Stor
425418 << ServeProto::Command::QueryValidPaths
426419 << false // lock
427420 << maybeSubstitute;
428- CommonProto ::write (*this , *conn, paths);
421+ ServeProto ::write (*this , *conn, paths);
429422 conn->to .flush ();
430423
431- return CommonProto ::Serialise<StorePathSet>::read (*this , *conn);
424+ return ServeProto ::Serialise<StorePathSet>::read (*this , *conn);
432425 }
433426
434427 void connect () override
0 commit comments