Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 8733295824cb8633b29dede17b1d614e > files > 160

anyremote-doc-6.4-3.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

	<title>anyRemote &middot; Control your computer with your phone</title>

	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<meta name="description" content="anyRemote project page - Bluetooth remote control tool" />

	<link rel="stylesheet" href="data/master.css" type="text/css" media="all" title="Default Style" charset="utf-8" />
	<script src="data/effects.js" type="text/javascript" charset="utf-8"></script>

	<link rel="alternate" title="Feed" href="data/feed.xml" type="application/rss+xml" />

	<link rel="icon" href="data/logo-favicon.png" type="image/png" />
	<link rel="shortcut icon" href="data/logo-favicon.png" type="image/png" />

</head>

<body id="docs">

	<a class="skip" name="top">&nbsp;</a>
	<a class="skip" href="#content">Skip to content</a>

	<div id="head">
		<div id="logo">
			<h1><a href="index.html"><img src="data/logo-head.png" alt="logo" /> anyRemote</a></h1>
		</div>
		<div id="navigation"><div class="padding">
			<a href="index.html"><span>About</span></a>
			<a href="frontend.html"><span>Screenshots</span></a>
			<a href="dload.html"><span>Download</span></a>
			<a href="docs.html" class="active"><span>Documentation</span></a>
			<a href="faq.html"><span>FAQ</span></a>
			<a href="contacts.html"><span>Contact</span></a>
			<a href="thanks.html"><span>Special Thanks</span></a>
		</div></div>
	</div>

	<div id="sidebar"><div class="padding">
		<dl class="info">
			<dt>Information</dt>
			<dd>
				<p>Please use the two sidebar boxes below to browse through the anyRemote Documentation!</p>
			</dd>
		</dl>
		<dl class="docs">
			<dt>Documentation</dt>
			<dd>
				<ul>
					<li><a href="pre-setup.html">Before install</a></li>
					<li><a href="pre.html">Software prerequisites</a></li>
					<li><a href="install.html">Compilation and installation</a></li>
					<li><a href="mode.html">Which mode to choose ?</a></li>
					<li><strong>Setup</strong>
						<ul>
							<li><a href="setup-at.html">Setup: AT mode</a>
								<ul>
									<li><a href="event.html">Event reporting</a></li>
									<li><a href="ckpd-emulation.html">Keypad emulation events</a></li>
								</ul>
							</li>
							<li><a href="setup-server.html">Setup: Server mode</a></li>
						</ul>
					</li>
					<li><a href="use.html">How to use anyRemote</a>
						<ul>
							<li><a href="android-client.html">Android Client</a></li>
							<li><a href="use-jc.html">J2ME Client</a></li>
							<li><a href="web.html">Web Interface</a></li>
							<li><a href="cm-xml.html">XML Services Interface</a></li>
							<li><a href="cfg-howto.html">How to create simple configuration file</a></li>
							<li><a href="bemused.html">Bemused Support</a></li>
							<li><a href="iviewer.html">Command Fusion iViewer support</a></li>
						</ul>
					</li>
					<li><a href="devices.html">Tested devices</a></li>
					<li><a href="phones.html">Phone specific details</a></li>
					<li><a href="tips-tricks.html">Tips &amp; tricks</a></li>
					<li><a href="man.html">Man page</a></li>
				</ul>
			</dd>
		</dl>
		<dl class="docs-advanced">
			<dt>Advanced</dt>
			<dd>
				<ul>
					<li><a href="http://elpraga.bshellz.net/HOWTOstartanyRemoteatboottime.html">miniHOWTO: start anyRemote at boot time and create a multimedia computer</a> (externally maintained)</li>
					<li><strong>Format of configuration files</strong>
						<ul>
							<li><strong>Server mode</strong>
								<ul>
									<li><a href="conf-server.html">Configuration file format</a></li>
									<li><a href="conf-server-ex.html">Configuration file examples</a></li>

									<li><a href="set.html">Set(...) / ExecAndSet(...) commands</a></li>
									<li><a href="set-fm.html">Set(filemanager ... ) command</a></li>
									<li><a href="set-icons.html">Set(icons ...) command and available icon set</a></li>
									<li><a href="set-list.html">Set(list ... ) and Set(iconlist ... ) commands</a></li>
									<li><a href="set-menu.html">Set(menu ... ) command</a></li>
									<li><a href="set-parameter.html">Set(parameter, ... ) commands</a></li>
									<li><a href="set-text.html">Set(text ... ) command</a></li>
									<li><a href="set-window.html">Set(image ... ) command</a></li>
								</ul>
							</li>
							<li><strong>AT mode</strong>
								<ul>
									<li><a href="conf-at.html">Configurational file format</a></li>
									<li><a href="conf-at-ex.html">Configurational file examples</a></li>
								</ul>
							</li>
							<li><strong>Common</strong>
								<ul>
									<li><a href="make.html">Make(...) command</a></li>
									<li><a href="emulate.html">Emulate(...) command</a></li>
									<li><a href="dbus.html">Dbus(...) command</a></li>
									<li><a href="vars.html">Variable substitution</a></li>
									<li><a href="ev-handlers.html">Event handlers</a></li>
									<li><a href="icon-themes.html">Icon themes for J2ME client</a></li>
								</ul>
							</li>
						</ul>
					</li>
				        <li><a href="ir.html">anyRemote and InfraRed</a></li>
				</ul>
			</dd>
		</dl>
		<dl class="contact">
			<dt>Contact</dt>
			<dd>
				<p>We will be pleased for any questions, suggestions, patches and examples of configuration files!</p>
				<ul>
					<li>Post in the <a href="http://sourceforge.net/forum/?group_id=162923">Forum</a></li>
					<li>Please, send e-mails to  <a href="mailto:anyremote&#64;mail&#46;ru">anyremote&#64;mail&#46;ru</a></li>
				</ul>
			</dd>
		</dl>
		<!--HOSTINGLOGO-->
	</div></div> <!-- sidebar -->

	<div id="content"><div class="padding">

		<a class="skip" name="content">&nbsp;</a>

		<h1>Dbus(...) command</h1>

		<p>This command used to support <a href="http://www.freedesktop.org/wiki/Software/dbus">D-BUS</a> natively.</p>
	
		<h2 class="clear">Format description</h2> 

		<pre>Dbus(connect,_id_,_service_,_path_,_interface_)
