Server/Services.cs
author sl
Wed, 13 Aug 2014 23:02:40 +0200
changeset 20 e3d394dd0388
parent 19 1a85ec255882
child 21 274a6b27c3f9
permissions -rw-r--r--
Now support duplex mode with new client.
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@20
    27
        [OperationContract]
sl@20
    28
        void OnServerClosing();
sl@20
    29
    }
sl@17
    30
}