%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/usr/local/share/doc/hubic/dbusapi/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/usr/local/share/doc/hubic/dbusapi/dbusapi.docbook-com.hubic.account.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
<refentry id="gdbus-com.hubic.account">
  <refmeta>    <refentrytitle role="top_of_page" id="gdbus-interface-com-hubic-account.top_of_page">com.hubic.account</refentrytitle>
  <indexterm zone="gdbus-interface-com-hubic-account.top_of_page"><primary sortas="com.hubic.account">com.hubic.account</primary></indexterm>
  </refmeta>  <refnamediv>    <refname>com.hubic.account</refname>    <refpurpose>Account dependant API.</refpurpose>  </refnamediv>  <refsynopsisdiv role="synopsis">
    <title role="synopsis.title">Methods</title>
    <synopsis>
<link linkend="gdbus-method-com-hubic-account.Logout">Logout</link>              ();
<link linkend="gdbus-method-com-hubic-account.SynchronizeNow">SynchronizeNow</link>      ();
<link linkend="gdbus-method-com-hubic-account.SetPauseState">SetPauseState</link>       (IN  b     paused);
<link linkend="gdbus-method-com-hubic-account.Publish">Publish</link>             (IN  s     absolutePath);
<link linkend="gdbus-method-com-hubic-account.PublishWithDuration">PublishWithDuration</link> (IN  s     absolutePath,
                     IN  i     duration);
<link linkend="gdbus-method-com-hubic-account.Unpublish">Unpublish</link>           (IN  s     absolutePath);
<link linkend="gdbus-method-com-hubic-account.GetPublishUrl">GetPublishUrl</link>       (IN  s     absolutePath,
                     OUT s     ret);
<link linkend="gdbus-method-com-hubic-account.GetItemStatus">GetItemStatus</link>       (IN  s     absolutePath,
                     OUT (sbb) ret);
<link linkend="gdbus-method-com-hubic-account.CreateBackup">CreateBackup</link>        (IN  s     path,
                     IN  s     name,
                     IN  s     frequency,
                     IN  i     versionsKept,
                     IN  b     keepDeletedFiles);
</synopsis>
  </refsynopsisdiv>
  <refsect1 role="signal_proto">
    <title role="signal_proto.title">Signals</title>
    <synopsis>
<link linkend="gdbus-signal-com-hubic-account.ItemChanged">ItemChanged</link> (s absolutePath);
</synopsis>
  </refsect1>
  <refsect1 role="properties">
    <title role="properties.title">Properties</title>
    <synopsis>
<link linkend="gdbus-property-com-hubic-account.QueueStatus">QueueStatus</link>        readable   (iiixx)
<link linkend="gdbus-property-com-hubic-account.RunningOperations">RunningOperations</link>  readable   a(xsssxx)
<link linkend="gdbus-property-com-hubic-account.PublishedFiles">PublishedFiles</link>     readable   a(ssx)
<link linkend="gdbus-property-com-hubic-account.Account">Account</link>            readable   s
<link linkend="gdbus-property-com-hubic-account.SynchronizedDir">SynchronizedDir</link>    readwrite  s
<link linkend="gdbus-property-com-hubic-account.ExcludedFolders">ExcludedFolders</link>    readwrite  as
<link linkend="gdbus-property-com-hubic-account.TotalBytes">TotalBytes</link>         readable   x
<link linkend="gdbus-property-com-hubic-account.UsedBytes">UsedBytes</link>          readable   x
</synopsis>
  </refsect1>
<refsect1 role="desc" id="gdbus-interface-com-hubic-account">
  <title role="desc.title">Description</title>
  <para><para>    Holds methds and properties that are are linked to the current connected
    account (if any).
</para><para>    In <constant>NotConnected</constant> or <constant>Connecting</constant> states, methods usually raises an error if
    they are called, properties returns a default value for Get opreation, Set
    also results in error.
