From fbfa662922a2dcf34e8a2cf1eb020210de18c0af Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 16 Apr 2026 00:09:44 +0200 Subject: Owntracks.{Configuration,Command,Waypoint}: init --- lib/OwnTracks.hs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/OwnTracks.hs') 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." -- cgit v1.2.3