mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LaunchServer: Discover handlers from *.af files, allow launching based on a known handler
Adds metadata about apps for what file types and protocols they can handle, then consumes that in the LaunchServer. The LaunchServer can then use that to offer multiple options for what apps can open a given URL. Callers can then pass back the handler name to the LaunchServer to use an alternate app :)
This commit is contained in:
committed by
Andreas Kling
parent
36996bd720
commit
3c5f75ed53
@@ -48,13 +48,13 @@ private:
|
||||
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")
|
||||
{
|
||||
}
|
||||
virtual void handle(const Messages::LaunchClient::Dummy&) override { }
|
||||
virtual void handle(const Messages::LaunchClient::Dummy&) override {}
|
||||
};
|
||||
|
||||
bool Launcher::open(const URL& url)
|
||||
bool Launcher::open(const URL& url, const String& handler_name)
|
||||
{
|
||||
auto connection = LaunchServerConnection::construct();
|
||||
return connection->send_sync<Messages::LaunchServer::OpenUrl>(url.to_string())->response();
|
||||
return connection->send_sync<Messages::LaunchServer::OpenUrl>(url.to_string(), handler_name)->response();
|
||||
}
|
||||
|
||||
Vector<String> Launcher::get_handlers_for_url(const URL& url)
|
||||
|
||||
Reference in New Issue
Block a user