Provide function to decode numeric status
GoogleCodeExporter opened this issue · comments
Attached is a diff to decode numeric status into a meaningful string.
Original issue reported on code.google.com by jo...@gormsby.com
on 5 Jul 2010 at 10:13
Attachments:
I'll tentatively add this in, but I think we should consider whether class
TransmissionRPC is a pass-through interface that leaves interpretation of the
responses to the application.
Original comment by brycied...@gmail.com
on 5 Jul 2010 at 10:33
- Changed state: Started
- Added labels: Component-Logic, OpSys-All, Priority-Low, Type-Enhancement, Usability
- Removed labels: Priority-Medium, Type-Defect
Understood, I had the same question in my mind before submitting the diff.
Let me know what direction you decide to go in. I also have some functions to
humanize the values of haveValid/totalSize and rateDownload a la
transmission-remote.
Original comment by jo...@gormsby.com
on 5 Jul 2010 at 10:54
- Added labels: ****
- Removed labels: ****
I agree, maybe we should add a toobox class to handle these things. Or a small
class with constants describing the status codes.
Original comment by johan.ad...@gmail.com
on 5 Jul 2010 at 11:06
- Added labels: ****
- Removed labels: ****
This issue was closed by revision r9.
Original comment by brycied...@gmail.com
on 5 Jul 2010 at 11:38
- Changed state: Fixed
- Added labels: ****
- Removed labels: ****
Jolan,
As you can see, I tossed it in for now along with defining the states as
const's (I borrowed the names from transmission.h)
Johan,
I'm thinking a class Transmission() that extends TransmissionRPC(). I'll take
up this discussion in a wiki page.
Original comment by brycied...@gmail.com
on 5 Jul 2010 at 11:55
- Added labels: ****
- Removed labels: ****
I'm getting a parse error w/r9 using php v5.2.13 fcgi:
Parse error: syntax error, unexpected '(' in /fr/www/TransmissionRPC.class.php
on line 108
I don't see any obvious reason for the error.
Original comment by jo...@gormsby.com
on 6 Jul 2010 at 12:14
- Added labels: ****
- Removed labels: ****
Jolan, try r10.
Original comment by brycied...@gmail.com
on 6 Jul 2010 at 12:22
- Added labels: ****
- Removed labels: ****
It should be public not protected; otherwise works ok, thx.
Original comment by jo...@gormsby.com
on 6 Jul 2010 at 12:25
- Added labels: ****
- Removed labels: ****
Spoke too soon. You need to add self:: to the constant checks.
Original comment by jo...@gormsby.com
on 6 Jul 2010 at 12:36
- Added labels: ****
- Removed labels: ****
Jolan, check out the latest revision (r11 I think), fixed the self:: references
and public/protected.
Original comment by brycied...@gmail.com
on 6 Jul 2010 at 4:03
- Added labels: ****
- Removed labels: ****
Looks good, matches what I have locally 100%.
Original comment by jo...@gormsby.com
on 6 Jul 2010 at 4:07
- Added labels: ****
- Removed labels: ****