-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathMucOccupantConfiguration.cs
More file actions
137 lines (123 loc) · 4.77 KB
/
MucOccupantConfiguration.cs
File metadata and controls
137 lines (123 loc) · 4.77 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
using System;
using System.Collections.Generic;
using System.Text;
namespace Waher.Networking.XMPP.MUC
{
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
public class MucOccupantConfiguration
{
private readonly string jid;
private readonly string nickName;
private readonly string reason;
private readonly Affiliation? affiliation;
private readonly Role? role;
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="Jid">JID of occupant in room.</param>
/// <param name="Affiliation">Affiliation change, if specified.</param>
public MucOccupantConfiguration(string Jid, Affiliation Affiliation)
: this(Jid, string.Empty, Affiliation, null, string.Empty)
{
}
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="Jid">JID of occupant in room.</param>
/// <param name="Affiliation">Affiliation change, if specified.</param>
/// <param name="Reason">Optioanl Reason</param>
public MucOccupantConfiguration(string Jid, Affiliation Affiliation, string Reason)
: this(Jid, string.Empty, Affiliation, null, Reason)
{
}
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="Jid">JID of occupant in room.</param>
/// <param name="NickName">Nick-name of occupant in room.</param>
/// <param name="Affiliation">Affiliation change, if specified.</param>
public MucOccupantConfiguration(string Jid, string NickName, Affiliation Affiliation)
: this(Jid, NickName, Affiliation, null, string.Empty)
{
}
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="Jid">JID of occupant in room.</param>
/// <param name="NickName">Nick-name of occupant in room.</param>
/// <param name="Affiliation">Affiliation change, if specified.</param>
/// <param name="Reason">Optioanl Reason</param>
public MucOccupantConfiguration(string Jid, string NickName, Affiliation Affiliation, string Reason)
: this(Jid, NickName, Affiliation, null, Reason)
{
}
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="NickName">Nick-name of occupant in room.</param>
/// <param name="Role">Role change, if specified.</param>
public MucOccupantConfiguration(string NickName, Role Role)
: this(string.Empty, NickName, null, Role, string.Empty)
{
}
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="NickName">Nick-name of occupant in room.</param>
/// <param name="Role">Role change, if specified.</param>
/// <param name="Reason">Optioanl Reason</param>
public MucOccupantConfiguration(string NickName, Role Role, string Reason)
: this(string.Empty, NickName, null, Role, Reason)
{
}
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="Jid">JID of occupant in room.</param>
/// <param name="NickName">Nick-Name of occupant in room.</param>
/// <param name="Affiliation">Affiliation change, if specified.</param>
/// <param name="Role">Role change, if specified.</param>
public MucOccupantConfiguration(string Jid, string NickName, Affiliation? Affiliation, Role? Role)
: this(Jid, NickName, Affiliation, Role, string.Empty)
{
}
/// <summary>
/// Contains information about a configuration to be made to an occupant in a room.
/// </summary>
/// <param name="Jid">JID of occupant in room.</param>
/// <param name="NickName">Nick-Name of occupant in room.</param>
/// <param name="Affiliation">Affiliation change, if specified.</param>
/// <param name="Role">Role change, if specified.</param>
/// <param name="Reason">Optioanl Reason</param>
public MucOccupantConfiguration(string Jid, string NickName, Affiliation? Affiliation, Role? Role, string Reason)
{
this.jid = Jid;
this.nickName = NickName;
this.affiliation = Affiliation;
this.role = Role;
this.reason = Reason;
}
/// <summary>
/// Bare JID of occupant in room.
/// </summary>
public string Jid => this.jid;
/// <summary>
/// Nick-name of occupant in room.
/// </summary>
public string NickName => this.nickName;
/// <summary>
/// Affiliation change, if specified.
/// </summary>
public Affiliation? Affiliation => this.affiliation;
/// <summary>
/// Role change, if specified.
/// </summary>
public Role? Role => this.role;
/// <summary>
/// Optional reason.
/// </summary>
public string Reason => this.reason;
}
}