<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello David,<br>
<br>
Thank you for the answer and yes, I've read the documentation.<br>
Though I still don't understand how shall I proceed to achieve my
goal i.e. <b>atomic acquirement</b> of service name on D-Bus.<br>
<br>
as I wrote the <br>
<br>
id = g_bus_own_name_on_connection(...);<br>
wait_for_handler(s) <br>
<br>
is for me rather strange solution, beside of this it creates a time
window where other application can register the name.<br>
Shall I really wait for these callbacks? The documentation states
"callbacks will be invoked after calling this function" - does it
mean immediately after calling this function?<br>
What I still don't have my main loop started and the decision if to
start it depends on result of this method? <br>
<br>
For me the simple and clean solution would be:<br>
returns 0 - failure name already on use<br>
returns > 0 - OK success name acquired<br>
<br>
Thank you for your help,<br>
<br>
regards,<br>
<br>
Bogdan<br>
<br>
<br>
<br>
On 7/30/2013 19:34, David Zeuthen wrote:
<blockquote
cite="mid:CAHkOivQrpZ0uJCrO2h15WRYqbyfOQNDyTD9FieDFs3uC2Mcq8w@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>Did you read the docs? They're here, FWIW
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://developer.gnome.org/gio/unstable/gio-Owning-Bus-Names.html#g-bus-own-name">https://developer.gnome.org/gio/unstable/gio-Owning-Bus-Names.html#g-bus-own-name</a></div>
<div>
<div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Also, I wouldn't worry about the
return value, it's just an opaque identifier (that
happens to be monotonically increasing - and always
starting at 1).</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Hope this helps.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"> David</div>
<div class="gmail_extra"><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>