Difference between revisions of "QUERY FILETRANSFER (Myth Protocol)"
(added REOPEN command for protocol version 70) |
|||
Line 131: | Line 131: | ||
'''Successful response''': <pre>1</pre> | '''Successful response''': <pre>1</pre> | ||
'''Unsuccessful response''': <pre>0</pre> | '''Unsuccessful response''': <pre>0</pre> | ||
+ | |||
+ | == REQUEST_SIZE == | ||
+ | |||
+ | === Present in Protocol Versions === | ||
+ | 79+ | ||
+ | |||
+ | === Examples === | ||
+ | Command: | ||
+ | <pre>> QUERY_FILETRANSFER 14[]:[]REQUEST SIZE[]:[]filename</pre> | ||
+ | Response: | ||
+ | <pre>12345 1</pre> | ||
+ | |||
+ | === Description === | ||
+ | Return the current file of the size. If file is not being currently written to by the backend, the size will be cached. Second number returned indicates if the file is not going to change in the future: 0 indicates that the file is currently being written to by the backend, 1 indicates that the backend isn't writing to this file and as such that the size returned is not going to change | ||
+ | |||
+ | === Returns === | ||
+ | '''Successful response''': <pre>[size] [0-1]</pre> | ||
=== Changelog === | === Changelog === | ||
Line 143: | Line 160: | ||
| 70 || {{gitcommit|1da9d23|mythtv|v0.25pre-2052-g1da9d23}} | | 70 || {{gitcommit|1da9d23|mythtv|v0.25pre-2052-g1da9d23}} | ||
| The REOPEN command was added. | | The REOPEN command was added. | ||
+ | |- | ||
+ | |- | ||
+ | | 79+ || {{gitcommit|5f47d6922e|mythtv|v0.28-pre-953-g5f47d69}} | ||
+ | | The REQUEST_SIZE command was added. | ||
|- | |- | ||
|} | |} | ||
[[Category:Myth Protocol Commands]] | [[Category:Myth Protocol Commands]] |
Latest revision as of 13:09, 9 March 2014
Contents
QUERY_FILETRANSFER
Present in Protocol Versions
All?
Arguments
Command arguments: <file socket id>
List arguments: <command>
IS_OPEN
Present in Protocol Versions
All?
Examples
Command:
> QUERY_FILETRANSFER 14[]:[]IS_OPEN
Response:
1
Description
Queries whether a file socket is currently open.
Returns
Successful response:1
DONE
Present in Protocol Versions
All?
Examples
Command:
> QUERY_FILETRANSFER 14[]:[]DONE
Response:
ok
Description
Closes the file transfer socket
Returns
Always returnsok
REQUEST_BLOCK
Present in Protocol Versions
All?
Arguments
Command arguments: none
List arguments: <byte count>
Examples
Command:
> QUERY_FILETRANSFER 14[]:[]REQUEST_BLOCK[]:[]10
Response: <count> bytes from the file being transferred
Description
Gets data from the backend
WRITE_BLOCK
Present in Protocol Versions
46 - ?
Arguments
Command arguments: none
List arguments: <byte count>
Examples
Command:
> QUERY_FILETRANSFER 14[]:[]WRITE_BLOCK[]:[]10
Response: <count> bytes transferred
Description
Sends data to the backend
SEEK
Arguments
Command arguments: none
List arguments: <position> <whence> <current position>
Examples
Description
This command wraps the file "seek" function. The position and current position fields are 64 bit integers. This returns a 64 bit integer for the result.
SET_TIMEOUT
Present in Protocol Versions
All?
Arguments
Command arguments: none
List arguments: <whether to have a fast timeout>
Examples
Command:
> QUERY_FILETRANSFER 14[]:[]SET_TIMEOUT[]:[]1
Response:
ok
Description
This command sets whether reading from a file should have a fast or slow timeout. Slow timeouts are used for live TV ring buffers, and is three seconds. Fast timeouts are used for static files, and are 0.12 seconds.
REOPEN
Present in Protocol Versions
70+
Examples
Command:
> QUERY_FILETRANSFER 14[]:[]REOPEN[]:[]filename
Response:
1
Description
Flushes and closes the currently open file. If a filename is given, that file will be opened. Otherwise, the current file will be re-opened. This command only works for write mode transfers.
Returns
Successful response:1Unsuccessful response:
0
REQUEST_SIZE
Present in Protocol Versions
79+
Examples
Command:
> QUERY_FILETRANSFER 14[]:[]REQUEST SIZE[]:[]filename
Response:
12345 1
Description
Return the current file of the size. If file is not being currently written to by the backend, the size will be cached. Second number returned indicates if the file is not going to change in the future: 0 indicates that the file is currently being written to by the backend, 1 indicates that the backend isn't writing to this file and as such that the size returned is not going to change
Returns
Successful response:[size] [0-1]
Changelog
version | changeset | description |
---|---|---|
66 | [v0.25pre-2052-g1508085] | SEEK now uses and returns single 64 bit numbers rather than 64 bit numbers split into two 32 bit numbers. |
70 | [v0.25pre-2052-g1da9d23] | The REOPEN command was added. |
79+ | [v0.28-pre-953-g5f47d69] | The REQUEST_SIZE command was added. |