X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/9b8c6dc8df86d6ba1c7512cb12445912a9035a89..a51387b870b88439f6d75ead15c22281dd5e4bff:/src/msg.sml diff --git a/src/msg.sml b/src/msg.sml index a745f5c..22f548c 100644 --- a/src/msg.sml +++ b/src/msg.sml @@ -119,6 +119,8 @@ fun sendQuery (bio, q) = OpenSSL.writeString (bio, s)) | QFirewall s => (OpenSSL.writeInt (bio, 5); OpenSSL.writeString (bio, s)) + | QAptExists s => (OpenSSL.writeInt (bio, 6); + OpenSSL.writeString (bio, s)) fun recvQuery bio = case OpenSSL.readInt bio of @@ -130,6 +132,7 @@ fun recvQuery bio = | 3 => Option.map QTrustedPath (OpenSSL.readString bio) | 4 => Option.map QSocket (OpenSSL.readString bio) | 5 => Option.map QFirewall (OpenSSL.readString bio) + | 6 => Option.map QAptExists (OpenSSL.readString bio) | _ => NONE) | NONE => NONE @@ -238,6 +241,10 @@ fun send (bio, m) = OpenSSL.writeString (bio, s)) | MsgReUsers => OpenSSL.writeInt (bio, 41) | MsgVmailChanged => OpenSSL.writeInt (bio, 42) + | MsgFirewallRegen => OpenSSL.writeInt (bio, 43) + | MsgAptQuery {section, description} => (OpenSSL.writeInt (bio, 44); + OpenSSL.writeString (bio, section); + OpenSSL.writeString (bio, description)) fun checkIt v = case v of @@ -352,6 +359,10 @@ fun recv bio = | 40 => Option.map MsgDescription (OpenSSL.readString bio) | 41 => SOME MsgReUsers | 42 => SOME MsgVmailChanged + | 43 => SOME MsgFirewallRegen + | 44 => (case (OpenSSL.readString bio, OpenSSL.readString bio) of + (SOME section, SOME description) => SOME (MsgAptQuery {section = section, description = description}) + | _ => NONE) | _ => NONE) end