<?xml version="1.0" ?>
<node name="/Channel_Interface_Addressing" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
  <tp:copyright>Copyright © 2010 Collabora Limited</tp:copyright>
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
    <p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.</p>

<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.</p>

<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
  </tp:license>
  <interface name="org.freedesktop.Telepathy.Channel.Interface.Addressing1"
             tp:causes-havoc="experimental">
    <tp:added version="0.19.12">(as draft)</tp:added>
    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>This interface provides properties that can be used for
        requesting channels through different contact addressing
        schemes like vCard addresses or URIs.
      </p>
    </tp:docstring>

    <property name="TargetVCardField" type="s" access="read"
              tp:name-for-bindings="Target_VCard_Field">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The vCard field, normalized to lower case,
          <tp:member-ref>TargetVCardAddress</tp:member-ref> refers to.</p>

          <p>The <code>url</code> vCard field MUST NOT appear here; see
            <tp:member-ref>TargetURI</tp:member-ref> instead.</p>

          <tp:rationale>
            <p>In practice, protocols have a limited set of URI
              schemes that make sense to resolve as a contact.</p>
          </tp:rationale>

        <p>If this is omitted from a request,
          <tp:member-ref>TargetVCardAddress</tp:member-ref> MUST be
          omitted as well.</p>
      </tp:docstring>
    </property>

    <property name="TargetURIScheme" type="s" access="read"
              tp:name-for-bindings="Target_URI_Scheme">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The URI scheme used in <tp:member-ref>TargetURI</tp:member-ref></p>

        <tp:rationale>
          <p>While this seems redundant, since the scheme is included in
            <tp:member-ref>TargetURI</tp:member-ref>, it exists for constructing
            <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
            that support a limited set of URI schemes.</p>
        </tp:rationale>

        <p>If this is omitted from a request,
          <tp:member-ref>TargetURI</tp:member-ref> MUST be
          omitted as well.</p>
      </tp:docstring>
    </property>

    <property name="TargetVCardAddress" type="s" access="read"
              tp:name-for-bindings="Target_VCard_Address">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The vCard address of the Channel's target.</p>

        <p>If this is present in a channel request,
          <tp:member-ref>TargetVCardField</tp:member-ref>
          MUST be present, and
          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>,
          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>,
          and <tp:member-ref>TargetURI</tp:member-ref> MUST NOT be present.
          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
          must either not be present or set to Handle_Type_Contact.
          The request MUST fail with error InvalidHandle, without
          side-effects, if the requested vCard address cannot be found.</p>
      </tp:docstring>
    </property>

    <property name="TargetURI" type="s" access="read"
              tp:name-for-bindings="Target_URI">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The URI of the Channel's target. The URI's scheme (i.e. the
          part before the first colon) MUST be identical to
          <tp:member-ref>TargetURIScheme</tp:member-ref>.</p>

        <p>If this is present in a channel request,
          <tp:member-ref>TargetVCardField</tp:member-ref>
          MUST be present, and
          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>,
          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>,
          and <tp:member-ref>TargetVCardAddress</tp:member-ref> MUST NOT be
          present.
          <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
          must either not be present or set to Handle_Type_Contact.
          The request MUST fail with error InvalidHandle, without
          side-effects, if the requested vCard address cannot be found.</p>
      </tp:docstring>
    </property>
  </interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
