<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt">hi<br><br>many thanks for your answers.<br>If I have enough time for that I'll try to do like that (as it's needed to do relatively painless task to be harbour compliant), for the moment I should concentrate to other functionalities of my app.<br><br>Regards,<br>Frédéric<br><br><div><span><br></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 10pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> Le Jeudi 20 mars 2014 14h09, Arvid Fahlström Myrman <behold@behold.se> a écrit :<br> </font> </div>  <div class="y_msg_container">I've been
 using nemo-keepalive's DisplayBlanking <br clear="none">(<a shape="rect" href="https://github.com/nemomobile/nemo-keepalive" target="_blank">https://github.com/nemomobile/nemo-keepalive</a>) as per Ove's recommendation <br clear="none">earlier in this thread. I did have to write my own qmake project file to be <br clear="none">able to compile nemo-keepalive and place it in the correct directory without <br clear="none">having to make any changes to the actual nemo-keepalive repository, but that <br clear="none">was a relatively painless task. If you're interested, here's the project file: <br clear="none"><a shape="rect" href="https://gist.github.com/BeholdMyGlory/9662866" target="_blank">https://gist.github.com/BeholdMyGlory/9662866</a><br clear="none"><br clear="none">If you want to use it (I'm going to assume that you're already using git here, <br clear="none">if not just replace 'submodule add' with 'clone'), just run the following <br
 clear="none">somewhere in your repository:<br clear="none"><br clear="none">git submodule add <a shape="rect" href="https://github.com/nemomobile/nemo-keepalive.git" target="_blank">https://github.com/nemomobile/nemo-keepalive.git</a><br clear="none">git submodule add <a shape="rect" href="https://github.com/nemomobile/libiphb.git" target="_blank">https://github.com/nemomobile/libiphb.git</a><br clear="none"><br clear="none">Then place nemo-keepalive.pro and the qmldir file to the same directory. Make <br clear="none">sure that you replace "PROJECT_NAME_HERE" with your actual project name (sans <br clear="none">'harbour-') on line 8 and 14 in nemo-keepalive.pro and on the first line in the <br clear="none">qmldir file. Then make sure that your main project file has the 'subdirs' <br clear="none">template, and add nemo-keepalive.pro to the SUBDIRS variable. Once compiled <br clear="none">and installed, you should be able to import the plugin using
 "import <br clear="none">harbour.PROJECT_NAME_HERE.keepalive 1.0", after which you can set <br clear="none">DisplayBlanking.preventBlanking to true whenever you want to prevent the <br clear="none">device from sleeping.<br clear="none"><br clear="none">You may need to have libiphb-devel installed in order for the iphb-related <br clear="none">files to compile, as the include paths are probably off.<br clear="none"><br clear="none">Regards,<br clear="none">Arvid<br clear="none"><div class="yqt1423445192" id="yqtfd81988"><br clear="none">On Thursday 20 March 2014 06:35:52 frances frederic wrote:<br clear="none">> hi all<br clear="none">> <br clear="none">> I've used dbus package to prevent jolla from sleeping using same code as<br clear="none">> /usr/lib/qt5/qml/Sailfish/Media/ScreenBlank.qml  but it seems to be not<br clear="none">> allwed by jolla validation team when submitting to harbour. ERROR<br clear="none">>
 [/usr/share/harbour-upnpplayer/qml/pages/FirstPage.qml] Import<br clear="none">> 'org.nemomobile.dbus 1.0' is not allowed<br clear="none">> <br clear="none">> is there a qml alternative to prevent jolla from sleeping?<br clear="none">> <br clear="none">> regards,<br clear="none">> Frédéric<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> Le Vendredi 21 février 2014 0h29, Ove Kåven <<a shape="rect" ymailto="mailto:ovek@arcticnet.no" href="mailto:ovek@arcticnet.no">ovek@arcticnet.no</a>> a écrit :<br clear="none">> <br clear="none">> Den 20. feb. 2014 19:16, skrev Arvid Fahlström Myrman:<br clear="none">> > Well, I've at least solved the first problem by implementing a timer<br clear="none">> > similar to the one used by ScreenBlank in Sailfish.Media (see<br clear="none">> >
 /usr/lib/qt5/qml/Sailfish/Media/ScreenBlank.qml for reference), and it<br clear="none">> > seems to work properly. I wonder though, how are we developers supposed<br clear="none">> > to know about these DBus services? Are they documented somewhere?<br clear="none">> <br clear="none">> Similar questions have already been answered in the past on this list,<br clear="none">> at least. From the answers I got earlier, I understand that<br clear="none">> <br clear="none">> - all the MCE D-Bus calls are documented in<br clear="none">> <a shape="rect" href="https://github.com/nemomobile/mce-dev/blob/master/include/mce/dbus-names.h" target="_blank">https://github.com/nemomobile/mce-dev/blob/master/include/mce/dbus-names.h</a><br clear="none">> <br clear="none">> - there's a more friendly API under development at<br clear="none">> <a shape="rect" href="https://github.com/nemomobile/nemo-keepalive,"
 target="_blank">https://github.com/nemomobile/nemo-keepalive, </a>which seems to have both<br clear="none">> C++ and QML interfaces (which both does exactly what you're asking for,<br clear="none">> including telling you when the screen goes blank). Presumably, when it's<br clear="none">> ready and deployed, that is what Jolla will tell developers about, and<br clear="none">> allow imports of.<br clear="none">> <br clear="none">> In the meantime, you may just have to write some C++ code that you can<br clear="none">> use from your QML (or copy what you need of that nemo-keepalive into<br clear="none">> your C++ code).<br clear="none">> <br clear="none">> <br clear="none">> _______________________________________________<br clear="none">> SailfishOS.org Devel mailing list<br clear="none"><br clear="none">_______________________________________________<br clear="none">SailfishOS.org Devel mailing
 list</div><br><br></div>  </div> </div>  </div> </div></body></html>