Changeset 7714


Ignore:
Timestamp:
Jan 16, 2009, 12:58:11 AM (12 years ago)
Author:
charles
Message:

(1.5x) add interface versioning to the RPC spec

Location:
branches/1.5x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/doc/rpc-spec.txt

    r7349 r7714  
    6969   Method name         | libtransmission function
    7070   --------------------+-------------------------------------------------
    71    "torrent-remove"    | tr_torrentRemove
    7271   "torrent-start"     | tr_torrentStart
    7372   "torrent-stop"      | tr_torrentStop
     
    134133   doneDate               | number                               | tr_stat
    135134   downloadedEver         | number                               | tr_stat
     135   downloaders            | number                               | tr_stat
    136136   downloadLimitMode      | number                               | tr_torrent
    137137   downloadLimit          | number                               | tr_torrent
     
    293293                       fields for id, name, and hashString.
    294294
     2953.5.  Removing a Torrent
     296
     297   Method name: "torrent-remove"
     298
     299   Request arguments:
     300
     301   string                     | value type & description
     302   ---------------------------+-------------------------------------------------
     303   "ids"                      | array      torrent list, as described in 3.1
     304   "delete-local-data"        | 'boolean'  delete local data. (default: false)
     305
     306   Response arguments: none
     307
    295308
    2963094.   Session Requests
     
    311324   "speed-limit-up-enabled"   | 'boolean'  true means enabled
    312325   "version"                  | string     long version string "$version ($revision)"
    313 
     326   "rpc-version"              | number     the current RPC API version
     327   "rpc-version-minimum"      | number     the minimum RPC API version supported
     328
     329   "rpc-version" indicates the RPC interface version supported by the RPC server.
     330   It is incremented when a new version of Transmission changes the RPC interface.
     331
     332   "rpc-version-minimum" indicates the oldest API supported by the RPC server.
     333   It is changes when a new version of Transmission changes the RPC interface
     334   in a way that is not backwards compatible.  There are no plans for this
     335   to be common behavior.
    314336
    3153374.1.1.  Mutators
     
    342364   
    343365
     3665.0.  Protocol Versions
     367
     368  The following changes have been made to the RPC interface:
     369
     370   RPC   | Release | Backwards |                |
     371   Vers. | Version | Compat?   | Method         | Description
     372   ------+---------+-----------+----------------+-------------------------------
     373   1     | 1.30    | n/a       | n/a            | Initial version
     374   ------+---------+-----------+----------------+-------------------------------
     375   2     | 1.34    | yes       | torrent-get    | new arg "peers"
     376   ------+---------+-----------+----------------+-------------------------------
     377   3     | 1.41    | yes       | torrent-get    | added "port" to "peers"
     378         |         |           | torrent-get    | new arg "downloaders"
     379         |         |           | session-get    | new arg "version"
     380         |         |           | torrent-remove | new method
     381   ------+---------+-----------+----------------+-------------------------------
     382   4     | 1.50    | yes       | session-get    | new arg "rpc-version"
     383         |         |           | session-get    | new arg "rpc-version-minimum"
     384   ------+---------+-----------+----------------+-------------------------------
     385
  • branches/1.5x/libtransmission/rpcimpl.c

    r7664 r7714  
    723723    tr_bencDictAddInt( d, "port", tr_sessionGetPeerPort( session ) );
    724724    tr_bencDictAddInt( d, "port-forwarding-enabled", tr_sessionIsPortForwardingEnabled( session ) );
     725    tr_bencDictAddInt( d, "rpc-version", 4 );
     726    tr_bencDictAddInt( d, "rpc-version-minimum", 1 );
    725727    tr_bencDictAddInt( d, "speed-limit-up", tr_sessionGetSpeedLimit( session, TR_UP ) );
    726728    tr_bencDictAddInt( d, "speed-limit-up-enabled", tr_sessionIsSpeedLimitEnabled( session, TR_UP ) );
Note: See TracChangeset for help on using the changeset viewer.