Server/Services.cs
author sl
Thu, 14 Aug 2014 00:23:18 +0200
changeset 21 274a6b27c3f9
parent 20 e3d394dd0388
child 22 cac466b1b6e6
permissions -rw-r--r--
Adding server closing notification to clients.
sl@17
     1
using System;
sl@17
     2
using System.ServiceModel;
sl@19
     3
using System.Collections;
sl@17
     4
sl@20
     5
sl@17
     6
namespace SharpDisplayManager
sl@17
     7
{
sl@20
     8
    [ServiceContract(CallbackContract = typeof(IDisplayServiceCallback))]
sl@17
     9
    public interface IDisplayService
sl@17
    10
    {
sl@20
    11
        [OperationContract(IsOneWay = true)]
sl@20
    12
        void Connect(string aClientName);
sl@20
    13
sl@20
    14
        [OperationContract(IsOneWay = true)]
sl@17
    15
        void SetText(int aLineIndex, string aText);
sl@19
    16
sl@20
    17
        [OperationContract(IsOneWay = true)]
sl@19
    18
        void SetTexts(System.Collections.Generic.IList<string> aTexts);
sl@17
    19
    }
sl@20
    20
sl@20
    21
sl@20
    22
    public interface IDisplayServiceCallback
sl@20
    23
    {
sl@20
    24
        [OperationContract(IsOneWay = true)]
sl@20
    25
        void OnConnected();
sl@20
    26
sl@21
    27
        [OperationContract(IsOneWay = true)]
sl@20
    28
        void OnServerClosing();
sl@20
    29
    }
sl@17
    30
}