</para><para>    This interface is exposed through the <literal>/com/hubic/Account</literal> object.
</para></para>
</refsect1>
<refsect1 role="details" id="gdbus-methods-com.hubic.account">
  <title role="details.title">Method Details</title>
<refsect2 role="method" id="gdbus-method-com-hubic-account.Logout">
  <title>The Logout() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.Logout"><primary sortas="com.hubic.account.Logout">com.hubic.account.Logout()</primary></indexterm>
<programlisting>
Logout ();
</programlisting>
<para><para>      Disconnect current account so you can call <link linkend="gdbus-method-com-hubic-general.Login">Login()</link> or
      <link linkend="gdbus-method-com-hubic-general.Reconnect">Reconnect()</link> again.
</para></para>
<variablelist role="params">
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.SynchronizeNow">
  <title>The SynchronizeNow() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.SynchronizeNow"><primary sortas="com.hubic.account.SynchronizeNow">com.hubic.account.SynchronizeNow()</primary></indexterm>
<programlisting>
SynchronizeNow ();
</programlisting>
<para><para>      Triggers an immediate and complete synchronization cycle.
</para></para>
<variablelist role="params">
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.SetPauseState">
  <title>The SetPauseState() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.SetPauseState"><primary sortas="com.hubic.account.SetPauseState">com.hubic.account.SetPauseState()</primary></indexterm>
<programlisting>
SetPauseState (IN  b paused);
</programlisting>
<para><para>      Change pause status. When enabling pause state, aborts any running operation.
      When resuming synchronization, makes a complete synchronization cycle.
</para><para>      See <link linkend="gdbus-property-com-hubic-general.CurrentState">"CurrentState"</link> and <link linkend="gdbus-signal-com-hubic-general.StateChanged">"StateChanged"</link>
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN b <parameter>paused</parameter></literal>:</term>
  <listitem><para><constant>true</constant> to set account in <constant>Paused</constant> state, <constant>false</constant> to resume synchronization.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.Publish">
  <title>The Publish() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.Publish"><primary sortas="com.hubic.account.Publish">com.hubic.account.Publish()</primary></indexterm>
<programlisting>
Publish (IN  s absolutePath);
</programlisting>
<para><para>      Publish a new file or folder. On failure, an error is raised and a message
      is sent over <link linkend="gdbus-signal-com-hubic-general.Messages">"Messages"</link> explaining what went wrong.
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN s <parameter>absolutePath</parameter></literal>:</term>
  <listitem><para>File to publish.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.PublishWithDuration">
  <title>The PublishWithDuration() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.PublishWithDuration"><primary sortas="com.hubic.account.PublishWithDuration">com.hubic.account.PublishWithDuration()</primary></indexterm>
<programlisting>
PublishWithDuration (IN  s absolutePath,
                     IN  i duration);
</programlisting>
<para><para>      Publish a new file or folder. On failure, an error is raised and a message
      is sent over <link linkend="gdbus-signal-com-hubic-general.Messages">"Messages"</link> explaining what went wrong.
</para><para>      In case of illegal TTL, just the error will be raised.
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN s <parameter>absolutePath</parameter></literal>:</term>
  <listitem><para>File to publish.</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN i <parameter>duration</parameter></literal>:</term>
  <listitem><para>Publication time to live (in days). Currently legal values are 1, 5, 10, 15, 20, 25, 30.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.Unpublish">
  <title>The Unpublish() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.Unpublish"><primary sortas="com.hubic.account.Unpublish">com.hubic.account.Unpublish()</primary></indexterm>
<programlisting>
Unpublish (IN  s absolutePath);
</programlisting>
<para><para>      Deleted publication of a file. If the file were not published,
      this is a no-op.
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN s <parameter>absolutePath</parameter></literal>:</term>
  <listitem><para>File to unpublish.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.GetPublishUrl">
  <title>The GetPublishUrl() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.GetPublishUrl"><primary sortas="com.hubic.account.GetPublishUrl">com.hubic.account.GetPublishUrl()</primary></indexterm>
