<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 20, 2014 at 12:11 PM, Simon McVittie <span dir="ltr"><<a href="mailto:simon.mcvittie@collabora.co.uk" target="_blank">simon.mcvittie@collabora.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">If someone reimplemented D-Bus over Win32 named pipes or something, it<br>
</div>
might be possible for that reimplementation to do something analogous<br>
to fd passing (HANDLE passing?), </blockquote><div><br></div><div><div>Just for the record, Windows does allow passing HANDLEs over named pipes and this was discussed when file-descriptor passing was introduced and care was taken to ensure that the 'h' type could be re-used for such an implementation (I think Lennart initially wanted to use another letter for the type but chose 'h' maybe because the word HANDLE was thrown around. I can't remember.). That's also the reason why the fd-passing in GDBus is unix-specific e.g.</div>
<div><br></div><div> g_dbus_connection_call_with_unix_fd_list()</div><div><br></div><div>and the GUnixFDList type and the org.gtk.GDBus.C.UnixFD annotation for gdbus-codegen(1) which are also unix-specific things.</div><div>
<br></div><div>So if someone were to implement GDBus over named pipes (which shouldn't be too much work), I'd expect we'd add something like</div><div><br></div><div> g_dbus_connection_call_with_win32_handle_list()</div>
<div><br></div><div>and introduce a similar GWin32HandleList type and org.gtk.GDBus.C.Win32HANDLE annotation + other porcelain (e.g. GDBusProxy + friends) to make things work.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
but that reimplementation wouldn't<br>
necessarily look much like D-Bus any more.<br></blockquote><div><br></div><div>The implementation I sketched above (D-Bus + win32-HANDLE-passing) would look as much as D-Bus as D-Bus + unix-fd-passing does. But, sure, the program would need to have #ifdefs for whether to use GUnixFDList or GWin32HandleList.</div>
<div><br></div><div>    David</div><div><br></div></div></div></div>