DBMS database creation
[hcoop/domtool2.git] / src / msg.sml
index bb6a2b1..23e8ac2 100644 (file)
@@ -93,9 +93,16 @@ fun send (bio, m) =
                                    sendList OpenSSL.writeString (bio, users))
       | MsgMultiConfig codes => (OpenSSL.writeInt (bio, 12);
                                 sendList OpenSSL.writeString (bio, codes))
                                    sendList OpenSSL.writeString (bio, users))
       | MsgMultiConfig codes => (OpenSSL.writeInt (bio, 12);
                                 sendList OpenSSL.writeString (bio, codes))
-      | MsgRmdom dom => (OpenSSL.writeInt (bio, 13);
-                        OpenSSL.writeString (bio, dom))
+      | MsgRmdom doms => (OpenSSL.writeInt (bio, 13);
+                         sendList OpenSSL.writeString (bio, doms))
       | MsgRegenerate => OpenSSL.writeInt (bio, 14)
       | MsgRegenerate => OpenSSL.writeInt (bio, 14)
+      | MsgRmuser dom => (OpenSSL.writeInt (bio, 15);
+                         OpenSSL.writeString (bio, dom))
+      | MsgCreateDbUser s => (OpenSSL.writeInt (bio, 16);
+                             OpenSSL.writeString (bio, s))
+      | MsgCreateDbTable {dbtype, dbname} => (OpenSSL.writeInt (bio, 17);
+                                             OpenSSL.writeString (bio, dbtype);
+                                             OpenSSL.writeString (bio, dbname))
 
 fun checkIt v =
     case v of
 
 fun checkIt v =
     case v of
@@ -143,8 +150,14 @@ fun recv bio =
                           (recvList OpenSSL.readString bio)
                   | 12 => Option.map MsgMultiConfig
                           (recvList OpenSSL.readString bio)
                           (recvList OpenSSL.readString bio)
                   | 12 => Option.map MsgMultiConfig
                           (recvList OpenSSL.readString bio)
-                  | 13 => Option.map MsgRmdom (OpenSSL.readString bio)
+                  | 13 => Option.map MsgRmdom (recvList OpenSSL.readString bio)
                   | 14 => SOME MsgRegenerate
                   | 14 => SOME MsgRegenerate
+                  | 15 => Option.map MsgRmuser (OpenSSL.readString bio)
+                  | 16 => Option.map MsgCreateDbUser (OpenSSL.readString bio)
+                  | 17 => (case (OpenSSL.readString bio, OpenSSL.readString bio) of
+                               (SOME dbtype, SOME dbname) =>
+                               SOME (MsgCreateDbTable {dbtype = dbtype, dbname = dbname})
+                             | _ => NONE)
                   | _ => NONE)
         
 end
                   | _ => NONE)
         
 end