2ba97cb6fcc1702e4927d5c9a311cb144ea80f71
[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 }
16
17 instance == MTaskShare
18
19 //Constructor
20 makeShare :: String Int BCValue -> MTaskShare
21
22 //General viewing task
23 manageShares :: Task [MTaskDevice]
24 //manageShares :: [MTaskShare] -> Task MTaskShare
25
26 updateShares :: MTaskDevice ([MTaskShare] -> [MTaskShare]) -> Task [MTaskShare]
27
28 //Clean out shares when a task has been removed
29 cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare]
30 //cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare]
31 //Clean out shares when a device has been removed
32
33 updateShareFromPublish :: MTaskDevice Int BCValue -> Task BCValue
34 //updateShare :: Int BCValue -> Task [MTaskShare]
35
36 getRealShare :: MTaskDevice MTaskShare -> Shared BCValue
37 //getRealShare :: MTaskDevice BCShare -> Shared BCValue
38
39 //updateShare :: Int BCValue -> Task ()