diff options
| author | stuebinm | 2026-04-16 00:09:44 +0200 |
|---|---|---|
| committer | stuebinm | 2026-04-16 01:18:19 +0200 |
| commit | fbfa662922a2dcf34e8a2cf1eb020210de18c0af (patch) | |
| tree | 5acc0ee9a3e0bd290da9330bf2f46e6ea68bda23 /lib/OwnTracks.hs | |
| parent | 2f7666c1a8d6b06718f58e1327d2e235c0d2d98d (diff) | |
Owntracks.{Configuration,Command,Waypoint}: init
Diffstat (limited to '')
| -rw-r--r-- | lib/OwnTracks.hs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/OwnTracks.hs b/lib/OwnTracks.hs index ae81d0b..25b0ae9 100644 --- a/lib/OwnTracks.hs +++ b/lib/OwnTracks.hs @@ -9,7 +9,10 @@ module OwnTracks (Message(..), module OwnTracks.Location, - module OwnTracks.Status + module OwnTracks.Status, + module OwnTracks.Configuration, + module OwnTracks.Command, + module OwnTracks.Waypoint ) where import Data.Aeson @@ -29,10 +32,15 @@ import GHC.Generics (Generic) import OwnTracks.Location import OwnTracks.Status +import OwnTracks.Configuration +import OwnTracks.Command +import OwnTracks.Waypoint data Message = MsgLocation Location - | MsgStatus Status -- TODO + | MsgStatus Status + | MsgConfig Configuration + | MsgWaypoints [Waypoint] deriving (Generic, Show, Eq) instance FromJSON Message where @@ -41,4 +49,6 @@ instance FromJSON Message where case ty of "location" -> MsgLocation <$> parseJSON v "status" -> MsgStatus <$> parseJSON v + "configuration" -> MsgConfig <$> parseJSON v + "waypoints" -> MsgWaypoints <$> o .: "waypoints" _ -> fail "unknown _type of owntracks message." |
