aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/connector/gc/GCSmiliesProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc/GCSmiliesProvider.java')
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCSmiliesProvider.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCSmiliesProvider.java b/main/src/cgeo/geocaching/connector/gc/GCSmiliesProvider.java
new file mode 100644
index 0000000..1083a89
--- /dev/null
+++ b/main/src/cgeo/geocaching/connector/gc/GCSmiliesProvider.java
@@ -0,0 +1,50 @@
+package cgeo.geocaching.connector.gc;
+
+
+public class GCSmiliesProvider {
+ public enum Smiley {
+ SMILE(":)"),
+ BIG_SMILE(":D"),
+ COOL("8D"),
+ BLUSH(":I"),
+ TONGUE(":P"),
+ EVIL("}:)"),
+ WINK(";)"),
+ CLOWN(":o)"),
+ BLACK_EYE("B)"),
+ EIGHTBALL("8"),
+ FROWN(":("),
+ SHY("8)"),
+ SHOCKED(":O"),
+ ANGRY(":(!"),
+ DEAD("xx("),
+ SLEEPY("|)"),
+ KISSES(":X"),
+ APPROVE("^"),
+ DISAPPROVE("V"),
+ QUESTION("?");
+
+ public final String text;
+
+ private Smiley(final String text) {
+ this.text = text;
+ }
+
+ public int getItemId() {
+ return text.hashCode();
+ }
+ }
+
+ public static Smiley[] getSmilies() {
+ return Smiley.values();
+ }
+
+ public static Smiley getSmiley(int itemId) {
+ for (Smiley smiley : getSmilies()) {
+ if (smiley.getItemId() == itemId) {
+ return smiley;
+ }
+ }
+ return null;
+ }
+}