| 1 | /* |
| 2 | * Copyright © 2017-2018 Red Hat, Inc |
| 3 | * |
| 4 | * SPDX-License-Identifier: LGPL-2.1-or-later |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2.1 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 22 | |
| 23 | #include <stdint.h> |
| 24 | #include <pipewire/pipewire.h> |
| 25 | #include <gio/gunixfdlist.h> |
| 26 | |
| 27 | #include "xdp-session.h"cxx . . $ `<file>/src/xdp-session.h`/ |
| 28 | #include "screen-cast.h"cxx . . $ `<file>/src/screen-cast.h`/ |
| 29 | #include "remote-desktop.h"cxx . . $ `<file>/src/remote-desktop.h`/ |
| 30 | #include "xdp-request.h"cxx . . $ `<file>/src/xdp-request.h`/ |
| 31 | #include "xdp-permissions.h"cxx . . $ `<file>/src/xdp-permissions.h`/ |
| 32 | #include "pipewire.h"cxx . . $ `<file>/src/pipewire.h`/ |
| 33 | #include "xdp-dbus.h"cxx . . $ `<file>/build/src/xdp-dbus.h`/ |
| 34 | #include "xdp-impl-dbus.h"cxx . . $ `<file>/build/src/xdp-impl-dbus.h`/ |
| 35 | #include "xdp-session-persistence.h"cxx . . $ `<file>/src/xdp-session-persistence.h`/ |
| 36 | #include "xdp-utils.h"cxx . . $ `<file>/src/xdp-utils.h`/ |
| 37 | |
| 38 | #define PERMISSION_ITEMcxx . . $ `src/screen-cast.c:38:9`!(item_id, item_permissions) \ |
| 39 | ((struct pw_permission) { \ |
| 40 | .id = item_id, \ |
| 41 | .permissions = item_permissions \ |
| 42 | }) |
| 43 | #define SCREEN_CAST_TABLEcxx . . $ `src/screen-cast.c:43:9`! "screencast" |
| 44 | |
| 45 | typedef struct _ScreenCastcxx . . $ _ScreenCast# ScreenCastcxx . . $ ScreenCast#; |
| 46 | typedef struct _ScreenCastClasscxx . . $ _ScreenCastClass# ScreenCastClasscxx . . $ ScreenCastClass#; |
| 47 | |
| 48 | struct _ScreenCastcxx . . $ _ScreenCast# |
| 49 | { |
| 50 | XdpDbusScreenCastSkeletoncxx . . $ XdpDbusScreenCastSkeleton# parent_instancecxx . . $ _ScreenCast#parent_instance.; |
| 51 | }; |
| 52 | |
| 53 | struct _ScreenCastClasscxx . . $ _ScreenCastClass# |
| 54 | { |
| 55 | XdpDbusScreenCastSkeletonClasscxx . . $ XdpDbusScreenCastSkeletonClass# parent_classcxx . . $ _ScreenCastClass#parent_class.; |
| 56 | }; |
| 57 | |
| 58 | static XdpDbusImplScreenCastcxx . . $ XdpDbusImplScreenCast# *implcxx . . $ impl.; |
| 59 | static int impl_versioncxx . . $ impl_version.; |
| 60 | static ScreenCastcxx . . $ ScreenCast# *screen_castcxx . . $ screen_cast.; |
| 61 | |
| 62 | static unsigned int available_cursor_modescxx . . $ available_cursor_modes. = 0; |
| 63 | |
| 64 | GTypecxx . . $ GType# screen_cast_get_typecxx . . $ screen_cast_get_type(f708dce9a8856c70). (void); |
| 65 | static void screen_cast_iface_initcxx . . $ screen_cast_iface_init(b05585cbe7d1f075). (XdpDbusScreenCastIfacecxx . . $ XdpDbusScreenCastIface# *iface); |
| 66 | |
| 67 | static GQuarkcxx . . $ GQuark# quark_request_sessioncxx . . $ quark_request_session.; |
| 68 | |
| 69 | struct _ScreenCastStreamcxx . . $ _ScreenCastStream# |
| 70 | { |
| 71 | uint32_tcxx . . $ uint32_t# idcxx . . $ _ScreenCastStream#id.; |
| 72 | int32_tcxx . . $ int32_t# widthcxx . . $ _ScreenCastStream#width.; |
| 73 | int32_tcxx . . $ int32_t# heightcxx . . $ _ScreenCastStream#height.; |
| 74 | }; |
| 75 | |
| 76 | G_DEFINE_TYPE_WITH_CODEcxx . . $ `<external>/9567554376676449156/gtype.h:1850:9`! (ScreenCast, screen_cast, |
| 77 | XDP_DBUS_TYPE_SCREEN_CAST_SKELETONcxx . . $ `build/src/xdp-dbus.h:7166:9`!, |
| 78 | G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (XDP_DBUS_TYPE_SCREEN_CASTcxx . . $ `build/src/xdp-dbus.h:6907:9`!, |
| 79 | screen_cast_iface_init)) |
| 80 | |
| 81 | typedef enum _ScreenCastSessionStatecxx . . $ _ScreenCastSessionState# |
| 82 | { |
| 83 | SCREEN_CAST_SESSION_STATE_INITcxx . . $ SCREEN_CAST_SESSION_STATE_INIT., |
| 84 | SCREEN_CAST_SESSION_STATE_SELECTING_SOURCEScxx . . $ SCREEN_CAST_SESSION_STATE_SELECTING_SOURCES., |
| 85 | SCREEN_CAST_SESSION_STATE_SOURCES_SELECTEDcxx . . $ SCREEN_CAST_SESSION_STATE_SOURCES_SELECTED., |
| 86 | SCREEN_CAST_SESSION_STATE_STARTINGcxx . . $ SCREEN_CAST_SESSION_STATE_STARTING., |
| 87 | SCREEN_CAST_SESSION_STATE_STARTEDcxx . . $ SCREEN_CAST_SESSION_STATE_STARTED., |
| 88 | SCREEN_CAST_SESSION_STATE_CLOSEDcxx . . $ SCREEN_CAST_SESSION_STATE_CLOSED. |
| 89 | } ScreenCastSessionStatecxx . . $ ScreenCastSessionState#; |
| 90 | |
| 91 | typedef struct _ScreenCastSessioncxx . . $ _ScreenCastSession# |
| 92 | { |
| 93 | XdpSessioncxx . . $ XdpSession# parentcxx . . $ _ScreenCastSession#parent.; |
| 94 | |
| 95 | ScreenCastSessionStatecxx . . $ ScreenCastSessionState# statecxx . . $ _ScreenCastSession#state.; |
| 96 | |
| 97 | GListcxx . . $ GList# *streamscxx . . $ _ScreenCastSession#streams.; |
| 98 | char *restore_tokencxx . . $ _ScreenCastSession#restore_token.; |
| 99 | XdpSessionPersistenceModecxx . . $ XdpSessionPersistenceMode# persist_modecxx . . $ _ScreenCastSession#persist_mode.; |
| 100 | GVariantcxx . . $ GVariant# *restore_datacxx . . $ _ScreenCastSession#restore_data.; |
| 101 | } ScreenCastSessioncxx . . $ ScreenCastSession#; |
| 102 | |
| 103 | typedef struct _ScreenCastSessionClasscxx . . $ _ScreenCastSessionClass# |
| 104 | { |
| 105 | XdpSessionClasscxx . . $ XdpSessionClass# parent_classcxx . . $ _ScreenCastSessionClass#parent_class.; |
| 106 | } ScreenCastSessionClasscxx . . $ ScreenCastSessionClass#; |
| 107 | |
| 108 | GTypecxx . . $ GType# screen_cast_session_get_typecxx . . $ screen_cast_session_get_type(f708dce9a8856c70). (void); |
| 109 | |
| 110 | G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (ScreenCastSession, screen_cast_session, xdp_session_get_type ()) |
| 111 | |
| 112 | G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`! static inline ScreenCastSessioncxx . . $ ScreenCastSession# * |
| 113 | SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (gpointercxx . . $ gpointer# ptr) |
| 114 | { |
| 115 | return G_TYPE_CHECK_INSTANCE_CASTcxx . . $ `<external>/9567554376676449156/gtype.h:528:9`! (ptr, screen_cast_session_get_type (), ScreenCastSession); |
| 116 | } |
| 117 | |
| 118 | G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`! static inline gbooleancxx . . $ gboolean# |
| 119 | IS_SCREEN_CAST_SESSIONcxx . . $ IS_SCREEN_CAST_SESSION(dedf1e9b1c614a07). (gpointercxx . . $ gpointer# ptr) |
| 120 | { |
| 121 | return G_TYPE_CHECK_INSTANCE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:541:9`! (ptr, screen_cast_session_get_type ()); |
| 122 | } |
| 123 | |
| 124 | static ScreenCastSessioncxx . . $ ScreenCastSession# * |
| 125 | screen_cast_session_newcxx . . $ screen_cast_session_new(960783193fa3ddf9). (GVariantcxx . . $ GVariant# *options, |
| 126 | XdpRequestcxx . . $ XdpRequest# *request, |
| 127 | GErrorcxx . . $ GError# **error) |
| 128 | { |
| 129 | XdpSessioncxx . . $ XdpSession# *session; |
| 130 | GDBusInterfaceSkeletoncxx . . $ GDBusInterfaceSkeleton# *interface_skeleton = |
| 131 | G_DBUS_INTERFACE_SKELETONcxx . . $ `<external>/1991948168568871819/gdbusinterfaceskeleton.h:32:9`! (request); |
| 132 | const char *session_token; |
| 133 | GDBusConnectioncxx . . $ GDBusConnection# *connection = |
| 134 | g_dbus_interface_skeleton_get_connectioncxx . . $ g_dbus_interface_skeleton_get_connection(b3e1a9aea5de7a42). (interface_skeleton); |
| 135 | GDBusConnectioncxx . . $ GDBusConnection# *impl_connection = |
| 136 | g_dbus_proxy_get_connectioncxx . . $ g_dbus_proxy_get_connection(fd0690ce15ac5ecf). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)); |
| 137 | const char *impl_dbus_name = g_dbus_proxy_get_namecxx . . $ g_dbus_proxy_get_name(c2c3b8a4da378b0d). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)); |
| 138 | |
| 139 | session_token = lookup_session_tokencxx . . $ lookup_session_token(d2704f6d4d26effc). (options); |
| 140 | session = g_initable_newcxx . . $ g_initable_new(a8cb3f520296c554). (screen_cast_session_get_typecxx . . $ screen_cast_session_get_type(f708dce9a8856c70). (), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, error, |
| 141 | "sender", request->sendercxx . . $ _XdpRequest#sender., |
| 142 | "app-id", xdp_app_info_get_idcxx . . $ xdp_app_info_get_id(b9a768ac644c9329). (request->app_infocxx . . $ _XdpRequest#app_info.), |
| 143 | "token", session_token, |
| 144 | "connection", connection, |
| 145 | "impl-connection", impl_connection, |
| 146 | "impl-dbus-name", impl_dbus_name, |
| 147 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 148 | |
| 149 | if (session) |
| 150 | g_debugcxx . . $ `<external>/5169755362661750954/gmessages.h:371:9`! ("screen cast session owned by '%s' created", session->sender); |
| 151 | |
| 152 | return (ScreenCastSessioncxx . . $ ScreenCastSession#*)session; |
| 153 | } |
| 154 | |
| 155 | static void |
| 156 | create_session_donecxx . . $ create_session_done(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source_object, |
| 157 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 158 | gpointercxx . . $ gpointer# data) |
| 159 | { |
| 160 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(XdpRequest) request = data; |
| 161 | XdpSessioncxx . . $ XdpSession# *session; |
| 162 | guintcxx . . $ guint# response = 2; |
| 163 | gbooleancxx . . $ gboolean# should_close_session; |
| 164 | g_autocxx . . $ `<external>/12741050725406041920/gmacros.h:1428:9`!(GVariantBuilder) results_builder = |
| 165 | G_VARIANT_BUILDER_INITcxx . . $ `<external>/10279604295420929244/gvariant.h:369:9`! (G_VARIANT_TYPE_VARDICTcxx . . $ `<external>/14064154155447831270/gvarianttype.h:279:9`!); |
| 166 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 167 | |
| 168 | REQUEST_AUTOLOCKcxx . . $ `src/xdp-request.h:103:9`! (request); |
| 169 | |
| 170 | session = g_object_get_qdatacxx . . $ g_object_get_qdata(b02fb2b4fc775a4). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), quark_request_sessioncxx . . $ quark_request_session.); |
| 171 | SESSION_AUTOLOCK_UNREFcxx . . $ `src/xdp-session.h:115:9`! (g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (session)); |
| 172 | g_object_set_qdatacxx . . $ g_object_set_qdata(d7e2e719dfad0cc9). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), quark_request_sessioncxx . . $ quark_request_session., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 173 | |
| 174 | if (!xdp_dbus_impl_screen_cast_call_create_session_finishcxx . . $ xdp_dbus_impl_screen_cast_call_create_session_finish(5828a69a9383c9eb). (implcxx . . $ impl., |
| 175 | &response, |
| 176 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 177 | res, |
| 178 | &error)) |
| 179 | { |
| 180 | g_dbus_error_strip_remote_errorcxx . . $ g_dbus_error_strip_remote_error(425e103a815b829). (error); |
| 181 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:365:9`! ("A backend call failed: %s", error->message); |
| 182 | should_close_session = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 183 | goto out; |
| 184 | } |
| 185 | |
| 186 | if (request->exportedcxx . . $ _XdpRequest#exported. && response == 0) |
| 187 | { |
| 188 | if (!xdp_session_exportcxx . . $ xdp_session_export(3c2cf3f1073dc4c7). (session, &error)) |
| 189 | { |
| 190 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:365:9`! ("Failed to export session: %s", error->message); |
| 191 | response = 2; |
| 192 | should_close_session = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 193 | goto out; |
| 194 | } |
| 195 | |
| 196 | should_close_session = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 197 | xdp_session_registercxx . . $ xdp_session_register(ac695378ab375fe8). (session); |
| 198 | } |
| 199 | else |
| 200 | { |
| 201 | should_close_session = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 202 | } |
| 203 | |
| 204 | g_variant_builder_addcxx . . $ g_variant_builder_add(a422658e2ec2035a). (&results_builder, "{sv}", |
| 205 | "session_handle", g_variant_newcxx . . $ g_variant_new(59b7d1999758b6d9). ("s", session->idcxx . . $ _XdpSession#id.)); |
| 206 | |
| 207 | out: |
| 208 | if (request->exportedcxx . . $ _XdpRequest#exported.) |
| 209 | { |
| 210 | xdp_dbus_request_emit_responsecxx . . $ xdp_dbus_request_emit_response(6deab25eec490adc). (XDP_DBUS_REQUESTcxx . . $ `build/src/xdp-dbus.h:6732:9`! (request), |
| 211 | response, |
| 212 | g_variant_builder_endcxx . . $ g_variant_builder_end(6d60952e65fc2b86). (&results_builder)); |
| 213 | xdp_request_unexportcxx . . $ xdp_request_unexport(8bf1d2bcdc4be36d). (request); |
| 214 | } |
| 215 | |
| 216 | if (should_close_session) |
| 217 | xdp_session_closecxx . . $ xdp_session_close(e4dd02f38fc14a2). (session, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 218 | } |
| 219 | |
| 220 | static gbooleancxx . . $ gboolean# |
| 221 | handle_create_sessioncxx . . $ handle_create_session(a765910a66dfd28d). (XdpDbusScreenCastcxx . . $ XdpDbusScreenCast# *object, |
| 222 | GDBusMethodInvocationcxx . . $ GDBusMethodInvocation# *invocation, |
| 223 | GVariantcxx . . $ GVariant# *arg_options) |
| 224 | { |
| 225 | XdpRequestcxx . . $ XdpRequest# *request = xdp_request_from_invocationcxx . . $ xdp_request_from_invocation(9583a51810815010). (invocation); |
| 226 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 227 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(XdpDbusImplRequest) impl_request = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 228 | XdpSessioncxx . . $ XdpSession# *session; |
| 229 | g_autocxx . . $ `<external>/12741050725406041920/gmacros.h:1428:9`!(GVariantBuilder) options_builder = |
| 230 | G_VARIANT_BUILDER_INITcxx . . $ `<external>/10279604295420929244/gvariant.h:369:9`! (G_VARIANT_TYPE_VARDICTcxx . . $ `<external>/14064154155447831270/gvarianttype.h:279:9`!); |
| 231 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariant) options = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 232 | |
| 233 | REQUEST_AUTOLOCKcxx . . $ `src/xdp-request.h:103:9`! (request); |
| 234 | |
| 235 | impl_request = |
| 236 | xdp_dbus_impl_request_proxy_new_synccxx . . $ xdp_dbus_impl_request_proxy_new_sync(b36c38a372f8f089). (g_dbus_proxy_get_connectioncxx . . $ g_dbus_proxy_get_connection(fd0690ce15ac5ecf). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)), |
| 237 | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIEScxx . . $ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES., |
| 238 | g_dbus_proxy_get_namecxx . . $ g_dbus_proxy_get_name(c2c3b8a4da378b0d). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)), |
| 239 | request->idcxx . . $ _XdpRequest#id., |
| 240 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &error); |
| 241 | if (!impl_request) |
| 242 | { |
| 243 | g_dbus_method_invocation_return_gerrorcxx . . $ g_dbus_method_invocation_return_gerror(f84b6a1e02aa551). (invocation, error); |
| 244 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 245 | } |
| 246 | |
| 247 | xdp_request_set_impl_requestcxx . . $ xdp_request_set_impl_request(18bd0ab3b325ada4). (request, impl_request); |
| 248 | xdp_request_exportcxx . . $ xdp_request_export(49d11f351a243e17). (request, g_dbus_method_invocation_get_connectioncxx . . $ g_dbus_method_invocation_get_connection(8c6afd006dd99032). (invocation)); |
| 249 | |
| 250 | session = XDP_SESSIONcxx . . $ XDP_SESSION(a424cc90118498e6). (screen_cast_session_newcxx . . $ screen_cast_session_new(960783193fa3ddf9). (arg_options, request, &error)); |
| 251 | if (!session) |
| 252 | { |
| 253 | g_dbus_method_invocation_return_gerrorcxx . . $ g_dbus_method_invocation_return_gerror(f84b6a1e02aa551). (invocation, error); |
| 254 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 255 | } |
| 256 | |
| 257 | options = g_variant_ref_sinkcxx . . $ g_variant_ref_sink(3606eab35379b54a). (g_variant_builder_endcxx . . $ g_variant_builder_end(6d60952e65fc2b86). (&options_builder)); |
| 258 | |
| 259 | g_object_set_qdata_fullcxx . . $ g_object_set_qdata_full(65a765778c030710). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), |
| 260 | quark_request_sessioncxx . . $ quark_request_session., |
| 261 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (session), |
| 262 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).); |
| 263 | |
| 264 | xdp_dbus_impl_screen_cast_call_create_sessioncxx . . $ xdp_dbus_impl_screen_cast_call_create_session(b0149c26f3691655). (implcxx . . $ impl., |
| 265 | request->idcxx . . $ _XdpRequest#id., |
| 266 | session->idcxx . . $ _XdpSession#id., |
| 267 | xdp_app_info_get_idcxx . . $ xdp_app_info_get_id(b9a768ac644c9329). (request->app_infocxx . . $ _XdpRequest#app_info.), |
| 268 | options, |
| 269 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 270 | create_session_donecxx . . $ create_session_done(aa1d200d824d915d)., |
| 271 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (request)); |
| 272 | |
| 273 | xdp_dbus_screen_cast_complete_create_sessioncxx . . $ xdp_dbus_screen_cast_complete_create_session(861177f24bec6f0a). (object, invocation, request->idcxx . . $ _XdpRequest#id.); |
| 274 | |
| 275 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 276 | } |
| 277 | |
| 278 | static void |
| 279 | select_sources_donecxx . . $ select_sources_done(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source_object, |
| 280 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 281 | gpointercxx . . $ gpointer# data) |
| 282 | { |
| 283 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(XdpRequest) request = data; |
| 284 | XdpSessioncxx . . $ XdpSession# *session; |
| 285 | guintcxx . . $ guint# response = 2; |
| 286 | gbooleancxx . . $ gboolean# should_close_session; |
| 287 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 288 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariant) results = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 289 | |
| 290 | REQUEST_AUTOLOCKcxx . . $ `src/xdp-request.h:103:9`! (request); |
| 291 | |
| 292 | session = g_object_get_qdatacxx . . $ g_object_get_qdata(b02fb2b4fc775a4). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), quark_request_sessioncxx . . $ quark_request_session.); |
| 293 | SESSION_AUTOLOCK_UNREFcxx . . $ `src/xdp-session.h:115:9`! (g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (session)); |
| 294 | g_object_set_qdatacxx . . $ g_object_set_qdata(d7e2e719dfad0cc9). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), quark_request_sessioncxx . . $ quark_request_session., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 295 | |
| 296 | if (!xdp_dbus_impl_screen_cast_call_select_sources_finishcxx . . $ xdp_dbus_impl_screen_cast_call_select_sources_finish(5828a69a9383c9eb). (implcxx . . $ impl., |
| 297 | &response, |
| 298 | &results, |
| 299 | res, |
| 300 | &error)) |
| 301 | { |
| 302 | g_dbus_error_strip_remote_errorcxx . . $ g_dbus_error_strip_remote_error(425e103a815b829). (error); |
| 303 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:365:9`! ("A backend call failed: %s", error->message); |
| 304 | } |
| 305 | |
| 306 | should_close_session = !request->exportedcxx . . $ _XdpRequest#exported. || response != 0; |
| 307 | |
| 308 | if (request->exportedcxx . . $ _XdpRequest#exported.) |
| 309 | { |
| 310 | if (!results) |
| 311 | { |
| 312 | g_autocxx . . $ `<external>/12741050725406041920/gmacros.h:1428:9`!(GVariantBuilder) results_builder = |
| 313 | G_VARIANT_BUILDER_INITcxx . . $ `<external>/10279604295420929244/gvariant.h:369:9`! (G_VARIANT_TYPE_VARDICTcxx . . $ `<external>/14064154155447831270/gvarianttype.h:279:9`!); |
| 314 | |
| 315 | results = g_variant_ref_sinkcxx . . $ g_variant_ref_sink(3606eab35379b54a). (g_variant_builder_endcxx . . $ g_variant_builder_end(6d60952e65fc2b86). (&results_builder)); |
| 316 | } |
| 317 | |
| 318 | xdp_dbus_request_emit_responsecxx . . $ xdp_dbus_request_emit_response(6deab25eec490adc). (XDP_DBUS_REQUESTcxx . . $ `build/src/xdp-dbus.h:6732:9`! (request), response, results); |
| 319 | xdp_request_unexportcxx . . $ xdp_request_unexport(8bf1d2bcdc4be36d). (request); |
| 320 | } |
| 321 | |
| 322 | if (should_close_session) |
| 323 | { |
| 324 | xdp_session_closecxx . . $ xdp_session_close(e4dd02f38fc14a2). (session, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 325 | } |
| 326 | else if (!session->closedcxx . . $ _XdpSession#closed.) |
| 327 | { |
| 328 | if (IS_SCREEN_CAST_SESSIONcxx . . $ IS_SCREEN_CAST_SESSION(dedf1e9b1c614a07). (session)) |
| 329 | { |
| 330 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session); |
| 331 | |
| 332 | g_assert_cmpintcxx . . $ `<external>/15287032793271088244/gtestutils.h:72:9`! (screen_cast_session->state, |
| 333 | ==, |
| 334 | SCREEN_CAST_SESSION_STATE_SELECTING_SOURCES); |
| 335 | screen_cast_session->statecxx . . $ _ScreenCastSession#state. = SCREEN_CAST_SESSION_STATE_SOURCES_SELECTEDcxx . . $ SCREEN_CAST_SESSION_STATE_SOURCES_SELECTED.; |
| 336 | } |
| 337 | else if (IS_REMOTE_DESKTOP_SESSIONcxx . . $ IS_REMOTE_DESKTOP_SESSION(dedf1e9b1c614a07). (session)) |
| 338 | { |
| 339 | RemoteDesktopSessioncxx . . $ RemoteDesktopSession# *remote_desktop_session = |
| 340 | REMOTE_DESKTOP_SESSIONcxx . . $ REMOTE_DESKTOP_SESSION(288c4d99424a6019). (session); |
| 341 | |
| 342 | remote_desktop_session_sources_selectedcxx . . $ remote_desktop_session_sources_selected(514f1520aeba67af). (remote_desktop_session); |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | static gbooleancxx . . $ gboolean# |
| 348 | validate_source_typescxx . . $ validate_source_types(a4f81f97d7ea3409). (const char *key, |
| 349 | GVariantcxx . . $ GVariant# *value, |
| 350 | GVariantcxx . . $ GVariant# *options, |
| 351 | GErrorcxx . . $ GError# **error) |
| 352 | { |
| 353 | guint32cxx . . $ guint32# types = g_variant_get_uint32cxx . . $ g_variant_get_uint32(59fb6aaaf011986f). (value); |
| 354 | |
| 355 | if ((types & ~(1 | 2 | 4)) != 0) |
| 356 | { |
| 357 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, XDG_DESKTOP_PORTAL_ERRORcxx . . $ `src/xdp-utils.h:98:9`!, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENTcxx . . $ XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT., |
| 358 | "Unsupported device type: %x", types & ~(1 | 2 | 4)); |
| 359 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 360 | } |
| 361 | |
| 362 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 363 | } |
| 364 | |
| 365 | static gbooleancxx . . $ gboolean# |
| 366 | validate_cursor_modecxx . . $ validate_cursor_mode(a4f81f97d7ea3409). (const char *key, |
| 367 | GVariantcxx . . $ GVariant# *value, |
| 368 | GVariantcxx . . $ GVariant# *options, |
| 369 | GErrorcxx . . $ GError# **error) |
| 370 | { |
| 371 | uint32_tcxx . . $ uint32_t# mode = g_variant_get_uint32cxx . . $ g_variant_get_uint32(59fb6aaaf011986f). (value); |
| 372 | |
| 373 | if (__builtin_popcountcxx . . $ __builtin_popcount(4c679297bf94b9eb). (mode) != 1) |
| 374 | { |
| 375 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, XDG_DESKTOP_PORTAL_ERRORcxx . . $ `src/xdp-utils.h:98:9`!, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENTcxx . . $ XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT., |
| 376 | "Invalid cursor mode %x", mode); |
| 377 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 378 | } |
| 379 | |
| 380 | if (!(available_cursor_modescxx . . $ available_cursor_modes. & mode)) |
| 381 | { |
| 382 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, XDG_DESKTOP_PORTAL_ERRORcxx . . $ `src/xdp-utils.h:98:9`!, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENTcxx . . $ XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT., |
| 383 | "Unavailable cursor mode %x", mode); |
| 384 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 385 | } |
| 386 | |
| 387 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 388 | } |
| 389 | |
| 390 | static gbooleancxx . . $ gboolean# |
| 391 | validate_restore_tokencxx . . $ validate_restore_token(a4f81f97d7ea3409). (const char *key, |
| 392 | GVariantcxx . . $ GVariant# *value, |
| 393 | GVariantcxx . . $ GVariant# *options, |
| 394 | GErrorcxx . . $ GError# **error) |
| 395 | { |
| 396 | const char *restore_token = g_variant_get_stringcxx . . $ g_variant_get_string(5d5cac9792ea78b8). (value, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 397 | |
| 398 | if (!g_uuid_string_is_validcxx . . $ g_uuid_string_is_valid(5c4306d8553b3696). (restore_token)) |
| 399 | { |
| 400 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, XDG_DESKTOP_PORTAL_ERRORcxx . . $ `src/xdp-utils.h:98:9`!, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENTcxx . . $ XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT., |
| 401 | "Restore token is not a valid UUID string"); |
| 402 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 403 | } |
| 404 | |
| 405 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 406 | } |
| 407 | |
| 408 | static gbooleancxx . . $ gboolean# |
| 409 | validate_persist_modecxx . . $ validate_persist_mode(a4f81f97d7ea3409). (const char *key, |
| 410 | GVariantcxx . . $ GVariant# *value, |
| 411 | GVariantcxx . . $ GVariant# *options, |
| 412 | GErrorcxx . . $ GError# **error) |
| 413 | { |
| 414 | uint32_tcxx . . $ uint32_t# mode = g_variant_get_uint32cxx . . $ g_variant_get_uint32(59fb6aaaf011986f). (value); |
| 415 | |
| 416 | if (mode > XDP_SESSION_PERSISTENCE_MODE_PERSISTENTcxx . . $ XDP_SESSION_PERSISTENCE_MODE_PERSISTENT.) |
| 417 | { |
| 418 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, XDG_DESKTOP_PORTAL_ERRORcxx . . $ `src/xdp-utils.h:98:9`!, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENTcxx . . $ XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT., |
| 419 | "Invalid persist mode %x", mode); |
| 420 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 421 | } |
| 422 | |
| 423 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 424 | } |
| 425 | |
| 426 | static XdpOptionKeycxx . . $ XdpOptionKey# screen_cast_select_sources_optionscxx . . $ screen_cast_select_sources_options.[] = { |
| 427 | { "types", G_VARIANT_TYPE_UINT32cxx . . $ `<external>/14064154155447831270/gvarianttype.h:81:9`!, validate_source_typescxx . . $ validate_source_types(a4f81f97d7ea3409). }, |
| 428 | { "multiple", G_VARIANT_TYPE_BOOLEANcxx . . $ `<external>/14064154155447831270/gvarianttype.h:41:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 429 | { "cursor_mode", G_VARIANT_TYPE_UINT32cxx . . $ `<external>/14064154155447831270/gvarianttype.h:81:9`!, validate_cursor_modecxx . . $ validate_cursor_mode(a4f81f97d7ea3409). }, |
| 430 | { "restore_token", G_VARIANT_TYPE_STRINGcxx . . $ `<external>/14064154155447831270/gvarianttype.h:122:9`!, validate_restore_tokencxx . . $ validate_restore_token(a4f81f97d7ea3409). }, |
| 431 | { "persist_mode", G_VARIANT_TYPE_UINT32cxx . . $ `<external>/14064154155447831270/gvarianttype.h:81:9`!, validate_persist_modecxx . . $ validate_persist_mode(a4f81f97d7ea3409). }, |
| 432 | }; |
| 433 | |
| 434 | static gbooleancxx . . $ gboolean# |
| 435 | replace_screen_cast_restore_token_with_datacxx . . $ replace_screen_cast_restore_token_with_data(bf2d3316eec98cc9). (XdpSessioncxx . . $ XdpSession# *session, |
| 436 | GVariantcxx . . $ GVariant# **in_out_options, |
| 437 | GErrorcxx . . $ GError# **error) |
| 438 | { |
| 439 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariant) options = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 440 | XdpSessionPersistenceModecxx . . $ XdpSessionPersistenceMode# persist_mode; |
| 441 | |
| 442 | options = *in_out_options; |
| 443 | |
| 444 | if (!g_variant_lookupcxx . . $ g_variant_lookup(7f27c6838ade8909). (options, "persist_mode", "u", &persist_mode)) |
| 445 | persist_mode = XDP_SESSION_PERSISTENCE_MODE_NONEcxx . . $ XDP_SESSION_PERSISTENCE_MODE_NONE.; |
| 446 | |
| 447 | if (IS_REMOTE_DESKTOP_SESSIONcxx . . $ IS_REMOTE_DESKTOP_SESSION(dedf1e9b1c614a07). (session)) |
| 448 | { |
| 449 | if (persist_mode != XDP_SESSION_PERSISTENCE_MODE_NONEcxx . . $ XDP_SESSION_PERSISTENCE_MODE_NONE. || |
| 450 | xdp_variant_contains_keycxx . . $ xdp_variant_contains_key(3acb228297ef692c). (options, "restore_token")) |
| 451 | { |
| 452 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, |
| 453 | XDG_DESKTOP_PORTAL_ERRORcxx . . $ `src/xdp-utils.h:98:9`!, |
| 454 | XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENTcxx . . $ XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT., |
| 455 | "Remote desktop sessions cannot persist"); |
| 456 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | if (IS_SCREEN_CAST_SESSIONcxx . . $ IS_SCREEN_CAST_SESSION(dedf1e9b1c614a07). (session)) |
| 461 | { |
| 462 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session); |
| 463 | |
| 464 | screen_cast_session->persist_modecxx . . $ _ScreenCastSession#persist_mode. = persist_mode; |
| 465 | xdp_session_persistence_replace_restore_token_with_datacxx . . $ xdp_session_persistence_replace_restore_token_with_data(6fd49f6574b5027b). (session, |
| 466 | SCREEN_CAST_TABLEcxx . . $ `src/screen-cast.c:43:9`!, |
| 467 | in_out_options, |
| 468 | &screen_cast_session->restore_tokencxx . . $ _ScreenCastSession#restore_token.); |
| 469 | } |
| 470 | else |
| 471 | { |
| 472 | *in_out_options = g_steal_pointercxx . . $ `<external>/1123956534522462559/gmem.h:250:9`! (&options); |
| 473 | } |
| 474 | |
| 475 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 476 | } |
| 477 | |
| 478 | static gbooleancxx . . $ gboolean# |
| 479 | handle_select_sourcescxx . . $ handle_select_sources(953bc2dbf00a1a9e). (XdpDbusScreenCastcxx . . $ XdpDbusScreenCast# *object, |
| 480 | GDBusMethodInvocationcxx . . $ GDBusMethodInvocation# *invocation, |
| 481 | const char *arg_session_handle, |
| 482 | GVariantcxx . . $ GVariant# *arg_options) |
| 483 | { |
| 484 | XdpRequestcxx . . $ XdpRequest# *request = xdp_request_from_invocationcxx . . $ xdp_request_from_invocation(9583a51810815010). (invocation); |
| 485 | XdpSessioncxx . . $ XdpSession# *session; |
| 486 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 487 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(XdpDbusImplRequest) impl_request = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 488 | g_autocxx . . $ `<external>/12741050725406041920/gmacros.h:1428:9`!(GVariantBuilder) options_builder = |
| 489 | G_VARIANT_BUILDER_INITcxx . . $ `<external>/10279604295420929244/gvariant.h:369:9`! (G_VARIANT_TYPE_VARDICTcxx . . $ `<external>/14064154155447831270/gvarianttype.h:279:9`!); |
| 490 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariant) options = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 491 | |
| 492 | REQUEST_AUTOLOCKcxx . . $ `src/xdp-request.h:103:9`! (request); |
| 493 | |
| 494 | session = xdp_session_from_requestcxx . . $ xdp_session_from_request(b20d0b7552200bd). (arg_session_handle, request); |
| 495 | if (!session) |
| 496 | { |
| 497 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 498 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 499 | G_DBUS_ERROR_ACCESS_DENIEDcxx . . $ G_DBUS_ERROR_ACCESS_DENIED., |
| 500 | "Invalid session"); |
| 501 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 502 | } |
| 503 | |
| 504 | SESSION_AUTOLOCK_UNREFcxx . . $ `src/xdp-session.h:115:9`! (session); |
| 505 | |
| 506 | if (IS_SCREEN_CAST_SESSIONcxx . . $ IS_SCREEN_CAST_SESSION(dedf1e9b1c614a07). (session)) |
| 507 | { |
| 508 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session); |
| 509 | |
| 510 | switch (screen_cast_session->statecxx . . $ _ScreenCastSession#state.) |
| 511 | { |
| 512 | case SCREEN_CAST_SESSION_STATE_INITcxx . . $ SCREEN_CAST_SESSION_STATE_INIT.: |
| 513 | break; |
| 514 | case SCREEN_CAST_SESSION_STATE_SELECTING_SOURCEScxx . . $ SCREEN_CAST_SESSION_STATE_SELECTING_SOURCES.: |
| 515 | case SCREEN_CAST_SESSION_STATE_SOURCES_SELECTEDcxx . . $ SCREEN_CAST_SESSION_STATE_SOURCES_SELECTED.: |
| 516 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 517 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 518 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 519 | "Sources already selected"); |
| 520 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 521 | case SCREEN_CAST_SESSION_STATE_STARTINGcxx . . $ SCREEN_CAST_SESSION_STATE_STARTING.: |
| 522 | case SCREEN_CAST_SESSION_STATE_STARTEDcxx . . $ SCREEN_CAST_SESSION_STATE_STARTED.: |
| 523 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 524 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 525 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 526 | "Can only select sources before starting"); |
| 527 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 528 | case SCREEN_CAST_SESSION_STATE_CLOSEDcxx . . $ SCREEN_CAST_SESSION_STATE_CLOSED.: |
| 529 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 530 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 531 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 532 | "Invalid session"); |
| 533 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 534 | } |
| 535 | } |
| 536 | else if (IS_REMOTE_DESKTOP_SESSIONcxx . . $ IS_REMOTE_DESKTOP_SESSION(dedf1e9b1c614a07). (session)) |
| 537 | { |
| 538 | RemoteDesktopSessioncxx . . $ RemoteDesktopSession# *remote_desktop_session = |
| 539 | REMOTE_DESKTOP_SESSIONcxx . . $ REMOTE_DESKTOP_SESSION(288c4d99424a6019). (session); |
| 540 | |
| 541 | if (!remote_desktop_session_can_select_sourcescxx . . $ remote_desktop_session_can_select_sources(dd48ac39560d1f95). (remote_desktop_session)) |
| 542 | { |
| 543 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 544 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 545 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 546 | "Invalid state"); |
| 547 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 548 | } |
| 549 | } |
| 550 | else |
| 551 | { |
| 552 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 553 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 554 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 555 | "Invalid session"); |
| 556 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 557 | } |
| 558 | |
| 559 | impl_request = |
| 560 | xdp_dbus_impl_request_proxy_new_synccxx . . $ xdp_dbus_impl_request_proxy_new_sync(b36c38a372f8f089). (g_dbus_proxy_get_connectioncxx . . $ g_dbus_proxy_get_connection(fd0690ce15ac5ecf). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)), |
| 561 | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIEScxx . . $ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES., |
| 562 | g_dbus_proxy_get_namecxx . . $ g_dbus_proxy_get_name(c2c3b8a4da378b0d). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)), |
| 563 | request->idcxx . . $ _XdpRequest#id., |
| 564 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &error); |
| 565 | if (!impl_request) |
| 566 | { |
| 567 | g_dbus_method_invocation_return_gerrorcxx . . $ g_dbus_method_invocation_return_gerror(f84b6a1e02aa551). (invocation, error); |
| 568 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 569 | } |
| 570 | |
| 571 | xdp_request_set_impl_requestcxx . . $ xdp_request_set_impl_request(18bd0ab3b325ada4). (request, impl_request); |
| 572 | xdp_request_exportcxx . . $ xdp_request_export(49d11f351a243e17). (request, g_dbus_method_invocation_get_connectioncxx . . $ g_dbus_method_invocation_get_connection(8c6afd006dd99032). (invocation)); |
| 573 | |
| 574 | if (!xdp_filter_optionscxx . . $ xdp_filter_options(d63f67045969ba55). (arg_options, &options_builder, |
| 575 | screen_cast_select_sources_optionscxx . . $ screen_cast_select_sources_options., |
| 576 | G_N_ELEMENTScxx . . $ `<external>/12741050725406041920/gmacros.h:993:9`! (screen_cast_select_sources_options), |
| 577 | &error)) |
| 578 | { |
| 579 | g_dbus_method_invocation_return_gerrorcxx . . $ g_dbus_method_invocation_return_gerror(f84b6a1e02aa551). (invocation, error); |
| 580 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 581 | } |
| 582 | |
| 583 | options = g_variant_ref_sinkcxx . . $ g_variant_ref_sink(3606eab35379b54a). (g_variant_builder_endcxx . . $ g_variant_builder_end(6d60952e65fc2b86). (&options_builder)); |
| 584 | |
| 585 | /* If 'restore_token' is passed, lookup the corresponding data in the |
| 586 | * permission store and / or the GHashTable with transient permissions. |
| 587 | * Portal implementations do not have access to the restore token. |
| 588 | */ |
| 589 | if (!replace_screen_cast_restore_token_with_datacxx . . $ replace_screen_cast_restore_token_with_data(bf2d3316eec98cc9). (session, &options, &error)) |
| 590 | { |
| 591 | g_dbus_method_invocation_return_gerrorcxx . . $ g_dbus_method_invocation_return_gerror(f84b6a1e02aa551). (invocation, error); |
| 592 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 593 | } |
| 594 | |
| 595 | g_object_set_qdata_fullcxx . . $ g_object_set_qdata_full(65a765778c030710). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), |
| 596 | quark_request_sessioncxx . . $ quark_request_session., |
| 597 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (session), |
| 598 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).); |
| 599 | if (IS_SCREEN_CAST_SESSIONcxx . . $ IS_SCREEN_CAST_SESSION(dedf1e9b1c614a07). (session)) |
| 600 | { |
| 601 | SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session)->statecxx . . $ _ScreenCastSession#state. = |
| 602 | SCREEN_CAST_SESSION_STATE_SELECTING_SOURCEScxx . . $ SCREEN_CAST_SESSION_STATE_SELECTING_SOURCES.; |
| 603 | } |
| 604 | |
| 605 | xdp_dbus_impl_screen_cast_call_select_sourcescxx . . $ xdp_dbus_impl_screen_cast_call_select_sources(b0149c26f3691655). (implcxx . . $ impl., |
| 606 | request->idcxx . . $ _XdpRequest#id., |
| 607 | arg_session_handle, |
| 608 | xdp_app_info_get_idcxx . . $ xdp_app_info_get_id(b9a768ac644c9329). (request->app_infocxx . . $ _XdpRequest#app_info.), |
| 609 | options, |
| 610 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 611 | select_sources_donecxx . . $ select_sources_done(aa1d200d824d915d)., |
| 612 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (request)); |
| 613 | |
| 614 | xdp_dbus_screen_cast_complete_select_sourcescxx . . $ xdp_dbus_screen_cast_complete_select_sources(861177f24bec6f0a). (object, invocation, request->idcxx . . $ _XdpRequest#id.); |
| 615 | |
| 616 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 617 | } |
| 618 | |
| 619 | uint32_tcxx . . $ uint32_t# |
| 620 | screen_cast_stream_get_pipewire_node_idcxx . . $ screen_cast_stream_get_pipewire_node_id(f81c752b0fadbc8). (ScreenCastStreamcxx . . $ ScreenCastStream# *stream) |
| 621 | { |
| 622 | return stream->idcxx . . $ _ScreenCastStream#id.; |
| 623 | } |
| 624 | |
| 625 | static void |
| 626 | append_stream_permissionscxx . . $ append_stream_permissions(5ebd28daafd6c507). (PipeWireRemotecxx . . $ PipeWireRemote# *remote, |
| 627 | GArraycxx . . $ GArray# *permission_items, |
| 628 | GListcxx . . $ GList# *streams) |
| 629 | { |
| 630 | GListcxx . . $ GList# *l; |
| 631 | |
| 632 | for (l = streams; l; l = l->nextcxx . . $ _GList#next.) |
| 633 | { |
| 634 | ScreenCastStreamcxx . . $ ScreenCastStream# *stream = l->datacxx . . $ _GList#data.; |
| 635 | uint32_tcxx . . $ uint32_t# stream_id; |
| 636 | |
| 637 | stream_id = screen_cast_stream_get_pipewire_node_idcxx . . $ screen_cast_stream_get_pipewire_node_id(f81c752b0fadbc8). (stream); |
| 638 | g_array_append_valcxx . . $ `<external>/13165152102340786875/garray.h:66:9`! (permission_items, |
| 639 | PERMISSION_ITEMcxx . . $ `src/screen-cast.c:38:9`! (stream_id, PW_PERM_RWXcxx . . $ `<external>/7939413062154060509/permission.h:36:9`!)); |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | static PipeWireRemotecxx . . $ PipeWireRemote# * |
| 644 | open_pipewire_screen_cast_remotecxx . . $ open_pipewire_screen_cast_remote(e80a5606d57dd297). (const char *app_id, |
| 645 | GListcxx . . $ GList# *streams, |
| 646 | GErrorcxx . . $ GError# **error) |
| 647 | { |
| 648 | struct pw_propertiescxx . . $ pw_properties# *pipewire_properties; |
| 649 | PipeWireRemotecxx . . $ PipeWireRemote# *remote; |
| 650 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GArray) permission_items = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 651 | |
| 652 | pipewire_properties = pw_properties_newcxx . . $ pw_properties_new(e0c80577246ac4c6). ("pipewire.access.portal.app_id", app_id, |
| 653 | "pipewire.access.portal.media_roles", "", |
| 654 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 655 | remote = pipewire_remote_new_synccxx . . $ pipewire_remote_new_sync(a02fe799c62322c5). (pipewire_properties, |
| 656 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 657 | error); |
| 658 | if (!remote) |
| 659 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 660 | |
| 661 | permission_items = g_array_newcxx . . $ g_array_new(fe898421933afc00). (FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, sizeof (struct pw_permissioncxx . . $ pw_permission#)); |
| 662 | |
| 663 | /* |
| 664 | * PipeWire:Interface:Core |
| 665 | * Needs rwx to be able create the sink node using the create-object method |
| 666 | */ |
| 667 | g_array_append_valcxx . . $ `<external>/13165152102340786875/garray.h:66:9`! (permission_items, |
| 668 | PERMISSION_ITEMcxx . . $ `src/screen-cast.c:38:9`! (PW_ID_COREcxx . . $ `<external>/5234708268892715328/core.h:57:9`!, PW_PERM_RWXcxx . . $ `<external>/7939413062154060509/permission.h:36:9`!)); |
| 669 | |
| 670 | /* |
| 671 | * PipeWire:Interface:NodeFactory |
| 672 | * Needs r-- so it can be passed to create-object when creating the sink node. |
| 673 | */ |
| 674 | g_array_append_valcxx . . $ `<external>/13165152102340786875/garray.h:66:9`! (permission_items, |
| 675 | PERMISSION_ITEMcxx . . $ `src/screen-cast.c:38:9`! (remote->node_factory_id, PW_PERM_Rcxx . . $ `<external>/7939413062154060509/permission.h:27:9`!)); |
| 676 | |
| 677 | append_stream_permissionscxx . . $ append_stream_permissions(5ebd28daafd6c507). (remote, permission_items, streams); |
| 678 | |
| 679 | /* |
| 680 | * Hide all existing and future nodes (except the ones we explicitly list above). |
| 681 | */ |
| 682 | g_array_append_valcxx . . $ `<external>/13165152102340786875/garray.h:66:9`! (permission_items, |
| 683 | PERMISSION_ITEMcxx . . $ `src/screen-cast.c:38:9`! (PW_ID_ANYcxx . . $ `<external>/5234708268892715328/core.h:60:9`!, 0)); |
| 684 | |
| 685 | pw_client_update_permissionscxx . . $ pw_client_update_permissions(c924fdb834f35c5). (pw_core_get_clientcxx . . $ pw_core_get_client(4a7da86c87678949).(remote->corecxx . . $ _PipeWireRemote#core.), |
| 686 | permission_items->lencxx . . $ _GArray#len., |
| 687 | (const struct pw_permissioncxx . . $ pw_permission# *)permission_items->datacxx . . $ _GArray#data.); |
| 688 | |
| 689 | pipewire_remote_roundtripcxx . . $ pipewire_remote_roundtrip(79f2a9067a520604). (remote); |
| 690 | |
| 691 | return remote; |
| 692 | } |
| 693 | |
| 694 | void |
| 695 | screen_cast_stream_get_sizecxx . . $ screen_cast_stream_get_size(44d6a6f91e5a4c4b). (ScreenCastStreamcxx . . $ ScreenCastStream# *stream, |
| 696 | int32_tcxx . . $ int32_t# *width, |
| 697 | int32_tcxx . . $ int32_t# *height) |
| 698 | { |
| 699 | *width = stream->widthcxx . . $ _ScreenCastStream#width.; |
| 700 | *height = stream->heightcxx . . $ _ScreenCastStream#height.; |
| 701 | } |
| 702 | |
| 703 | void |
| 704 | screen_cast_stream_freecxx . . $ screen_cast_stream_free(6f144c91b7a728b0). (ScreenCastStreamcxx . . $ ScreenCastStream# *stream) |
| 705 | { |
| 706 | g_freecxx . . $ g_free(5d22bdacc48458e8). (stream); |
| 707 | } |
| 708 | |
| 709 | GListcxx . . $ GList# * |
| 710 | collect_screen_cast_stream_datacxx . . $ collect_screen_cast_stream_data(859a85f4252c91d7). (GVariantItercxx . . $ GVariantIter# *streams_iter) |
| 711 | { |
| 712 | GListcxx . . $ GList# *streams = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 713 | uint32_tcxx . . $ uint32_t# stream_id; |
| 714 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariant) stream_options = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 715 | |
| 716 | while (g_variant_iter_nextcxx . . $ g_variant_iter_next(eaf615a8ce2e43df). (streams_iter, "(u@a{sv})", |
| 717 | &stream_id, &stream_options)) |
| 718 | { |
| 719 | ScreenCastStreamcxx . . $ ScreenCastStream# *stream; |
| 720 | |
| 721 | stream = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (ScreenCastStream, 1); |
| 722 | stream->idcxx . . $ _ScreenCastStream#id. = stream_id; |
| 723 | g_variant_lookupcxx . . $ g_variant_lookup(7f27c6838ade8909). (stream_options, "size", "(ii)", |
| 724 | &stream->widthcxx . . $ _ScreenCastStream#width., &stream->heightcxx . . $ _ScreenCastStream#height.); |
| 725 | |
| 726 | streams = g_list_prependcxx . . $ g_list_prepend(35007086a6b2ba1c). (streams, stream); |
| 727 | } |
| 728 | |
| 729 | return streams; |
| 730 | } |
| 731 | |
| 732 | static void |
| 733 | replace_restore_screen_cast_data_with_tokencxx . . $ replace_restore_screen_cast_data_with_token(957b640badae0437). (ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session, |
| 734 | GVariantcxx . . $ GVariant# **in_out_results) |
| 735 | { |
| 736 | xdp_session_persistence_replace_restore_data_with_tokencxx . . $ xdp_session_persistence_replace_restore_data_with_token(97c9ce3fc2c5d9dc). (XDP_SESSIONcxx . . $ XDP_SESSION(a424cc90118498e6). (screen_cast_session), |
| 737 | SCREEN_CAST_TABLEcxx . . $ `src/screen-cast.c:43:9`!, |
| 738 | in_out_results, |
| 739 | &screen_cast_session->persist_modecxx . . $ _ScreenCastSession#persist_mode., |
| 740 | &screen_cast_session->restore_tokencxx . . $ _ScreenCastSession#restore_token., |
| 741 | &screen_cast_session->restore_datacxx . . $ _ScreenCastSession#restore_data.); |
| 742 | } |
| 743 | |
| 744 | static gbooleancxx . . $ gboolean# |
| 745 | process_resultscxx . . $ process_results(1c9630d36887db2). (ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session, |
| 746 | GVariantcxx . . $ GVariant# **in_out_results, |
| 747 | GErrorcxx . . $ GError# **error) |
| 748 | { |
| 749 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariantIter) streams_iter = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 750 | GVariantcxx . . $ GVariant# *results = *in_out_results; |
| 751 | |
| 752 | if (!g_variant_lookupcxx . . $ g_variant_lookup(7f27c6838ade8909). (results, "streams", "a(ua{sv})", &streams_iter)) |
| 753 | { |
| 754 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, G_IO_ERRORcxx . . $ `<external>/13894955190784973534/gioerror.h:42:9`!, G_IO_ERROR_FAILEDcxx . . $ G_IO_ERROR_FAILED., "No streams"); |
| 755 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 756 | } |
| 757 | |
| 758 | screen_cast_session->streamscxx . . $ _ScreenCastSession#streams. = collect_screen_cast_stream_datacxx . . $ collect_screen_cast_stream_data(859a85f4252c91d7). (streams_iter); |
| 759 | replace_restore_screen_cast_data_with_tokencxx . . $ replace_restore_screen_cast_data_with_token(957b640badae0437). (screen_cast_session, |
| 760 | in_out_results); |
| 761 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 762 | } |
| 763 | |
| 764 | static void |
| 765 | start_donecxx . . $ start_done(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source_object, |
| 766 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 767 | gpointercxx . . $ gpointer# data) |
| 768 | { |
| 769 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(XdpRequest) request = data; |
| 770 | XdpSessioncxx . . $ XdpSession# *session; |
| 771 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session; |
| 772 | guintcxx . . $ guint# response = 2; |
| 773 | gbooleancxx . . $ gboolean# should_close_session; |
| 774 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariant) results = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 775 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 776 | |
| 777 | REQUEST_AUTOLOCKcxx . . $ `src/xdp-request.h:103:9`! (request); |
| 778 | |
| 779 | session = g_object_get_qdatacxx . . $ g_object_get_qdata(b02fb2b4fc775a4). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), quark_request_sessioncxx . . $ quark_request_session.); |
| 780 | SESSION_AUTOLOCK_UNREFcxx . . $ `src/xdp-session.h:115:9`! (g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (session)); |
| 781 | g_object_set_qdatacxx . . $ g_object_set_qdata(d7e2e719dfad0cc9). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), quark_request_sessioncxx . . $ quark_request_session., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 782 | |
| 783 | if (!xdp_dbus_impl_screen_cast_call_start_finishcxx . . $ xdp_dbus_impl_screen_cast_call_start_finish(5828a69a9383c9eb). (implcxx . . $ impl., |
| 784 | &response, |
| 785 | &results, |
| 786 | res, |
| 787 | &error)) |
| 788 | { |
| 789 | g_dbus_error_strip_remote_errorcxx . . $ g_dbus_error_strip_remote_error(425e103a815b829). (error); |
| 790 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:365:9`! ("A backend call failed: %s", error->message); |
| 791 | g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&error); |
| 792 | } |
| 793 | |
| 794 | should_close_session = !request->exportedcxx . . $ _XdpRequest#exported. || response != 0; |
| 795 | |
| 796 | screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session); |
| 797 | |
| 798 | if (request->exportedcxx . . $ _XdpRequest#exported.) |
| 799 | { |
| 800 | if (response == 0) |
| 801 | { |
| 802 | if (!process_resultscxx . . $ process_results(1c9630d36887db2). (screen_cast_session, &results, &error)) |
| 803 | { |
| 804 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:365:9`! ("Failed to process results: %s", error->message); |
| 805 | g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&error); |
| 806 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&results, g_variant_unref); |
| 807 | response = 2; |
| 808 | should_close_session = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | if (!results) |
| 813 | { |
| 814 | g_autocxx . . $ `<external>/12741050725406041920/gmacros.h:1428:9`!(GVariantBuilder) results_builder = |
| 815 | G_VARIANT_BUILDER_INITcxx . . $ `<external>/10279604295420929244/gvariant.h:369:9`! (G_VARIANT_TYPE_VARDICTcxx . . $ `<external>/14064154155447831270/gvarianttype.h:279:9`!); |
| 816 | |
| 817 | results = g_variant_ref_sinkcxx . . $ g_variant_ref_sink(3606eab35379b54a). (g_variant_builder_endcxx . . $ g_variant_builder_end(6d60952e65fc2b86). (&results_builder)); |
| 818 | } |
| 819 | |
| 820 | xdp_dbus_request_emit_responsecxx . . $ xdp_dbus_request_emit_response(6deab25eec490adc). (XDP_DBUS_REQUESTcxx . . $ `build/src/xdp-dbus.h:6732:9`! (request), response, results); |
| 821 | xdp_request_unexportcxx . . $ xdp_request_unexport(8bf1d2bcdc4be36d). (request); |
| 822 | } |
| 823 | |
| 824 | if (should_close_session) |
| 825 | { |
| 826 | xdp_session_closecxx . . $ xdp_session_close(e4dd02f38fc14a2). (session, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 827 | } |
| 828 | else if (!session->closedcxx . . $ _XdpSession#closed.) |
| 829 | { |
| 830 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (screen_cast_session->state == |
| 831 | SCREEN_CAST_SESSION_STATE_STARTING); |
| 832 | g_debugcxx . . $ `<external>/5169755362661750954/gmessages.h:371:9`! ("screen cast session owned by '%s' started", session->sender); |
| 833 | screen_cast_session->statecxx . . $ _ScreenCastSession#state. = SCREEN_CAST_SESSION_STATE_STARTEDcxx . . $ SCREEN_CAST_SESSION_STATE_STARTED.; |
| 834 | } |
| 835 | } |
| 836 | |
| 837 | static gbooleancxx . . $ gboolean# |
| 838 | handle_startcxx . . $ handle_start(f80edcaec911f610). (XdpDbusScreenCastcxx . . $ XdpDbusScreenCast# *object, |
| 839 | GDBusMethodInvocationcxx . . $ GDBusMethodInvocation# *invocation, |
| 840 | const char *arg_session_handle, |
| 841 | const char *arg_parent_window, |
| 842 | GVariantcxx . . $ GVariant# *arg_options) |
| 843 | { |
| 844 | XdpRequestcxx . . $ XdpRequest# *request = xdp_request_from_invocationcxx . . $ xdp_request_from_invocation(9583a51810815010). (invocation); |
| 845 | XdpSessioncxx . . $ XdpSession# *session; |
| 846 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session; |
| 847 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 848 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(XdpDbusImplRequest) impl_request = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 849 | g_autocxx . . $ `<external>/12741050725406041920/gmacros.h:1428:9`!(GVariantBuilder) options_builder = |
| 850 | G_VARIANT_BUILDER_INITcxx . . $ `<external>/10279604295420929244/gvariant.h:369:9`! (G_VARIANT_TYPE_VARDICTcxx . . $ `<external>/14064154155447831270/gvarianttype.h:279:9`!); |
| 851 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GVariant) options = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 852 | |
| 853 | REQUEST_AUTOLOCKcxx . . $ `src/xdp-request.h:103:9`! (request); |
| 854 | |
| 855 | session = xdp_session_from_requestcxx . . $ xdp_session_from_request(b20d0b7552200bd). (arg_session_handle, request); |
| 856 | if (!session) |
| 857 | { |
| 858 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 859 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 860 | G_DBUS_ERROR_ACCESS_DENIEDcxx . . $ G_DBUS_ERROR_ACCESS_DENIED., |
| 861 | "Invalid session"); |
| 862 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 863 | } |
| 864 | |
| 865 | SESSION_AUTOLOCK_UNREFcxx . . $ `src/xdp-session.h:115:9`! (session); |
| 866 | |
| 867 | screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session); |
| 868 | switch (screen_cast_session->statecxx . . $ _ScreenCastSession#state.) |
| 869 | { |
| 870 | case SCREEN_CAST_SESSION_STATE_SOURCES_SELECTEDcxx . . $ SCREEN_CAST_SESSION_STATE_SOURCES_SELECTED.: |
| 871 | break; |
| 872 | case SCREEN_CAST_SESSION_STATE_INITcxx . . $ SCREEN_CAST_SESSION_STATE_INIT.: |
| 873 | case SCREEN_CAST_SESSION_STATE_SELECTING_SOURCEScxx . . $ SCREEN_CAST_SESSION_STATE_SELECTING_SOURCES.: |
| 874 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 875 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 876 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 877 | "Sources not selected"); |
| 878 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 879 | case SCREEN_CAST_SESSION_STATE_STARTINGcxx . . $ SCREEN_CAST_SESSION_STATE_STARTING.: |
| 880 | case SCREEN_CAST_SESSION_STATE_STARTEDcxx . . $ SCREEN_CAST_SESSION_STATE_STARTED.: |
| 881 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 882 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 883 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 884 | "Can only start once"); |
| 885 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 886 | case SCREEN_CAST_SESSION_STATE_CLOSEDcxx . . $ SCREEN_CAST_SESSION_STATE_CLOSED.: |
| 887 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 888 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 889 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 890 | "Invalid session"); |
| 891 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 892 | } |
| 893 | |
| 894 | g_object_set_data_fullcxx . . $ g_object_set_data_full(218df00be1d2a06c). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), |
| 895 | "window", g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (arg_parent_window), g_freecxx . . $ g_free(5d22bdacc48458e8).); |
| 896 | |
| 897 | impl_request = |
| 898 | xdp_dbus_impl_request_proxy_new_synccxx . . $ xdp_dbus_impl_request_proxy_new_sync(b36c38a372f8f089). (g_dbus_proxy_get_connectioncxx . . $ g_dbus_proxy_get_connection(fd0690ce15ac5ecf). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)), |
| 899 | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIEScxx . . $ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES., |
| 900 | g_dbus_proxy_get_namecxx . . $ g_dbus_proxy_get_name(c2c3b8a4da378b0d). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl)), |
| 901 | request->idcxx . . $ _XdpRequest#id., |
| 902 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &error); |
| 903 | if (!impl_request) |
| 904 | { |
| 905 | g_dbus_method_invocation_return_gerrorcxx . . $ g_dbus_method_invocation_return_gerror(f84b6a1e02aa551). (invocation, error); |
| 906 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 907 | } |
| 908 | |
| 909 | xdp_request_set_impl_requestcxx . . $ xdp_request_set_impl_request(18bd0ab3b325ada4). (request, impl_request); |
| 910 | xdp_request_exportcxx . . $ xdp_request_export(49d11f351a243e17). (request, g_dbus_method_invocation_get_connectioncxx . . $ g_dbus_method_invocation_get_connection(8c6afd006dd99032). (invocation)); |
| 911 | |
| 912 | options = g_variant_ref_sinkcxx . . $ g_variant_ref_sink(3606eab35379b54a). (g_variant_builder_endcxx . . $ g_variant_builder_end(6d60952e65fc2b86). (&options_builder)); |
| 913 | |
| 914 | g_object_set_qdata_fullcxx . . $ g_object_set_qdata_full(65a765778c030710). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (request), |
| 915 | quark_request_sessioncxx . . $ quark_request_session., |
| 916 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (session), |
| 917 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).); |
| 918 | screen_cast_session->statecxx . . $ _ScreenCastSession#state. = SCREEN_CAST_SESSION_STATE_STARTINGcxx . . $ SCREEN_CAST_SESSION_STATE_STARTING.; |
| 919 | |
| 920 | xdp_dbus_impl_screen_cast_call_startcxx . . $ xdp_dbus_impl_screen_cast_call_start(1b506b74e2492820). (implcxx . . $ impl., |
| 921 | request->idcxx . . $ _XdpRequest#id., |
| 922 | arg_session_handle, |
| 923 | xdp_app_info_get_idcxx . . $ xdp_app_info_get_id(b9a768ac644c9329). (request->app_infocxx . . $ _XdpRequest#app_info.), |
| 924 | arg_parent_window, |
| 925 | options, |
| 926 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 927 | start_donecxx . . $ start_done(aa1d200d824d915d)., |
| 928 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (request)); |
| 929 | |
| 930 | xdp_dbus_screen_cast_complete_startcxx . . $ xdp_dbus_screen_cast_complete_start(861177f24bec6f0a). (object, invocation, request->idcxx . . $ _XdpRequest#id.); |
| 931 | |
| 932 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 933 | } |
| 934 | |
| 935 | static gbooleancxx . . $ gboolean# |
| 936 | handle_open_pipewire_remotecxx . . $ handle_open_pipewire_remote(8e12eafb3c09a86). (XdpDbusScreenCastcxx . . $ XdpDbusScreenCast# *object, |
| 937 | GDBusMethodInvocationcxx . . $ GDBusMethodInvocation# *invocation, |
| 938 | GUnixFDListcxx . . $ GUnixFDList# *in_fd_list, |
| 939 | const char *arg_session_handle, |
| 940 | GVariantcxx . . $ GVariant# *arg_options) |
| 941 | { |
| 942 | XdpCallcxx . . $ XdpCall# *call = xdp_call_from_invocationcxx . . $ xdp_call_from_invocation(844a7d983c951e16). (invocation); |
| 943 | XdpSessioncxx . . $ XdpSession# *session; |
| 944 | GListcxx . . $ GList# *streams; |
| 945 | PipeWireRemotecxx . . $ PipeWireRemote# *remote; |
| 946 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GUnixFDList) out_fd_list = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 947 | int fd; |
| 948 | int fd_id; |
| 949 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 950 | |
| 951 | session = xdp_session_from_callcxx . . $ xdp_session_from_call(87af02f4dcb4a89b). (arg_session_handle, call); |
| 952 | if (!session) |
| 953 | { |
| 954 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 955 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 956 | G_DBUS_ERROR_ACCESS_DENIEDcxx . . $ G_DBUS_ERROR_ACCESS_DENIED., |
| 957 | "Invalid session"); |
| 958 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 959 | } |
| 960 | |
| 961 | SESSION_AUTOLOCK_UNREFcxx . . $ `src/xdp-session.h:115:9`! (session); |
| 962 | |
| 963 | if (IS_SCREEN_CAST_SESSIONcxx . . $ IS_SCREEN_CAST_SESSION(dedf1e9b1c614a07). (session)) |
| 964 | { |
| 965 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session); |
| 966 | |
| 967 | streams = screen_cast_session->streamscxx . . $ _ScreenCastSession#streams.; |
| 968 | } |
| 969 | else if (IS_REMOTE_DESKTOP_SESSIONcxx . . $ IS_REMOTE_DESKTOP_SESSION(dedf1e9b1c614a07). (session)) |
| 970 | { |
| 971 | RemoteDesktopSessioncxx . . $ RemoteDesktopSession# *remote_desktop_session = |
| 972 | REMOTE_DESKTOP_SESSIONcxx . . $ REMOTE_DESKTOP_SESSION(288c4d99424a6019). (session); |
| 973 | |
| 974 | streams = remote_desktop_session_get_streamscxx . . $ remote_desktop_session_get_streams(ea983a36440a98d3). (remote_desktop_session); |
| 975 | } |
| 976 | else |
| 977 | { |
| 978 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 979 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 980 | G_DBUS_ERROR_ACCESS_DENIEDcxx . . $ G_DBUS_ERROR_ACCESS_DENIED., |
| 981 | "Invalid session"); |
| 982 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 983 | } |
| 984 | |
| 985 | if (!streams) |
| 986 | { |
| 987 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 988 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 989 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 990 | "No streams available"); |
| 991 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 992 | } |
| 993 | |
| 994 | remote = open_pipewire_screen_cast_remotecxx . . $ open_pipewire_screen_cast_remote(e80a5606d57dd297). (session->app_idcxx . . $ _XdpSession#app_id., streams, &error); |
| 995 | if (!remote) |
| 996 | { |
| 997 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 998 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 999 | G_DBUS_ERROR_FAILEDcxx . . $ G_DBUS_ERROR_FAILED., |
| 1000 | "%s", error->messagecxx . . $ _GError#message.); |
| 1001 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 1002 | } |
| 1003 | |
| 1004 | out_fd_list = g_unix_fd_list_newcxx . . $ g_unix_fd_list_new(2f03ba904a9d4e55). (); |
| 1005 | fd = pw_core_steal_fdcxx . . $ pw_core_steal_fd(363b6018a5147cb). (remote->corecxx . . $ _PipeWireRemote#core.); |
| 1006 | fd_id = g_unix_fd_list_appendcxx . . $ g_unix_fd_list_append(57b895fb290201ec). (out_fd_list, fd, &error); |
| 1007 | closecxx . . $ close(7864480464b09eea). (fd); |
| 1008 | pipewire_remote_destroycxx . . $ pipewire_remote_destroy(79f2a9067a520604). (remote); |
| 1009 | |
| 1010 | if (fd_id == -1) |
| 1011 | { |
| 1012 | g_dbus_method_invocation_return_errorcxx . . $ g_dbus_method_invocation_return_error(2860f9a06c72d77e). (invocation, |
| 1013 | G_DBUS_ERRORcxx . . $ `<external>/517763016858796244/gdbuserror.h:49:9`!, |
| 1014 | G_DBUS_ERROR_ACCESS_DENIEDcxx . . $ G_DBUS_ERROR_ACCESS_DENIED., |
| 1015 | "Failed to append fd: %s", |
| 1016 | error->messagecxx . . $ _GError#message.); |
| 1017 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 1018 | } |
| 1019 | |
| 1020 | xdp_dbus_screen_cast_complete_open_pipewire_remotecxx . . $ xdp_dbus_screen_cast_complete_open_pipewire_remote(8d942dcec83607c0). (object, invocation, |
| 1021 | out_fd_list, |
| 1022 | g_variant_new_handlecxx . . $ g_variant_new_handle(d662e1c280be90d3). (fd_id)); |
| 1023 | return G_DBUS_METHOD_INVOCATION_HANDLEDcxx . . $ `<external>/7877694576918326146/gdbusmethodinvocation.h:56:9`!; |
| 1024 | } |
| 1025 | |
| 1026 | static void |
| 1027 | screen_cast_iface_initcxx . . $ screen_cast_iface_init(b05585cbe7d1f075). (XdpDbusScreenCastIfacecxx . . $ XdpDbusScreenCastIface# *iface) |
| 1028 | { |
| 1029 | iface->handle_create_sessioncxx . . $ _XdpDbusScreenCastIface#handle_create_session. = handle_create_sessioncxx . . $ handle_create_session(a765910a66dfd28d).; |
| 1030 | iface->handle_select_sourcescxx . . $ _XdpDbusScreenCastIface#handle_select_sources. = handle_select_sourcescxx . . $ handle_select_sources(953bc2dbf00a1a9e).; |
| 1031 | iface->handle_startcxx . . $ _XdpDbusScreenCastIface#handle_start. = handle_startcxx . . $ handle_start(f80edcaec911f610).; |
| 1032 | iface->handle_open_pipewire_remotecxx . . $ _XdpDbusScreenCastIface#handle_open_pipewire_remote. = handle_open_pipewire_remotecxx . . $ handle_open_pipewire_remote(8e12eafb3c09a86).; |
| 1033 | } |
| 1034 | |
| 1035 | static void |
| 1036 | sync_supported_source_typescxx . . $ sync_supported_source_types(ed06544c3fd67da2). (ScreenCastcxx . . $ ScreenCast# *screen_cast) |
| 1037 | { |
| 1038 | unsigned int available_source_types; |
| 1039 | |
| 1040 | available_source_types = xdp_dbus_impl_screen_cast_get_available_source_typescxx . . $ xdp_dbus_impl_screen_cast_get_available_source_types(67410daabf090b4d). (implcxx . . $ impl.); |
| 1041 | xdp_dbus_screen_cast_set_available_source_typescxx . . $ xdp_dbus_screen_cast_set_available_source_types(d39954e436961140). (XDP_DBUS_SCREEN_CASTcxx . . $ `build/src/xdp-dbus.h:6908:9`! (screen_cast), |
| 1042 | available_source_types); |
| 1043 | } |
| 1044 | |
| 1045 | static void |
| 1046 | on_supported_source_types_changedcxx . . $ on_supported_source_types_changed(9f5ac59e14a9a5ae). (GObjectcxx . . $ GObject# *gobject, |
| 1047 | GParamSpeccxx . . $ GParamSpec# *pspec, |
| 1048 | ScreenCastcxx . . $ ScreenCast# *screen_cast) |
| 1049 | { |
| 1050 | sync_supported_source_typescxx . . $ sync_supported_source_types(ed06544c3fd67da2). (screen_cast); |
| 1051 | } |
| 1052 | |
| 1053 | static void |
| 1054 | sync_supported_cursor_modescxx . . $ sync_supported_cursor_modes(ed06544c3fd67da2). (ScreenCastcxx . . $ ScreenCast# *screen_cast) |
| 1055 | { |
| 1056 | |
| 1057 | available_cursor_modescxx . . $ available_cursor_modes. = xdp_dbus_impl_screen_cast_get_available_cursor_modescxx . . $ xdp_dbus_impl_screen_cast_get_available_cursor_modes(67410daabf090b4d). (implcxx . . $ impl.); |
| 1058 | xdp_dbus_screen_cast_set_available_cursor_modescxx . . $ xdp_dbus_screen_cast_set_available_cursor_modes(d39954e436961140). (XDP_DBUS_SCREEN_CASTcxx . . $ `build/src/xdp-dbus.h:6908:9`! (screen_cast), |
| 1059 | available_cursor_modescxx . . $ available_cursor_modes.); |
| 1060 | } |
| 1061 | |
| 1062 | static void |
| 1063 | on_supported_cursor_modes_changedcxx . . $ on_supported_cursor_modes_changed(9f5ac59e14a9a5ae). (GObjectcxx . . $ GObject# *gobject, |
| 1064 | GParamSpeccxx . . $ GParamSpec# *pspec, |
| 1065 | ScreenCastcxx . . $ ScreenCast# *screen_cast) |
| 1066 | { |
| 1067 | sync_supported_cursor_modescxx . . $ sync_supported_cursor_modes(ed06544c3fd67da2). (screen_cast); |
| 1068 | } |
| 1069 | |
| 1070 | static void |
| 1071 | screen_cast_initcxx . . $ screen_cast_init(ed06544c3fd67da2). (ScreenCastcxx . . $ ScreenCast# *screen_cast) |
| 1072 | { |
| 1073 | xdp_dbus_screen_cast_set_versioncxx . . $ xdp_dbus_screen_cast_set_version(d39954e436961140). (XDP_DBUS_SCREEN_CASTcxx . . $ `build/src/xdp-dbus.h:6908:9`! (screen_cast), 5); |
| 1074 | |
| 1075 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (impl, "notify::supported-source-types", |
| 1076 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_supported_source_types_changed), |
| 1077 | screen_cast); |
| 1078 | if (impl_versioncxx . . $ impl_version. >= 2) |
| 1079 | { |
| 1080 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (impl, "notify::supported-cursor-modes", |
| 1081 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (on_supported_cursor_modes_changed), |
| 1082 | screen_cast); |
| 1083 | } |
| 1084 | sync_supported_source_typescxx . . $ sync_supported_source_types(ed06544c3fd67da2). (screen_cast); |
| 1085 | sync_supported_cursor_modescxx . . $ sync_supported_cursor_modes(ed06544c3fd67da2). (screen_cast); |
| 1086 | } |
| 1087 | |
| 1088 | static void |
| 1089 | screen_cast_class_initcxx . . $ screen_cast_class_init(c6d5f75298190799). (ScreenCastClasscxx . . $ ScreenCastClass# *klass) |
| 1090 | { |
| 1091 | quark_request_sessioncxx . . $ quark_request_session. = |
| 1092 | g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("-xdp-request-screen-cast-session"); |
| 1093 | } |
| 1094 | |
| 1095 | GDBusInterfaceSkeletoncxx . . $ GDBusInterfaceSkeleton# * |
| 1096 | screen_cast_createcxx . . $ screen_cast_create(e35f8a0759ac8f9a). (GDBusConnectioncxx . . $ GDBusConnection# *connection, |
| 1097 | const char *dbus_name) |
| 1098 | { |
| 1099 | g_autoptrcxx . . $ `<external>/12741050725406041920/gmacros.h:1424:9`!(GError) error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1100 | |
| 1101 | implcxx . . $ impl. = xdp_dbus_impl_screen_cast_proxy_new_synccxx . . $ xdp_dbus_impl_screen_cast_proxy_new_sync(ea79020cee53bbf). (connection, |
| 1102 | G_DBUS_PROXY_FLAGS_NONEcxx . . $ G_DBUS_PROXY_FLAGS_NONE., |
| 1103 | dbus_name, |
| 1104 | DESKTOP_PORTAL_OBJECT_PATHcxx . . $ `src/xdp-utils.h:37:9`!, |
| 1105 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1106 | &error); |
| 1107 | if (implcxx . . $ impl. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1108 | { |
| 1109 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:365:9`! ("Failed to create screen cast proxy: %s", error->message); |
| 1110 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1111 | } |
| 1112 | |
| 1113 | impl_versioncxx . . $ impl_version. = xdp_dbus_impl_screen_cast_get_versioncxx . . $ xdp_dbus_impl_screen_cast_get_version(67410daabf090b4d). (implcxx . . $ impl.); |
| 1114 | |
| 1115 | g_dbus_proxy_set_default_timeoutcxx . . $ g_dbus_proxy_set_default_timeout(c68bf28eca88e1d4). (G_DBUS_PROXYcxx . . $ `<external>/4635717660623816082/gdbusproxy.h:36:9`! (impl), G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!); |
| 1116 | |
| 1117 | screen_castcxx . . $ screen_cast. = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (screen_cast_get_typecxx . . $ screen_cast_get_type(f708dce9a8856c70). (), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1118 | |
| 1119 | return G_DBUS_INTERFACE_SKELETONcxx . . $ `<external>/1991948168568871819/gdbusinterfaceskeleton.h:32:9`! (screen_cast); |
| 1120 | } |
| 1121 | |
| 1122 | static void |
| 1123 | screen_cast_session_closecxx . . $ screen_cast_session_close(ac695378ab375fe8). (XdpSessioncxx . . $ XdpSession# *session) |
| 1124 | { |
| 1125 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (session); |
| 1126 | |
| 1127 | screen_cast_session->statecxx . . $ _ScreenCastSession#state. = SCREEN_CAST_SESSION_STATE_CLOSEDcxx . . $ SCREEN_CAST_SESSION_STATE_CLOSED.; |
| 1128 | |
| 1129 | xdp_session_persistence_generate_and_save_restore_tokencxx . . $ xdp_session_persistence_generate_and_save_restore_token(2087e7161d3dc2ca). (session, |
| 1130 | SCREEN_CAST_TABLEcxx . . $ `src/screen-cast.c:43:9`!, |
| 1131 | screen_cast_session->persist_modecxx . . $ _ScreenCastSession#persist_mode., |
| 1132 | &screen_cast_session->restore_tokencxx . . $ _ScreenCastSession#restore_token., |
| 1133 | &screen_cast_session->restore_datacxx . . $ _ScreenCastSession#restore_data.); |
| 1134 | |
| 1135 | g_debugcxx . . $ `<external>/5169755362661750954/gmessages.h:371:9`! ("screen cast session owned by '%s' closed", session->sender); |
| 1136 | } |
| 1137 | |
| 1138 | static void |
| 1139 | screen_cast_session_finalizecxx . . $ screen_cast_session_finalize(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 1140 | { |
| 1141 | ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session = SCREEN_CAST_SESSIONcxx . . $ SCREEN_CAST_SESSION(bb494f4eac1ba585). (object); |
| 1142 | |
| 1143 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&screen_cast_session->restore_token, g_free); |
| 1144 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&screen_cast_session->restore_data, g_variant_unref); |
| 1145 | |
| 1146 | g_list_free_fullcxx . . $ g_list_free_full(5ba5b0738c7ed753). (screen_cast_session->streamscxx . . $ _ScreenCastSession#streams., |
| 1147 | (GDestroyNotifycxx . . $ GDestroyNotify#)screen_cast_stream_freecxx . . $ screen_cast_stream_free(6f144c91b7a728b0).); |
| 1148 | |
| 1149 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (screen_cast_session_parent_class)->finalizecxx . . $ _GObjectClass#finalize. (object); |
| 1150 | } |
| 1151 | |
| 1152 | static void |
| 1153 | screen_cast_session_initcxx . . $ screen_cast_session_init(801da160860b872a). (ScreenCastSessioncxx . . $ ScreenCastSession# *screen_cast_session) |
| 1154 | { |
| 1155 | } |
| 1156 | |
| 1157 | static void |
| 1158 | screen_cast_session_class_initcxx . . $ screen_cast_session_class_init(11552f3536b760d6). (ScreenCastSessionClasscxx . . $ ScreenCastSessionClass# *klass) |
| 1159 | { |
| 1160 | GObjectClasscxx . . $ GObjectClass# *object_class; |
| 1161 | XdpSessionClasscxx . . $ XdpSessionClass# *session_class; |
| 1162 | |
| 1163 | object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass); |
| 1164 | object_class->finalizecxx . . $ _GObjectClass#finalize. = screen_cast_session_finalizecxx . . $ screen_cast_session_finalize(6087475fa43034d3).; |
| 1165 | |
| 1166 | session_class = (XdpSessionClasscxx . . $ XdpSessionClass# *)klass; |
| 1167 | session_class->closecxx . . $ _XdpSessionClass#close. = screen_cast_session_closecxx . . $ screen_cast_session_close(ac695378ab375fe8).; |
| 1168 | } |