Enable flatbuffer encoding for foxglove websocket server

Change-Id: I7ab44a5c6e978f517008fb7dcc40893688e95e28
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/aos/util/foxglove_websocket_lib.h b/aos/util/foxglove_websocket_lib.h
index 8160653..9be2f61 100644
--- a/aos/util/foxglove_websocket_lib.h
+++ b/aos/util/foxglove_websocket_lib.h
@@ -14,7 +14,19 @@
 // See foxglove_websocket.cc for some usage notes.
 class FoxgloveWebsocketServer {
  public:
-  FoxgloveWebsocketServer(aos::EventLoop *event_loop, uint32_t port);
+  // Whether to serialize the messages into the MCAP file as JSON or
+  // flatbuffers.
+  enum class Serialization {
+    kJson,
+    kFlatbuffer,
+  };
+  enum class FetchPinnedChannels {
+    kYes,
+    kNo,
+  };
+  FoxgloveWebsocketServer(aos::EventLoop *event_loop, uint32_t port,
+                          Serialization serialization,
+                          FetchPinnedChannels fetch_pinned_channels);
   ~FoxgloveWebsocketServer();
 
  private:
@@ -33,6 +45,8 @@
   };
 
   aos::EventLoop *event_loop_;
+  const Serialization serialization_;
+  const FetchPinnedChannels fetch_pinned_channels_;
   foxglove::websocket::Server server_;
   // A map of fetchers for every single channel that could be subscribed to.
   std::map<ChannelId, FetcherState> fetchers_;