<programlisting>
GetPublishUrl (IN  s absolutePath,
               OUT s ret);
</programlisting>
<para><para>      Retrieves the URL of an already published file. If path was not published
      this result in an error.
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN s <parameter>absolutePath</parameter></literal>:</term>
  <listitem><para>File to get the public URL.</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>OUT s <parameter>ret</parameter></literal>:</term>
  <listitem><para>Public URL.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.GetItemStatus">
  <title>The GetItemStatus() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.GetItemStatus"><primary sortas="com.hubic.account.GetItemStatus">com.hubic.account.GetItemStatus()</primary></indexterm>
<programlisting>
GetItemStatus (IN  s     absolutePath,
               OUT (sbb) ret);
</programlisting>
<para><para>      This method is intended to quickly gives the status of a particular file
      or folder. It notably used to draw the overlay icons on Windows and MacOSX.
</para><para>      This method does not raise error if it is called in <constant>NotConnected</constant> or
      <constant>Connecting</constant> state.
</para><para>      The returned tuple is (in order):
      <variablelist>
        <varlistentry>
          <term><literal>Status</literal> (string)</term>
          <listitem><para>
            The synchronization status. It can be <literal>Synchronized</literal>
            (file is ok), <literal>Unsynchronized</literal> (the file is either
            downloading or uploading), <literal>NoStatus</literal> (the file is
            filtered out or outside of synchronized directory) or else
            <literal>Error</literal> when an unexpected exception happen.
          </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>IsPublished</literal> (bool)</term>
          <listitem><para>
            Whether the item is published or not.
          </para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>CanBePublished</literal> (bool)</term>
          <listitem><para>
            Whether the item could be published. It this is false, trying to
            <link linkend="gdbus-method-com-hubic-account.Publish">Publish()</link> the item will certainly fail.
          </para></listitem>
        </varlistentry>
      </variablelist>
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN s <parameter>absolutePath</parameter></literal>:</term>
  <listitem><para>File to get the status from.</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>OUT (sbb) <parameter>ret</parameter></literal>:</term>
  <listitem><para>A tuple containing the file status.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 role="method" id="gdbus-method-com-hubic-account.CreateBackup">
  <title>The CreateBackup() method</title>
  <indexterm zone="gdbus-method-com-hubic-account.CreateBackup"><primary sortas="com.hubic.account.CreateBackup">com.hubic.account.CreateBackup()</primary></indexterm>
<programlisting>
CreateBackup (IN  s path,
              IN  s name,
              IN  s frequency,
              IN  i versionsKept,
              IN  b keepDeletedFiles);
</programlisting>
<para><para>      This method creates a new backup, the created backup will be acessible
      through /com/hubib/Backup/&lt;name&gt; path.
</para><para>      This method may raise an error if the name or frequency are invalid,
      if the path cannot be accessed, ...
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>IN s <parameter>path</parameter></literal>:</term>
  <listitem><para>Local folder to backup</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN s <parameter>name</parameter></literal>:</term>
  <listitem><para>Backup name (must be a unique non empty string)</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN s <parameter>frequency</parameter></literal>:</term>
  <listitem><para>Automatic backup frequency. Must be one of: "never", "hourly", "daily", "weekly" (case insensitive).</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN i <parameter>versionsKept</parameter></literal>:</term>
  <listitem><para>Number of versions to keep (0: no versioning, negative: infinite versioning)</para></listitem>
</varlistentry>
<varlistentry>
  <term><literal>IN b <parameter>keepDeletedFiles</parameter></literal>:</term>
  <listitem><para>whether or not the locally deleted files are also deleted on hubiC.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1 role="details" id="gdbus-signals-com.hubic.account">
  <title role="details.title">Signal Details</title>
