Ver Fonte

LibSQL: Mark SQLClient's constructor as public

Similar to WebContent, this is needed to construct the SQLClient
manually in Ladybird.
Timothy Flynn há 2 anos atrás
pai
commit
44ff3a374f
1 ficheiros alterados com 7 adições e 5 exclusões
  1. 7 5
      Userland/Libraries/LibSQL/SQLClient.h

+ 7 - 5
Userland/Libraries/LibSQL/SQLClient.h

@@ -18,6 +18,13 @@ class SQLClient
     : public IPC::ConnectionToServer<SQLClientEndpoint, SQLServerEndpoint>
     , public SQLClientEndpoint {
     IPC_CLIENT_CONNECTION(SQLClient, "/tmp/session/%sid/portal/sql"sv)
+
+public:
+    explicit SQLClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket)
+        : IPC::ConnectionToServer<SQLClientEndpoint, SQLServerEndpoint>(*this, move(socket))
+    {
+    }
+
     virtual ~SQLClient() = default;
 
     Function<void(u64, u64, SQLErrorCode, DeprecatedString const&)> on_execution_error;
@@ -26,11 +33,6 @@ class SQLClient
     Function<void(u64, u64, size_t)> on_results_exhausted;
 
 private:
-    SQLClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket)
-        : IPC::ConnectionToServer<SQLClientEndpoint, SQLServerEndpoint>(*this, move(socket))
-    {
-    }
-
     virtual void execution_success(u64 statement_id, u64 execution_id, bool has_results, size_t created, size_t updated, size_t deleted) override;
     virtual void next_result(u64 statement_id, u64 execution_id, Vector<SQL::Value> const&) override;
     virtual void results_exhausted(u64 statement_id, u64 execution_id, size_t total_rows) override;