aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/IClientAPI2.cs
blob: aa70dc3b5081297218d498f538fddc15eccfd2fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;

namespace OpenSim.Framework
{
    #region Args Classes
    public class ICA2_ConnectionArgs : EventArgs
    {

    }

    public class ICA2_DisconnectionArgs : EventArgs
    {
        public bool Forced;

        // Static Constructor
        // Allows us to recycle these classes later more easily from a pool.
        public static ICA2_DisconnectionArgs Create(bool forced)
        {
            ICA2_DisconnectionArgs tmp = new ICA2_DisconnectionArgs();
            tmp.Forced = forced;

            return tmp;
        }
    }

    public class ICA2_PingArgs : EventArgs
    {
    }

    public class ICA2_AvatarAppearanceArgs : EventArgs
    {
    }

    public class ICA2_TerraformArgs : EventArgs
    {
        public double XMin;
        public double XMax;
        public double YMin;
        public double YMax;
        public Guid Action;
        public double Strength; // 0 .. 1
        public double Radius;
    }
    #endregion

    public delegate void ICA2_OnTerraformDelegate(IClientAPI2 sender, ICA2_TerraformArgs e);

    public interface IClientAPI2
    {
        // Connect / Disconnect
        void Connect(ICA2_ConnectionArgs e);
        void Disconnect(ICA2_DisconnectionArgs e);
        void Ping(ICA2_PingArgs e);

        void SendAvatarAppearance(ICA2_AvatarAppearanceArgs e);

        event ICA2_OnTerraformDelegate OnTerraform;
    }
}