aboutsummaryrefslogtreecommitdiff
path: root/Remote/External
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-27 02:08:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-27 02:11:06 -0400
commit245b3eb1a5f2a9b786c297be3d45aecab29d6110 (patch)
tree25c913aab4f0d7626faff00020b04ff9c45eda91 /Remote/External
parent4708090fcb854d3e4cd3199d260b03df8a521c07 (diff)
make some requests optional, simplify and future-proof protocol more
Diffstat (limited to 'Remote/External')
-rw-r--r--Remote/External/Types.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs
index ed8534a07..873c5c438 100644
--- a/Remote/External/Types.hs
+++ b/Remote/External/Types.hs
@@ -118,10 +118,9 @@ data Response
| REMOVE_SUCCESS Key
| REMOVE_FAILURE Key ErrorMsg
| COST Cost
- | COST_UNKNOWN
| INITREMOTE_SUCCESS
| INITREMOTE_FAILURE ErrorMsg
- | UNKNOWN_REQUEST
+ | UNSUPPORTED_REQUEST
deriving (Show)
instance Receivable Response where
@@ -134,10 +133,9 @@ instance Receivable Response where
parseCommand "REMOVE-SUCCESS" = parse1 REMOVE_SUCCESS
parseCommand "REMOVE-FAILURE" = parse2 REMOVE_FAILURE
parseCommand "COST" = parse1 COST
- parseCommand "COST_UNKNOWN" = parse0 COST_UNKNOWN
parseCommand "INITREMOTE-SUCCESS" = parse0 INITREMOTE_SUCCESS
parseCommand "INITREMOTE-FAILURE" = parse1 INITREMOTE_FAILURE
- parseCommand "UNKNOWN-REQUEST" = parse0 UNKNOWN_REQUEST
+ parseCommand "UNSUPPORTED-REQUEST" = parse0 UNSUPPORTED_REQUEST
parseCommand _ = parseFail
-- Requests that the external remote can send at any time it's in control.