]> granicus.if.org Git - transmission/commitdiff
(trunk) add interface versioning to the RPC spec
authorCharles Kerr <charles@transmissionbt.com>
Fri, 16 Jan 2009 01:03:33 +0000 (01:03 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Fri, 16 Jan 2009 01:03:33 +0000 (01:03 +0000)
doc/rpc-spec.txt
libtransmission/rpcimpl.c

index 89573bfa996e0253b3e1b5c09c14878eb5d4282c..b35a13c3e3419c4655e6953478ac99de54e6d8fe 100644 (file)
    "speed-limit-up"           | number     max global upload speed (in K/s)
    "speed-limit-up-enabled"   | 'boolean'  true means enabled
    "version"                  | string     long version string "$version ($revision)"
+   "rpc-version"              | number     the current RPC API version
+   "rpc-version-minimum"      | number     the minimum RPC API version supported
+
+   "rpc-version" indicates the RPC interface version supported by the RPC server.
+   It is incremented when a new version of Transmission changes the RPC interface.
+
+   "rpc-version-minimum" indicates the oldest API supported by the RPC server.
+   It is changes when a new version of Transmission changes the RPC interface
+   in a way that is not backwards compatible.  There are no plans for this
+   to be common behavior.
 
 4.1.1.  Mutators
 
    "uploadSpeed"              | number
    
 
+5.0.  Protocol Versions
+
+  The following changes have been made to the RPC interface:
+
+   RPC   | Release | Backwards |                |
+   Vers. | Version | Compat?   | Method         | Description
+   ------+---------+-----------+----------------+-------------------------------
+   1     | 1.30    | n/a       | n/a            | Initial version
+   ------+---------+-----------+----------------+-------------------------------
+   2     | 1.34    | yes       | torrent-get    | new arg "peers"
+   ------+---------+-----------+----------------+-------------------------------
+   3     | 1.41    | yes       | torrent-get    | added "port" to "peers"
+         |         |           | torrent-get    | new arg "downloaders"
+         |         |           | session-get    | new arg "version"
+         |         |           | torrent-remove | new method
+   ------+---------+-----------+----------------+-------------------------------
+   4     | 1.50    | yes       | session-get    | new arg "rpc-version"
+         |         |           | session-get    | new arg "rpc-version-minimum"
+   ------+---------+-----------+----------------+-------------------------------
+
index b50f1b0e513e6fec11057529aa170f4de2036b89..db52e9f532785f0af636d507f03e94bdb16c78ed 100644 (file)
@@ -718,6 +718,8 @@ sessionGet( tr_session * session,
     tr_bencDictAddInt( d, "pex-allowed", tr_sessionIsPexEnabled( session ) );
     tr_bencDictAddInt( d, "port", tr_sessionGetPeerPort( session ) );
     tr_bencDictAddInt( d, "port-forwarding-enabled", tr_sessionIsPortForwardingEnabled( session ) );
+    tr_bencDictAddInt( d, "rpc-version", 4 );
+    tr_bencDictAddInt( d, "rpc-version-minimum", 1 );
     tr_bencDictAddInt( d, "speed-limit-up", tr_sessionGetSpeedLimit( session, TR_UP ) );
     tr_bencDictAddInt( d, "speed-limit-up-enabled", tr_sessionIsSpeedLimitEnabled( session, TR_UP ) );
     tr_bencDictAddInt( d, "speed-limit-down", tr_sessionGetSpeedLimit( session, TR_DOWN ) );