Files
WeatherService/Remote/IWeatherServiceDuplex.cs

36 lines
1.0 KiB
C#

using System.Collections.Generic;
using System.ServiceModel;
using WeatherService.Devices;
using WeatherService.Values;
namespace WeatherService.Remote
{
[ServiceContract(CallbackContract = typeof(IWeatherServiceCallback))]
public interface IWeatherServiceDuplex
{
[OperationContract]
List<DeviceBase> GetDevices();
[OperationContract]
ReadingBase GetLatestReading(string deviceAddress, WeatherValueType valueType);
[OperationContract]
bool Subscribe();
[OperationContract]
bool Unsubscribe();
[OperationContract]
DeviceHistory GetDeviceHistory(string deviceAddress);
[OperationContract]
Dictionary<DeviceBase, List<ReadingBase>> GetDeviceHistoryByValueType(WeatherValueType valueType);
[OperationContract]
Dictionary<string, List<WindSpeedReading>> GetWindSpeedHistory(int groupIntervalMinutes);
[OperationContract]
Dictionary<string, int> GetWindDirectionHistory();
}
}