What's a profile ?

A profile is the user interface sent by the server and chosen in PwrCtl client according to the actions that you need (for example controlling your favorite multimedia player or fetching some information on your bittorent client).

A profile is a file described in XML and sent by the server whenever the client sends the command protocol “profile <name>” through the network.

Once the profile sent and received by the client, the latter parses the XML data and builds dynamically its interface.

How to create one

Let's see an example with the winamp control :

<profile name="winamp">
   <tab label="Winamp">
      <button label="Volume Down"    action="exec winamp.exe down"     x="10"  y="80"  size="100"/>
      <button label="Volume Up"      action="exec winamp.exe up"       x="120" y="80"  size="100"/>
      <button label="Previous Track" action="exec winamp.exe previous" x="10"  y="110" size="100"/>
      <button label="Next Track"     action="exec winamp.exe next"     x="120" y="110" size="100"/>
      <button label="Play/Pause"     action="exec winamp.exe play"     x="60"  y="140" size="100"/>
   </tab>
</profile>

As you can see, the profile is composed of tab(s), and each tab is composed of button(s).

It's very simple, you have to specify a label title for each tab and button. Each button has an action attribute, the command protocol will be sent to the server when the button is pressed on the user interface. For each button, you have to specify also a position in the window (“x” and “y” attributes), finally the size (in pixels).

Each profile must be named ”<name>.xml” and placed in “server/profiles” directory.

profile.txt · Last modified: 2009/06/21 00:27 (external edit)
Back to top
Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0