Debian Codegraph @

data/org.freedesktop.portal.Camera.xml

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2018 Red Hat, Inc.
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 -->
20
21 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
22 <!--
23 org.freedesktop.portal.Camera:
24 @short_description: Camera portal
25
26 The camera portal enables applications to access camera devices, such as
27 web cams.
28 -->
29 <interface name="org.freedesktop.portal.Camera">
30 <!--
31 AccessCamera:
32 @options: Vardict with optional further information
33 @handle: Object path for the :ref:`org.freedesktop.portal.Request` object representing this call
34
35 Request to gain access to the camera.
36
37 Supported keys in the @options vardict include:
38
39 * ``handle_token`` (``s``)
40 A string that will be used as the last element of the @handle. Must be a valid
41 object path element. See the :ref:`org.freedesktop.portal.Request` documentation for
42 more information about the @handle.
43
44 Following the :ref:`org.freedesktop.portal.Request::Response` signal, if
45 granted, org.freedesktop.portal.Camera.OpenPipeWireRemote() can be used to
46 open a PipeWire remote.
47 -->
48 <method name="AccessCamera">
49 <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
50 <arg type="a{sv}" name="options" direction="in"/>
51 <arg type="o" name="handle" direction="out"/>
52 </method>
53 <!--
54 OpenPipeWireRemote:
55 @options: Vardict with optional further information
56 @fd: File descriptor of an open PipeWire remote.
57
58 Open a file descriptor to the PipeWire remote where the camera nodes
59 are available. The file descriptor should be used to create a
60 ``pw_core`` object, by using ``pw_context_connect_fd()``.
61
62 This method will only succeed if the application already has permission
63 to access camera devices.
64
65 There are currently no supported keys in the @options vardict.
66 -->
67 <method name="OpenPipeWireRemote">
68 <annotation name="org.gtk.GDBus.C.Name" value="open_pipewire_remote"/>
69 <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
70 <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
71 <arg type="a{sv}" name="options" direction="in"/>
72 <arg type="h" name="fd" direction="out"/>
73 </method>
74 <!--
75 IsCameraPresent:
76
77 A boolean stating whether there is any cameras available.
78 -->
79 <property name="IsCameraPresent" type="b" access="read"/>
80 <property name="version" type="u" access="read"/>
81 </interface>
82 </node>