Interface/Interface.cs
author sl
Thu, 14 Aug 2014 09:57:44 +0200
changeset 26 a6fb2b2f73b0
parent 24 f442150ff735
child 30 c375286d1a1c
permissions -rw-r--r--
Adding disconnect function to our interface.
sl@24
     1
using System;
sl@24
     2
using System.Collections.Generic;
sl@24
     3
using System.Linq;
sl@24
     4
using System.Text;
sl@24
     5
using System.Threading.Tasks;
sl@24
     6
using System.ServiceModel;
sl@24
     7
using System.Collections;
sl@24
     8
sl@24
     9
sl@24
    10
namespace SharpDisplayInterface
sl@24
    11
{
sl@24
    12
sl@24
    13
    [ServiceContract(CallbackContract = typeof(IDisplayServiceCallback))]
sl@24
    14
    public interface IDisplayService
sl@24
    15
    {
sl@24
    16
        [OperationContract(IsOneWay = true)]
sl@24
    17
        void Connect(string aClientName);
sl@24
    18
sl@24
    19
        [OperationContract(IsOneWay = true)]
sl@26
    20
        void Disconnect(string aClientName);
sl@26
    21
sl@26
    22
        [OperationContract(IsOneWay = true)]
sl@24
    23
        void SetText(int aLineIndex, string aText);
sl@24
    24
sl@24
    25
        [OperationContract(IsOneWay = true)]
sl@24
    26
        void SetTexts(System.Collections.Generic.IList<string> aTexts);
sl@24
    27
    }
sl@24
    28
sl@24
    29
sl@24
    30
    public interface IDisplayServiceCallback
sl@24
    31
    {
sl@24
    32
        [OperationContract(IsOneWay = true)]
sl@24
    33
        void OnConnected();
sl@24
    34
sl@24
    35
        [OperationContract(IsOneWay = true)]
sl@24
    36
        void OnServerClosing();
sl@24
    37
    }
sl@24
    38
sl@24
    39
sl@24
    40
sl@24
    41
}