, RpcCallTestDelay(..)
, RpcResultTestDelay(..)
+ , RpcCallExportList(..)
+ , RpcResultExportList(..)
+
, rpcTimeoutFromRaw -- FIXME: Not used anywhere
) where
-- ** TestDelay
-
-- | Call definition for test delay.
$(buildObject "RpcCallTestDelay" "rpcCallTestDelay"
[ simpleField "duration" [t| Double |]
instance Rpc RpcCallTestDelay RpcResultTestDelay where
rpcResultFill _ res = fromJSValueToRes res id
+
+-- ** ExportList
+
+-- | Call definition for export list.
+
+$(buildObject "RpcCallExportList" "rpcCallExportList" [])
+
+-- | Result definition for export list.
+$(buildObject "RpcResultExportList" "rpcResExportList"
+ [ simpleField "exports" [t| [String] |]
+ ])
+
+instance RpcCall RpcCallExportList where
+ rpcCallName _ = "export_list"
+ rpcCallTimeout _ = rpcTimeoutToRaw Fast
+ rpcCallAcceptOffline _ = False
+ rpcCallData _ = J.encode
+
+instance Rpc RpcCallExportList RpcResultExportList where
+ rpcResultFill _ res = fromJSValueToRes res RpcResultExportList