MucOptions.java

 1package eu.siacs.conversations.entities;
 2
 3import android.annotation.SuppressLint;
 4
 5@SuppressLint("DefaultLocale")
 6public class MucOptions {
 7	public class User {
 8		public static final int ROLE_MODERATOR = 3;
 9		public static final int ROLE_NONE = 0;
10		public static final int ROLE_PARTICIPANT = 2;
11		public static final int ROLE_VISITOR = 1;
12		public static final int AFFILIATION_ADMIN = 4;
13		public static final int AFFILIATION_OWNER = 3;
14		public static final int AFFILIATION_MEMBER = 2;
15		public static final int AFFILIATION_OUTCAST = 1;
16		public static final int AFFILIATION_NONE = 0;
17		
18		private int role;
19		private int affiliation;
20		public int getRole() {
21			return this.role;
22		}
23		public void setRole(String role) {
24			role = role.toLowerCase();
25			if (role.equals("moderator")) {
26				this.role = ROLE_MODERATOR;
27			} else if (role.equals("participant")) {
28				this.role = ROLE_PARTICIPANT;
29			} else if (role.equals("visitor")) {
30				this.role = ROLE_VISITOR;
31			} else {
32				this.role = ROLE_NONE;
33			}
34		}
35		public int getAffiliation() {
36			return this.affiliation;
37		}
38		public void setAffiliation() {
39			
40		}
41	}
42}