|
FreeRDP
|
#include <freerdp/config.h>#include <stddef.h>#include <winpr/assert.h>#include <winpr/error.h>#include <winpr/synch.h>#include <winpr/wlog.h>#include <freerdp/log.h>#include <freerdp/wts_services.h>#include "plugin_services.h"Go to the source code of this file.
Macros | |
| #define | TAG FREERDP_TAG("core.services") |
Functions | |
| static WINPR_ATTR_NODISCARD IWTSWindowInfoService * | client_window_info (CPluginServiceProvider *sp) |
| the client's window info service, a reference for the caller; nullptr if it has none or the provider is detached | |
| static HRESULT WINPR_COM_CALL | CWindowChangedRelay_OnWindowChanged (IWTSWindowChangedCallback *This, const WTS_WINDOW_INFO *windowInfo) |
| static void | CWindowChangedRelay_free (wComBase *object) |
| static WINPR_ATTR_NODISCARD CWindowChangedRelay * | CWindowChangedRelay_new (CPluginServiceProvider *sp) |
| static WINPR_ATTR_NODISCARD HRESULT | shared_subscribe (CPluginServiceProvider *sp, UINT64 remoteHwnd) |
| subscribes to the client's service; subscribeLock held | |
| static void | shared_unsubscribe (CPluginServiceProvider *sp) |
| ends the subscription to the client's service, if any; subscribeLock held | |
| static WINPR_ATTR_NODISCARD IWTSWindowChangedCallback * | proxy_unlink (CWindowInfoServiceProxy *p, BOOL *last) |
| removes p from the subscribers; its callback is returned (the reference with it). subscribeLock held | |
| static HRESULT WINPR_COM_CALL | CWindowInfoServiceProxy_GetWindowInfo (IWTSWindowInfoService *This, UINT64 remoteHwnd, WTS_WINDOW_INFO *windowInfo) |
| static HRESULT WINPR_COM_CALL | CWindowInfoServiceProxy_GetProcessId (IWTSWindowInfoService *This, DWORD *processId) |
| static HRESULT WINPR_COM_CALL | CWindowInfoServiceProxy_GetRdpSessionType (IWTSWindowInfoService *This, UINT32 *sessionType) |
| static HRESULT WINPR_COM_CALL | CWindowInfoServiceProxy_SubscribeWindowChanged (IWTSWindowInfoService *This, UINT64 remoteHwnd, IWTSWindowChangedCallback *callback) |
| static HRESULT | unsubscribe (CWindowInfoServiceProxy *p) |
| static HRESULT WINPR_COM_CALL | CWindowInfoServiceProxy_UnsubscribeWindowChanged (IWTSWindowInfoService *This) |
| static void | CWindowInfoServiceProxy_free (wComBase *object) |
| static WINPR_ATTR_NODISCARD CWindowInfoServiceProxy * | CWindowInfoServiceProxy_new (CPluginServiceProvider *sp) |
| static HRESULT WINPR_COM_CALL | CPluginServiceProvider_GetService (IWTSPluginServiceProvider *This, GUID ServiceId, wIUnknown **ppunkObject) |
| static void | CPluginServiceProvider_free (wComBase *object) |
| IWTSPluginServiceProvider * | plugin_services_new (rdpContext *context) |
| the context's IWTSPluginServiceProvider (rdpContext::pluginServiceProvider), one reference for the caller | |
| void | plugin_services_detach (IWTSPluginServiceProvider *provider) |
| cuts the provider from the context's client services, before the client frees them (ContextFree): the shared window change subscription is dropped, and the services handed out then answer E_UNEXPECTED. Channels and plugins may still hold them. | |
Variables | |
| static const IWTSWindowChangedCallbackVtbl | CWindowChangedRelay_vtbl |
| static const IWTSWindowInfoServiceVtbl | CWindowInfoServiceProxy_vtbl |
| static const IWTSPluginServiceProviderVtbl | CPluginServiceProvider_vtbl |
rdpContext::pluginServiceProvider: GetService() as Microsoft's clients answer it, on top of the services the client put in the context.
Microsoft's GetService(RDCLIENT_WINDOW_INFO_SERVICE) creates a new IWTSWindowInfoService on each call, with one change subscriber per object (UnsubscribeWindowChanged() says nobody's). The client implements a single object with these rules; each caller gets a proxy here, and the proxies' subscriptions share one subscription to the client's object, made while at least one proxy is subscribed.
Locking: lock protects the context pointer and the subscriber list, and is never held while calling out. subscribeLock serializes the calls to the client's Subscribe/Unsubscribe (which Microsoft's client runs synchronously on its core thread); change notifications don't take it, so a client may notify from any thread while subscribing.
Definition in file plugin_services.c.
| #define TAG FREERDP_TAG("core.services") |
FreeRDP: A Remote Desktop Protocol Implementation Services for virtual channel plugins
Copyright 2026 David Fort conta.nosp@m.ct@h.nosp@m.arden.nosp@m.ing-.nosp@m.consu.nosp@m.ltin.nosp@m.g.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition at line 34 of file plugin_services.c.
|
static |
the client's window info service, a reference for the caller; nullptr if it has none or the provider is detached
Definition at line 88 of file plugin_services.c.
Referenced by shared_subscribe().

|
static |
Definition at line 435 of file plugin_services.c.
|
static |
Definition at line 383 of file plugin_services.c.
|
static |
Definition at line 146 of file plugin_services.c.
|
static |
Definition at line 154 of file plugin_services.c.
|
static |
Definition at line 105 of file plugin_services.c.
|
static |
Definition at line 357 of file plugin_services.c.
|
static |
Definition at line 260 of file plugin_services.c.
|
static |
Definition at line 272 of file plugin_services.c.
|
static |
Definition at line 247 of file plugin_services.c.
|
static |
Definition at line 367 of file plugin_services.c.
|
static |
Definition at line 284 of file plugin_services.c.
|
static |
Definition at line 343 of file plugin_services.c.
| void plugin_services_detach | ( | IWTSPluginServiceProvider * | provider | ) |
cuts the provider from the context's client services, before the client frees them (ContextFree): the shared window change subscription is dropped, and the services handed out then answer E_UNEXPECTED. Channels and plugins may still hold them.
Definition at line 494 of file plugin_services.c.
References shared_unsubscribe().

| IWTSPluginServiceProvider * plugin_services_new | ( | rdpContext * | context | ) |
the context's IWTSPluginServiceProvider (rdpContext::pluginServiceProvider), one reference for the caller
FreeRDP: A Remote Desktop Protocol Implementation Services for virtual channel plugins
Copyright 2026 David Fort conta.nosp@m.ct@h.nosp@m.arden.nosp@m.ing-.nosp@m.consu.nosp@m.ltin.nosp@m.g.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition at line 446 of file plugin_services.c.
References winpr_com_base_init().

|
static |
removes p from the subscribers; its callback is returned (the reference with it). subscribeLock held
Definition at line 223 of file plugin_services.c.
|
static |
subscribes to the client's service; subscribeLock held
Definition at line 170 of file plugin_services.c.
References client_window_info(), TAG, and winpr_com_base_release().

|
static |
ends the subscription to the client's service, if any; subscribeLock held
Definition at line 202 of file plugin_services.c.
References TAG, and winpr_com_base_release().
Referenced by plugin_services_detach().


|
static |
Definition at line 319 of file plugin_services.c.
|
static |
Definition at line 430 of file plugin_services.c.
|
static |
Definition at line 141 of file plugin_services.c.
|
static |
Definition at line 348 of file plugin_services.c.