Dbus(set,_id_,_method_,[int|uint|double|bool|string,_value_])
Dbus(get,_id_,_method_,int|double|bool|string,_variable_name_)
Dbus(signal,_id_,_method_,_int|double|bool|string,_callback_key_)
Dbus(close,_id_)</pre>



		<p>Several examples:</p>
		<pre>(Connect)=Dbus(connect,rhythmbox_connection,\
                org.gnome.Rhythmbox,\
                /org/gnome/Rhythmbox/Player,\
                org.gnome.Rhythmbox.Player);
(Disconnect)=Dbus(close,rhythmbox_connection);

1=Dbus(set,rhythmbox_connection,previous);
3=Dbus(set,rhythmbox_connection,next);

% rewind +/-10 seconds
4=Dbus(get,rhythmbox_connection,getElapsed,uint,elapsed);\
	Make(var,elapsed,echo "$(elapsed)-10"|bc);\
	Dbus(set,rhythmbox_connection,setElapsed,uint,$(elapsed));
6=Dbus(get,rhythmbox_connection,getElapsed,uint,elapsed);\
	Make(var,elapsed,echo "$(elapsed)+10"|bc);\
	Dbus(set,rhythmbox_connection,setElapsed,uint,$(elapsed));
        
0=Dbus(signal,rhythmbox_connection,playingUriChanged,string,RHYTHMBOX_SETTITLE);
RHYTHMBOX_SETTITLE=ExecAndSet(title,rhythmbox-client --print-playing);</pre>

		<h2>Dbus(connect,...)</h2> 
		<p>This command used to establish permanent <a href="http://www.freedesktop.org/wiki/Software/dbus">D-BUS</a> connection.</p>
		<pre>(Connect)=Dbus(connect,rhythmbox_connection,\
                org.gnome.Rhythmbox,\
                /org/gnome/Rhythmbox/Player,\
                org.gnome.Rhythmbox.Player);</pre>
                
		<h2>Dbus(close,...)</h2> 
		<p>This command used to close existing <a href="http://www.freedesktop.org/wiki/Software/dbus">D-BUS</a> connection.</p>
		<pre>(Connect)=Dbus(close,rhythmbox_connection);</pre>
                
		<h2>Dbus(set,...)</h2> 
		<p>This command used to invoke some method on existing <a href="http://www.freedesktop.org/wiki/Software/dbus">D-BUS</a> connection.
                Called method can not have more than one input parameter. 
                Only int, uint, double, bool or string parameters are supported. 
                Called method can not return any values.</p>
		<pre>1=Dbus(set,rhythmbox_connection,previous);
