[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KNotificationAreaItem
From:       Thomas =?iso-8859-15?q?L=FCbking?= <thomas.luebking () web ! de>
Date:       2009-04-20 23:33:38
Message-ID: 200904210133.39068.thomas.luebking () web ! de
[Download RAW message or body]

Am Tuesday 21 April 2009 schrieb Thiago Macieira:
> Thomas Lübking wrote:
> >of course you could check all services whether they provide certain
> > objects providing certain functions, but that's
> >a) heuristic
> >b) not necessarily efficient...
>
> c) not possible

a) "object" was meant := "path" (sorry, my fault)
you'd have to recurse parse org.freedesktop.DBus.Introspectable.Introspect

PoC (... and i even added linebreaks):

--- snip ---
for service in $(qdbus | grep org.kde); do
   if qdbus "$service" | grep "/MainApplication" > /dev/null 2>&1; then 
      if qdbus "$service" /MainApplication | grep 
"org.kde.KApplication.quit()" > /dev/null 2>&1; then 
         echo "$service has quittable kde mainapplication"
      fi
   fi
done
--- snip ---

:-P

at least that was what i meant to identify a service to be heuristically 
sufficient - and "inefficient" as well...

(in case that was not clear in the first mail: this is no sane solution at 
all)

Thomas

[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'Segoe'; font-size:10pt; font-weight:400; \
font-style:normal;">Am Tuesday 21 April 2009 schrieb Thiago Macieira:<br> &gt; Thomas \
Lübking wrote:<br> &gt; &gt;of course you could check all services whether they \
provide certain<br> &gt; &gt; objects providing certain functions, but that's<br>
&gt; &gt;a) heuristic<br>
&gt; &gt;b) not necessarily efficient...<br>
&gt;<br>
&gt; c) not possible<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>a) "object" was meant := "path" (sorry, my fault)<br> \
you'd have to recurse parse org.freedesktop.DBus.Introspectable.Introspect<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>PoC \
(... and i even added linebreaks):<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>--- snip ---<br> for \
service in $(qdbus | grep org.kde); do<br>  if qdbus "$service" | grep \
                "/MainApplication" &gt; /dev/null 2&gt;&amp;1; then <br>
      if qdbus "$service" /MainApplication | grep "org.kde.KApplication.quit()" &gt; \
/dev/null 2&gt;&amp;1; then <br>  echo "$service has quittable kde \
mainapplication"<br>  fi<br>
   fi<br>
done<br>
--- snip ---<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>:-P<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>at least that was \
what i meant to identify a service to be heuristically sufficient - and "inefficient" \
as well...<br> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>(in case that was not clear in the first mail: this is no \
sane solution at all)<br> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;"><br></p>Thomas</p></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic