refactoors
[mTask.git] / Shares / mTaskShare.dcl
1 definition module Shares.mTaskShare
2
3 import iTasks
4 import iTasks._Framework.Serialization
5 import mTask
6 import Devices.mTaskDevice
7
8 derive class iTask MTaskShare
9 derive gPrint BCState
10
11 :: MTaskShare =
12 {withTask :: [String]
13 ,identifier:: Int
14 ,value :: BCValue
15 ,humanName :: String
16 }
17
18 instance == MTaskShare
19
20 //Constructor
21 makeShare :: String String Int BCValue -> MTaskShare
22
23 //General viewing task
24 manageShares :: Task [MTaskDevice]
25 //manageShares :: [MTaskShare] -> Task MTaskShare
26
27 updateShares :: MTaskDevice ([MTaskShare] -> [MTaskShare]) -> Task [MTaskShare]
28
29 //Clean out shares when a task has been removed
30 cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare]
31 //cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare]
32 //Clean out shares when a device has been removed
33
34 updateShareFromPublish :: MTaskDevice Int BCValue -> Task BCValue
35 //updateShare :: Int BCValue -> Task [MTaskShare]
36
37 shareShare :: MTaskDevice MTaskShare -> Shared BCValue
38 //shareShare :: MTaskDevice BCShare -> Shared BCValue
39
40 //updateShare :: Int BCValue -> Task ()