X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Shares%2FmTaskShare.dcl;h=57855c13bb93ee1a36f925cd88b919d3ba9544eb;hb=848595d1288804d6de43625f9e6f1cf76295c285;hp=0e73a820147244bb0ee328ee9b242fb3a22f2a85;hpb=c518754bec4758cce7d899463f9c68612c3bf4e4;p=mTask.git diff --git a/Shares/mTaskShare.dcl b/Shares/mTaskShare.dcl index 0e73a82..57855c1 100644 --- a/Shares/mTaskShare.dcl +++ b/Shares/mTaskShare.dcl @@ -5,19 +5,34 @@ import iTasks._Framework.Serialization import mTask import Devices.mTaskDevice -derive class iTask MTaskShareType, MTaskShare +derive class iTask MTaskShare -:: MTaskShareType = MTaskWithShare String | MTaskLens String :: MTaskShare = {withTask :: [String] - ,withDevice :: [String] ,identifier :: Int - ,realShare :: MTaskShareType ,value :: BCValue } -manageShares :: [MTaskShare] -> Task () +instance == MTaskShare -makeShare :: String String Int BCValue -> Task MTaskShare +//Constructor +makeShare :: String Int BCValue -> MTaskShare -updateShare :: Int BCValue -> Task () +//General viewing task +manageShares :: Task [MTaskDevice] +//manageShares :: [MTaskShare] -> Task MTaskShare + +updateShares :: MTaskDevice ([MTaskShare] -> [MTaskShare]) -> Task [MTaskShare] + +//Clean out shares when a task has been removed +cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare] +//cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare] +//Clean out shares when a device has been removed + +updateShareFromPublish :: MTaskDevice Int BCValue -> Task BCValue +//updateShare :: Int BCValue -> Task [MTaskShare] + +getRealShare :: MTaskDevice MTaskShare -> Shared BCValue +//getRealShare :: MTaskDevice BCShare -> Shared BCValue + +//updateShare :: Int BCValue -> Task ()