<br><br>
<div class="gmail_quote">2009/7/7 Kevin Ottens <span dir="ltr">&lt;<a href="mailto:ervin@kde.org">ervin@kde.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Thursday 2 July 2009 22:15:07 Ozan Çağlayan wrote:<br>&gt; Where can I find the complete reference of the predicate rules used in<br>&gt; solid device action files?<br><br></div>It&#39;s currently missing. And for sure it&#39;d deserve a page on techbase.<br>
Unfortunately no one stepped up for it yet, and I&#39;m lacking the time and<br>motivation to do it myself.<br><br>The syntax is quite simple though, there&#39;s not that many constructs:<br> * &quot;[ termA OR termB ]&quot; or &quot;[ termA AND termB ]&quot; for logical combinations;<br>
 * &quot;Interface.property == value&quot; to match a given value for a given property<br>if the given Interface is supported by the device;<br> * &quot;Interface.property &amp; value&quot; to match a given value but using the binary<br>
AND operator (checking if property has the value flag set).<br><br>And then the | operator that you ask for below:<br>
<div class="im"><br>&gt; I&#39;m seeing different usages of different<br>&gt; operators in many projects but I can&#39;t get the expected results when I<br>&gt; evaluate them using solid-hardware. One such example is the pipe operator:<br>
&gt;<br>&gt; $ solid-hardware query &quot;foo.bar == &#39;PropertyX|PropertyY&#39;&quot;<br><br></div>Those are enums/flags values, so the syntax closely follow the C++ one by<br>using a binary OR operator (pipe operator in C/C++).<br>

<div class="im"><br>&gt; looking at it, one can think that | acts like an OR operator between<br>&gt; PropertyX and PropertyY but that doesn&#39;t work in that way, so I wonder<br>&gt; what&#39;s the aim of that operator.<br>
<br></div>It exactly acts like an OR operator, but the binary one so foo.bar == &#39;X|Y&#39;<br>means that foo.bar should have both X and Y.<br></blockquote>
<div>I committed an example called tutorial7 under the examples folder that should be a good starting point.</div>
<div>Chris</div></div>