git_bsmd/nsw/Source/bsmd.LockingService/IService.cs
Daniel Schick 4d76d7191d Neue Version 3.6.2.0:
- Speichern
- Locking (noch nicht funktional)
- Visit-Id anfordern (noch nicht funktional)
- neuer Splashscreen
2017-05-28 13:00:02 +00:00

58 lines
2.2 KiB
C#

// Copyright (c) 2017 schick Informatik
// Description:
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
namespace bsmd.LockingService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
[ServiceContract]
public interface IService
{
/// <summary>
/// Request a lock for a particular core
/// </summary>
/// <returns>true if successful</returns>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
Guid Lock(Guid messageCoreId, Guid userId);
/// <summary>
/// Relinquish lock for a particular core
/// </summary>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void Unlock(Guid messageCoreId, Guid userId);
/// <summary>
/// Get all locks currently in use (for search result..)
/// </summary>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
List<CoreLock> GetLocks();
/// <summary>
/// To avoid Timeout, send keepalive message
/// </summary>
/// <param name="currentLocks">currently held locks</param>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void LockRefresh(List<Guid> currentLocks, Guid userId);
/// <summary>
/// send a log message (convenience helper)
/// </summary>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void Log(string msg, string host, Guid userId);
}
}