mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
protocol: make connect async
Make the protocol client connect call async with a callback when it completes. Move the connect methods into separate files, add an empty connect method that will use the screencast portal to get a pipewire fd. Use the remote intention to get the connect method. Add some better error reporting.
This commit is contained in:
parent
ad1e5fdc10
commit
d14c7abe11
7 changed files with 203 additions and 66 deletions
38
src/modules/module-protocol-native/portal-screencast.c
Normal file
38
src/modules/module-protocol-native/portal-screencast.c
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/* PipeWire
|
||||
* Copyright (C) 2018 Wim Taymans <wim.taymans@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/private.h>
|
||||
|
||||
int pw_protocol_native_connect_portal_screencast(struct pw_protocol_client *client,
|
||||
void (*done_callback) (void *data, int res),
|
||||
void *data)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue