on master help sign in
all tests pass
commit473263bf8782f822a9b28869aef19ff01c060551 authorAgentM <agentm@themactionfaction.com> dateTue 1 Dec 2015, 20:09 (11 years ago) parentf25ce68
2 files changed+15−3
ProjectM36/Server.hs+5−3 ProjectM36/Server/EntryPoints.hs+10
ProjectM36/Server.hs+5−3
@@ -2,7 +2,7 @@
22module ProjectM36.Server where
33
44import ProjectM36.Client
5−import ProjectM36.Server.EntryPoints (handleExecuteRelationalExpr, handleExecuteDatabaseContextExpr, handleLogin, handleExecuteHeadName, handleExecuteGraphExpr, handleExecuteTypeForRelationalExpr, handleRetrieveInclusionDependencies,handleRetrievePlanForDatabaseContextExpr, handleRetrieveTransactionGraph, handleRetrieveHeadTransactionUUID)
5+import ProjectM36.Server.EntryPoints
66import ProjectM36.Server.RemoteCallTypes
77import ProjectM36.Server.Config (ServerConfig(..))
88
@@ -29,8 +29,10 @@ serverDefinition = defaultProcess {
2929 handleCall (\conn (RetrievePlanForDatabaseContextExpr sessionId dbExpr) -> handleRetrievePlanForDatabaseContextExpr sessionId conn dbExpr),
3030 handleCall (\conn (RetrieveHeadTransactionUUID sessionId) -> handleRetrieveHeadTransactionUUID sessionId conn),
3131 handleCall (\conn (RetrieveTransactionGraph sessionId) -> handleRetrieveTransactionGraph sessionId conn),
32− handleCall (\conn Login -> handleLogin conn)
33− ],
32+ handleCall (\conn Login -> handleLogin conn),
33+ handleCall (\conn (CreateSessionAtHead headn) -> handleCreateSessionAtHead headn conn),
34+ handleCall (\conn (CreateSessionAtCommit commitId) -> handleCreateSessionAtCommit commitId conn)
35+ ],
3436 unhandledMessagePolicy = Log
3537 }
3638
ProjectM36/Server/EntryPoints.hs+10
@@ -55,4 +55,14 @@ handleRetrieveTransactionGraph sessionId conn = do
5555handleRetrieveHeadTransactionUUID :: SessionId -> Connection -> Process (ProcessReply (Maybe UUID) Connection)
5656handleRetrieveHeadTransactionUUID sessionId conn = do
5757 ret <- liftIO $ headTransactionUUID sessionId conn
58+ reply ret conn
59+
60+handleCreateSessionAtCommit :: UUID -> Connection -> Process (ProcessReply (Either RelationalError SessionId) Connection)
61+handleCreateSessionAtCommit commitId conn = do
62+ ret <- liftIO $ createSessionAtCommit commitId conn
63+ reply ret conn
64+
65+handleCreateSessionAtHead :: HeadName -> Connection -> Process (ProcessReply (Either RelationalError SessionId) Connection)
66+handleCreateSessionAtHead headn conn = do
67+ ret <- liftIO $ createSessionAtHead headn conn
5868 reply ret conn