diff --git a/docker/linux b/docker/linux index ceb7302a4..d4a32d325 160000 --- a/docker/linux +++ b/docker/linux @@ -1 +1 @@ -Subproject commit ceb7302a48092ccbffc1d242c0d5cc67bf1db231 +Subproject commit d4a32d32592c688c3a1f042750fd3323bcdfd38a diff --git a/src/server/sparkd/orderman/spreader_orders/ISpreaderStateWorker.h b/src/server/sparkd/orderman/spreader_orders/ISpreaderStateWorker.h index 8b9a21b19..ca4fc6f23 100644 --- a/src/server/sparkd/orderman/spreader_orders/ISpreaderStateWorker.h +++ b/src/server/sparkd/orderman/spreader_orders/ISpreaderStateWorker.h @@ -4,10 +4,12 @@ #include "lib/api/services/OrderService.pb.h" #include "lib/sparkproto/SparkProtos.pb.h" #include "server/sparkd/orderman/utils/orderman_utils.h" -#include "server/sparkd/spreader/SpreaderLegData.h" // fix this (not needed) +#include "server/sparkd/spreader/SpreaderLegData.h" // fix this (not needed, all the headers can be fwd ref's) #include "server/sparkd/orderman/spreader_orders/spreader_states/SpreaderState.h" namespace bts { +namespace api {namespace orderman2 {class OrderDefinition;}} +namespace orderman2 {class PreActivationOrderServices; class OrderServices;} namespace orderman { class SpreaderOrder; class Book; @@ -20,17 +22,29 @@ public: // 1. called once and only once, before any other calls. // makes the spreader go from start to waiting_for_first_conn virtual void init () = 0; + // 1. this is the new init from Order + virtual void on_init_new(api::orderman2::OrderDefinition const&, const orderman2::PreActivationOrderServices&) + { + } // 2. called if the execution venue is working, even if the // connection event happened before the spreader was created. in // other words, on_connect() is always called. spreader should // start by assuming the venue is disconnected and wait until they - // receive on_connect(). + // receive on_connect(). virtual void on_connect() = 0; + // 2. this is the new on_connect + void on_activate(Price, Quantity, orderman2::OrderServices &) + { + } // 3. called if the venue disconnects. will only be called if there // was previous on_connect() virtual void on_disconnect() = 0; // 4. called when the user updates the order virtual void on_update(const api::orderman::UpdateSpreaderOrder&) = 0; + // 4. new on_update + void on_update(Price , Quantity ) + { + } // 5. called when the user cancels an order virtual void on_cancel(const api::orderman::CancelSpreaderOrder&) = 0; // 6. on market data update (support late joiners)