<refsect2 role="signal" id="gdbus-signal-com-hubic-account.ItemChanged">
  <title>The "ItemChanged" signal</title>
  <indexterm zone="gdbus-signal-com-hubic-account.ItemChanged"><primary sortas="com.hubic.account::ItemChanged">com.hubic.account::ItemChanged</primary></indexterm>
<programlisting>
ItemChanged (s absolutePath);
</programlisting>
<para><para>      Signal raised when a file or folder status changed somehow so
      <link linkend="gdbus-method-com-hubic-account.GetItemStatus">GetItemStatus()</link> should be called again to update file (e.g. change
      overlay icon, ...).
</para><para>      This signal can be raised in following cases:
      <simplelist>
        <member>The item has been modified so it need to be synced,</member>
        <member>The item synchronization operation(s) has been finished,</member>
        <member>The item has been (un)published.</member>
      </simplelist>
</para></para>
<variablelist role="params">
<varlistentry>
  <term><literal>s <parameter>absolutePath</parameter></literal>:</term>
  <listitem><para>File or folder to update.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1 role="details" id="gdbus-properties-com.hubic.account">
  <title role="details.title">Property Details</title>
<refsect2 role="property" id="gdbus-property-com-hubic-account.QueueStatus">
  <title>The "QueueStatus" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.QueueStatus"><primary sortas="com.hubic.account:QueueStatus">com.hubic.account:QueueStatus</primary></indexterm>
<programlisting>
QueueStatus  readable   (iiixx)
</programlisting>
<para><para>      Current status of synchronization queue. Gives how many items are
      wating to be synchronized. This will be non-zero only in <constant>Busy</constant> state.
</para><para>      The tuple is (in order):
      <variablelist>
        <varlistentry>
          <term><literal>QueuedUploads</literal> (int)</term>
          <listitem><para>Number of queued upload operations.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>QueuedDownloads</literal> (int)</term>
          <listitem><para>Number of queued download operations.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>QueuedMisc</literal> (int)</term>
          <listitem><para>Number of other queued operation. This include deletes, copies, renames, ...</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>QueuedBytesToUpload</literal> (long)</term>
          <listitem><para>Amount of bytes to upload. Sum of sizes of <constant>QueuedUploads</constant></para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>QueuedBytesToDownload</literal> (long)</term>
          <listitem><para>Amount of bytes to download. Sum of sizes of <constant>QueuedDownloads</constant></para></listitem>
        </varlistentry>
      </variablelist>
</para></para>
</refsect2>
<refsect2 role="property" id="gdbus-property-com-hubic-account.RunningOperations">
  <title>The "RunningOperations" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.RunningOperations"><primary sortas="com.hubic.account:RunningOperations">com.hubic.account:RunningOperations</primary></indexterm>
<programlisting>
RunningOperations  readable   a(xsssxx)
</programlisting>
<para><para>      List of currently running operations. It will be an empty list except
      during <constant>Busy</constant> state.
</para><para>      The value is an array of tuples, themselves composed of (in order):
      <variablelist>
        <varlistentry>
          <term><literal>Id</literal> (int)</term>
          <listitem><para>Some unique operation id. Can be used to bind
          some progress indicator to the operation.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>SourcePath</literal> (string)</term>
          <listitem><para>File on which operation work.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>DestinationPath</literal> (string)</term>
          <listitem><para>Only used for copies and renames.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>OperationType</literal> (string)</term>
          <listitem><para>Name of operation.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>BytesDone</literal> (long)</term>
          <listitem><para>Current progress of operation (for <constant>Upload</constant> and <constant>Download</constant>),
          or else -1 if operation does not have progress.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>TotalBytes</literal> (long)</term>
          <listitem><para>Size of file to process (for <constant>Upload</constant> and <constant>Download</constant>),
          or else -1 if operation does not have progress.</para></listitem>
        </varlistentry>
      </variablelist>
</para></para>
</refsect2>
<refsect2 role="property" id="gdbus-property-com-hubic-account.PublishedFiles">
  <title>The "PublishedFiles" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.PublishedFiles"><primary sortas="com.hubic.account:PublishedFiles">com.hubic.account:PublishedFiles</primary></indexterm>
<programlisting>
PublishedFiles  readable   a(ssx)
</programlisting>
<para><para>      List of all published files. This list is cached locally and is updated
      time to time so it is fast to retrieve (but may not be up to date in some
      cases).
</para><para>      The value is an array of tuples, themselves composed of (in order):
      <variablelist>
        <varlistentry>
          <term><literal>Path</literal> (string)</term>
          <listitem><para>File on which operation work.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>Url</literal> (string)</term>
          <listitem><para>The public HTTP link to see publication.</para></listitem>
        </varlistentry>
        <varlistentry>
          <term><literal>PublishedUntil</literal> (long)</term>
          <listitem><para>Date of the end of publication (Unix timestamp).</para></listitem>
        </varlistentry>
      </variablelist>
</para></para>
</refsect2>
<refsect2 role="property" id="gdbus-property-com-hubic-account.Account">
  <title>The "Account" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.Account"><primary sortas="com.hubic.account:Account">com.hubic.account:Account</primary></indexterm>
<programlisting>
Account  readable   s
</programlisting>
<para><para>    Account email address. Returns an empty string when no account is connected.
</para></para>
</refsect2>
<refsect2 role="property" id="gdbus-property-com-hubic-account.SynchronizedDir">
  <title>The "SynchronizedDir" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.SynchronizedDir"><primary sortas="com.hubic.account:SynchronizedDir">com.hubic.account:SynchronizedDir</primary></indexterm>
<programlisting>
SynchronizedDir  readwrite  s
</programlisting>
<para><para>    Currently synchronized directory. Can be changed at anytime (as long as
    account is connected). If operations were in progress, they are
    interrupted.
</para><para>    To disable synchronization, set the property to an empty string.
</para><para>    Returns an empty string when no account is connected or when
    synchronization is disabled.
</para></para>
</refsect2>
<refsect2 role="property" id="gdbus-property-com-hubic-account.ExcludedFolders">
  <title>The "ExcludedFolders" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.ExcludedFolders"><primary sortas="com.hubic.account:ExcludedFolders">com.hubic.account:ExcludedFolders</primary></indexterm>
<programlisting>
ExcludedFolders  readwrite  as
</programlisting>
<para><para>    Folders that will not be synchronized nor indexed. This is a collection of
    absolute paths, all of them must be inside
    <link linkend="gdbus-property-com-hubic-account.SynchronizedDir">"SynchronizedDir"</link>.
</para><para>    It can be changed at anytime (as long as account is connected). If
    operations were in progress, they are interrupted.
</para><para>    Returns an empty array when no account is connected.
</para></para>
</refsect2>
<refsect2 role="property" id="gdbus-property-com-hubic-account.TotalBytes">
  <title>The "TotalBytes" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.TotalBytes"><primary sortas="com.hubic.account:TotalBytes">com.hubic.account:TotalBytes</primary></indexterm>
<programlisting>
TotalBytes  readable   x
</programlisting>
<para><para>    Available bytes on this account or -1 for unlimited accounts or when no
    account is connected.
</para></para>
</refsect2>
<refsect2 role="property" id="gdbus-property-com-hubic-account.UsedBytes">
  <title>The "UsedBytes" property</title>
  <indexterm zone="gdbus-property-com-hubic-account.UsedBytes"><primary sortas="com.hubic.account:UsedBytes">com.hubic.account:UsedBytes</primary></indexterm>
<programlisting>
UsedBytes  readable   x
</programlisting>
<para><para>    Currently used bytes. May take some minutes to update after operations
    have been done.  Returns -1 when no account is connected.
</para></para>
</refsect2>
</refsect1>
</refentry>


Zerion Mini Shell 1.0