[telepathy-spec/master] Balance: remove support for implementations without change notification

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Nov 30 09:08:12 PST 2009


Any such implementation should be able fake change notification tolerably
well, by fetching the balance at startup, and re-fetching it after each
event that could have changed the balance (e.g. after the end of each
call).

It's not needed for Skype, which does have change notification, in any
case.
---
 spec/Connection_Interface_Balance.xml |   47 +++------------------------------
 1 files changed, 4 insertions(+), 43 deletions(-)

diff --git a/spec/Connection_Interface_Balance.xml b/spec/Connection_Interface_Balance.xml
index 55a4e15..ed6d33c 100644
--- a/spec/Connection_Interface_Balance.xml
+++ b/spec/Connection_Interface_Balance.xml
@@ -81,64 +81,25 @@
           A negative amount may be possible on some services, and indicates
           that the user owes money to the service provider.</p>
 
-        <p>On initial connection, this property is likely to have an unknown
+        <p>On initial connection, this property may have an unknown
           value, represented by Amount = 0, Scale = 2**32 and
           Currency = "".</p>
-
-        <p>On services where <tp:member-ref>ChangeNotification</tp:member-ref>
-          is FALSE, the value of this property contains the last known
-          balance, which will be unknown until a current balance has been
-          downloaded using <tp:member-ref>RequestBalance</tp:member-ref>.</p>
       </tp:docstring>
     </property>
 
-    <method name="RequestBalance" tp:name-for-bindings="Request_Balance">
-      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-        <p>Get the current value of the balance, making a network request to
-          the server or waiting for a previous network request to complete
-          if necessary.</p>
-      </tp:docstring>
-
-      <arg name="Balance" direction="out"
-        type="(ius)" tp:type="Currency_Amount">
-        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-          <p>An up-to-date value of the balance.</p>
-        </tp:docstring>
-      </arg>
-
-      <tp:possible-errors>
-        <tp:error name="org.freedesktop.Telepathy.Errors.Disconnected" />
-        <tp:error name="org.freedesktop.Telepathy.Errors.NotAvailable" />
-      </tp:possible-errors>
-    </method>
-
     <signal name="BalanceChanged" tp:name-for-bindings="Balance_Changed">
       <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-        <p>Emitted when the user's balance has changed. On services
-          where <tp:member-ref>ChangeNotification</tp:member-ref> is FALSE,
-          this will only be emitted if a client calls
-          <tp:member-ref>RequestBalance</tp:member-ref>.</p>
+        <p>Emitted when the user's balance has changed.</p>
       </tp:docstring>
 
       <arg name="Balance" type="(ius)" tp:type="Currency_Amount">
         <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-          <p>An up-to-date value of the balance.</p>
+          <p>The new value of the <tp:member-ref>AccountBalance</tp:member-ref>
+            property.</p>
         </tp:docstring>
       </arg>
     </signal>
 
-    <property name="ChangeNotification"
-      tp:name-for-bindings="Change_Notification"
-      access="read" type="b">
-      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-        <p>If TRUE, clients can expect timely notification of
-          changes to the balance. If FALSE, the
-          <tp:member-ref>BalanceChanged</tp:member-ref> signal will not be
-          emitted unless
-          <tp:member-ref>RequestBalance</tp:member-ref> is called.</p>
-      </tp:docstring>
-    </property>
-
   </interface>
 </node>
 <!-- vim:set sw=2 sts=2 et ft=xml: -->
-- 
1.5.6.5




More information about the telepathy-commits mailing list