aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Presences.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-19 15:15:09 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-19 15:15:09 +0200
commit993477cd8301e1a9a19ccdc10008bc23928faf08 (patch)
tree06f7f52d55546676eaf4e894a58fe79423ab3ef6 /src/eu/siacs/conversations/entities/Presences.java
parent590e2403ab6d9d8f3b0158bf5218802216e9cd50 (diff)
reworked roster/contact handling. might break some stuff. not sycing to disk yet
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/entities/Presences.java37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/eu/siacs/conversations/entities/Presences.java b/src/eu/siacs/conversations/entities/Presences.java
index acbaafca..fd8af573 100644
--- a/src/eu/siacs/conversations/entities/Presences.java
+++ b/src/eu/siacs/conversations/entities/Presences.java
@@ -4,10 +4,6 @@ import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map.Entry;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
import eu.siacs.conversations.xml.Element;
public class Presences {
@@ -47,39 +43,6 @@ public class Presences {
return status;
}
- public String toJsonString() {
- JSONArray json = new JSONArray();
- Iterator<Entry<String, Integer>> it = presences.entrySet().iterator();
-
- while (it.hasNext()) {
- Entry<String, Integer> entry = it.next();
- JSONObject jObj = new JSONObject();
- try {
- jObj.put("resource", entry.getKey());
- jObj.put("status", entry.getValue());
- } catch (JSONException e) {
-
- }
- json.put(jObj);
- }
- return json.toString();
- }
-
- public static Presences fromJsonString(String jsonString) {
- Presences presences = new Presences();
- try {
- JSONArray json = new JSONArray(jsonString);
- for (int i = 0; i < json.length(); ++i) {
- JSONObject jObj = json.getJSONObject(i);
- presences.updatePresence(jObj.getString("resource"),
- jObj.getInt("status"));
- }
- } catch (JSONException e1) {
-
- }
- return presences;
- }
-
public static int parseShow(Element show) {
if (show == null) {
return Presences.ONLINE;