mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +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:
parent
36996bd720
commit
3c5f75ed53
9 changed files with 111 additions and 17 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue