<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">

<!--
    org.gnome.evolution.dataserver.Source:
    @short_description: Data source

    This interface is used to represent data sources.
-->
<interface name="org.gnome.evolution.dataserver.Source">
  <!-- UID: The unique identifier for the source. -->
  <property name="UID" type="s" access="read"/>
  <!-- Data: Raw key file data describing the source. -->
  <property name="Data" type="s" access="read"/>

  <!--
      AllowAuthPrompt:

      If the user declines to provide a secret when prompted, further
      authentication prompts are inhibited until this method is called.
  -->
  <method name="AllowAuthPrompt"/>
</interface>

<!--
    org.gnome.evolution.dataserver.Source.Removable:
    @short_description: Removable data source

    This interface is used to represent removable data sources.
-->
<interface name="org.gnome.evolution.dataserver.Source.Removable">
  <!--
      Remove:

      Permanently removes the data source.
  -->
  <method name="Remove"/>
</interface>

<!--
    org.gnome.evolution.dataserver.Source.Writable:
    @short_description: Writable data source

    This interface is used to represent writable data sources.
-->
<interface name="org.gnome.evolution.dataserver.Source.Writable">
  <!--
      Write:
      @data: Raw key file data describing the source

      Submits new key file data for the source, which is written
      to disk and then reflected in the Data property.
  -->
  <method name="Write">
    <arg name="data" direction="in" type="s"/>
  </method>
</interface>

<!--
    org.gnome.evolution.dataserver.Source.RemoteCreatable:
    @short_description: Create remote resources

    This interface is used to create resources on a remote server.
-->
<interface name="org.gnome.evolution.dataserver.Source.RemoteCreatable">
  <!--
      Create:
      @uid: Unique identifier for the new data source
      @data: Raw key file data describing the resource to create

      Creates a remote resource according to details in @data.
      The newly-created resource will be proxied by a new data
      source with a unique identifier of @uid.
  -->
  <method name="Create">
    <arg name="uid" direction="in" type="s"/>
    <arg name="data" direction="in" type="s"/>
  </method>
</interface>

<!--
    org.gnome.evolution.dataserver.Source.RemoteDeletable:
    @short_description: Delete remote resources

    This interface is used to delete resources from a remote server.
-->
<interface name="org.gnome.evolution.dataserver.Source.RemoteDeletable">
  <!--
      Delete:

      Deletes the remote resource being proxied by this data source.
  -->
  <method name="Delete"/>
</interface>

<!--
    org.gnome.evolution.dataserver.Source.OAuth2Support:
    @short_description: Supports OAuth 2.0 authentication

    This interface is used by data sources that support
    <ulink url="http://oauth.net/2/">OAuth 2.0</ulink> authentication,
    usually backed by a desktop-wide authentication service such as
    <ulink url="http://live.gnome.org/GnomeOnlineAccounts">GNOME Online
    Accounts</ulink>.
-->
<interface name="org.gnome.evolution.dataserver.Source.OAuth2Support">
  <!--
      GetAccessToken:
      @access_token: The access token
      @expires_in: The duration in seconds that the returned token is
                   valid for, or 0 if unknown

      Obtains an access token that can be used to access OAuth2-based
      services for the data source.
  -->
  <method name="GetAccessToken">
    <arg name="access_token" type="s" direction="out"/>
    <arg name="expires_in" type="i" direction="out"/>
  </method>
</interface>