2=Dbus(set,rhythmbox_connection,setElapsed,uint,$(elapsed_time));</pre>
		
		<h2>Dbus(get,...)</h2> 
		<p>This command used to invoke some method which can returns some value on existing <a href="http://www.freedesktop.org/wiki/Software/dbus">D-BUS</a> connection.
                Called method can not have input parameters. Only int, uint, double, bool or string return values are supported.</p>
		<pre>3=Dbus(get,rhythmbox_connection,getElapsed,uint,elapsed);\
  Exec(echo "Elapsed time is $(elapsed)");</pre>

		<h2>Dbus(signal,...)</h2> 
		<p>This command used to register signal handler on existing <a href="http://www.freedesktop.org/wiki/Software/dbus">D-BUS</a> connection. A specified key definition
                will be searched upon receiving of the signal.</p>
		<pre>0=Dbus(signal,rhythmbox_connection,playingUriChanged,string,RHYTHMBOX_SETTITLE);
RHYTHMBOX_SETTITLE=ExecAndSet(title,rhythmbox-client --print-playing);</pre>
		
                <h2>How to find appropriate <a href="http://www.freedesktop.org/wiki/Software/dbus">D-BUS</a> methods ?</h2> 
                
                <p>The simplest way to do that is to use <a href="http://usrlocalbin.blogspot.com/2008/04/qdbus-tutorial-part-one.html"><strong>qdbus</strong></a> utility.</p> 
		
		<p>Just run <strong>qdbus</strong> to see something like:</p>
		<pre>qdbus
:1.1
org.kde.klauncher
:1.10
org.kde.knotify
...
org.kde.juk
...
org.kde.kmix
...</pre>
		<p>Then run <strong>qdbus org.kde.juk</strong> to see available interfaces of Juk:</p>
		<pre>qdbus org.kde.juk
/
/AudioOutputs
/AudioOutputs/8
/KIO
/KIO/Scheduler
/MainApplication
/Player
/Search
/internal
/internal/PhononXine
/juk
/juk/MainWindow_1
...</pre>
		<p>To see available methods of  <strong>/Player</strong> interface run:</p>
		<pre>qdbus org.kde.juk /Player
method void org.kde.juk.player.back()
method int org.kde.juk.player.currentTime()
method void org.kde.juk.player.forward()
method void org.kde.juk.player.mute()
method void org.kde.juk.player.pause()
method bool org.kde.juk.player.paused()
method void org.kde.juk.player.play()
method void org.kde.juk.player.play(QString file)
...</pre>

		<p>Now we are ready to create a part of configuration file:</p>
		<pre>(Connect)=Dbus(connect,juk_connection,\
                org.kde.juk,/Player,org.kde.juk.player);
1=Dbus(set,juk_connection,back);
2=Dbus(set,juk_connection,play);
3=Dbus(set,juk_connection,forward);</pre>

	</div></div> <!-- content -->

	<div id="foot">
		<p>Maintained by <a href="mailto:anyremote&#64;mail&#46;ru">anyRemote</a>. Website by <a href="http://www.martinlettner.info">m.lettner</a>.</p>
	</div>

</body>
</html>