# HG changeset patch # User nikita@localhost # Date 1246045576 -7200 # Node ID 5a932dabf465f19c1942a83ee2a4c69a6a7afbd7 # Parent 2cc05187c92e40b39cabd720111a16a0d0d30c82# Parent 8d36c81dcd65732a902793bb720944ab930520a0 merge du .classpath diff -r 2cc05187c92e -r 5a932dabf465 .classpath diff -r 2cc05187c92e -r 5a932dabf465 AndroidManifest.xml --- a/AndroidManifest.xml Fri Jun 26 21:45:05 2009 +0200 +++ b/AndroidManifest.xml Fri Jun 26 21:46:16 2009 +0200 @@ -1,4 +1,4 @@ - + diff -r 2cc05187c92e -r 5a932dabf465 res/values --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,1 @@ +values-en \ No newline at end of file diff -r 2cc05187c92e -r 5a932dabf465 res/values-en/arrays.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-en/arrays.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,8 @@ + + + + HTTP + SOCKS4 + SOCKS5 + + diff -r 2cc05187c92e -r 5a932dabf465 res/values-en/colors.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-en/colors.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,6 @@ + + + #A0C8FF + #000000 + #FFFFFF + \ No newline at end of file diff -r 2cc05187c92e -r 5a932dabf465 res/values-en/strings.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-en/strings.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,248 @@ + + + Beem + Ok + Clear + Accept + Refuse + + + + Jabber ID + + + + Connecting... + + + + Use the Beem Service + BeemService Created + BeemService destroyed + + + + Beem + host + Jabber ID + login + password + service + port + proxy_host + proxy_port + use_proxy + proxy_type + proxy_user + proxy_password + None + HTTP + SOCKS4 + SOCKS5 + status + status_text + + + Server connection + Userid: + Password: + Service: + Host/Port: + Proxy informations + Login: + Ok + + + Chat + Alias + Resend suscription + User infos + Block user + Delete user + Are you sure you want to delete this contact? + + Yes + No + + + Login: + Email: + Password: + Repeat: + Ok + Log with + Bad form + Account created + + + Beem - Add contact + Login: + Alias: + Group: + Ok + Contact added + Error Contact not added + Error Login + Bad form + + + + Beem - Chat + %s says :\n%s\n + You say :\n%s\n + %s\n + Tip text here + Is : + Error : %s\n + and is speaking from : + Insert a smiley + login + No status set + + + Type here your status message : + Beem - Change status + + Add new contact + Beem Project + Create account + Edit account + + Updating status + Nothing to change + + + Subscription accepted + Subscription error + Subscription refused + You have received a request for add by %s. Do you want to accept it ? + + + Not connected + + + You have got a new message + + + + + BEEM - Login Activity + + BEEM - Settings + BEEM - EditSettings Activity + + BEEM - Create an account + BEEM - CreateAccount Activity + + BEEM - Contacts + BEEM - ContactList Activity + + + + Reset + Login + Save + Create this account + Create and log + + + + Username + Password + + Login - Error + Close + + Create an account + Settings + About + + About + + BEEM is an EPITECH Innovative Project. Visit us at http://www.beem-project.com ! + + Close + + + + Create an account + Login + + The settings have been saved successfully. + + beem_settings + beem_account_username + beem_account_password + beem_xmpp_server + beem_xmpp_port + beem_xmpp_tls_use + beem_xmpp_proxy_use + beem_xmpp_proxy_server + beem_xmpp_proxy_port + beem_xmpp_proxy_username + beem_xmpp_proxy_password + beem_xmpp_proxy_type + + + edit_settings_tab_account + Account + + edit_settings_tab_xmpp + XMPP + + edit_settings_tab_proxy + Proxy + + + Username + Password + Server + Port + + + + Server + Port + Require SSL/TLS + + + Connect using a proxy + Choose a type of proxy + Server + Port + Username + Password + + + Create an account - Instructions + Create an account - Error + Change my settings + Close + + + has been created successfully + Passwords do not match. + + Username + Password + Confirm password + + + Add a contact + Settings + + diff -r 2cc05187c92e -r 5a932dabf465 res/values-en/styles.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-en/styles.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + diff -r 2cc05187c92e -r 5a932dabf465 res/values-fr/arrays.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-fr/arrays.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,8 @@ + + + + HTTP + SOCKS4 + SOCKS5 + + diff -r 2cc05187c92e -r 5a932dabf465 res/values-fr/colors.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-fr/colors.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,6 @@ + + + #A0C8FF + #000000 + #FFFFFF + \ No newline at end of file diff -r 2cc05187c92e -r 5a932dabf465 res/values-fr/strings.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-fr/strings.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,247 @@ + + + Beem + Ok + Annuler + Accepter + Refuser + + + + Jabber ID + + + + Connexion en cours... + + + + Utilisation du service BEEM + BeemService Créé + BeemService détruit + + + + Beem + host + Jabber ID + login + password + service + port + proxy_host + proxy_port + use_proxy + proxy_type + proxy_user + proxy_password + None + HTTP + SOCKS4 + SOCKS5 + status + status_text + + + Connexion au serveur + Utilisateurid: + Mot de passe: + Service: + Host/Port: + Informations Proxy + Nom d'utilisateur: + Ok + + + Chat + Alias + Réenvoyer la demande + Informations utilisateur + Bloquer l'utilisateur + Supprimer l'utilisateur + Êtes-vous sûr de vouloir supprimer ce contact ? + Oui + Non + + + Nom d'utilisateur: + Courriel: + Mot de passe: + Répéter: + Ok + Se connecter avec + Mauvais formulaire + Compte créé + + + Beem - Ajouter un contact + Nom d'utilisateur: + Alias: + Groupe: + Ok + Contact ajouté + Erreur Contact pas ajouté + Error Nom d'utilisateur + Mauvais formulaire + + + + Beem - Chat + %s dit :\n%s\n + Vous dites :\n%s\n + %s\n + Tapez votre texte ici + Est : + Erreur : %s\n + et est entrain de parler depuis : + Insérer un sourire + nom d'uilisateur + Aucun statut défini + + + Tapez votre message de statut ici : + Beem - Changer statut + + Ajouter un nouveau contact + Beem Project + Créé un compte + Modifier compte + + Mise à jour du statut + Rien à changer + + + Abonnement accepté + Erreur d'abonnement + Abonnement refusé + Vous avez une requête d'ajout de la part de %s. Souhaitez-vous l'accepter ? + + + Non connecté + + + Vous avez reçu un nouveau message + + + + + BEEM - Activité de connexion + + BEEM - Paramètres + BEEM - EditSettings Activity + + BEEM - Créer un compte + BEEM - CreateAccount Activity + + BEEM - Contacts + BEEM - ContactList Activity + + + + Réinitialiser + Se connecter + Enregistrer + Créer ce compte + Créer et enregistrer + + + + Nom d'utilisateur + Mot de passe + + Connexion - Erreur + Fermer + + Créer un compte + Paramètres + À propos + + À propos + + BEEM est un EPITECH Innovative Project. Rencontrez nous sur http://www.beem-project.com ! + + Fermer + + + + Créer un compte + Se connecter + + Les paramètres ont été enregistrés avec succès. + + beem_settings + beem_account_username + beem_account_password + beem_xmpp_server + beem_xmpp_port + beem_xmpp_tls_use + beem_xmpp_proxy_use + beem_xmpp_proxy_server + beem_xmpp_proxy_port + beem_xmpp_proxy_username + beem_xmpp_proxy_password + beem_xmpp_proxy_type + + + edit_settings_tab_account + Compte + + edit_settings_tab_xmpp + XMPP + + edit_settings_tab_proxy + Proxy + + + Nom d\'utilisateur + Mot de passe + Serveur + Port + + + + Serveur + Port + Utiliser SSL/TLS + + + Utiliser un proxy + Choisir un type de proxy + Serveur + Port + Nom d\'utilisateur + Mot de passe + + + Créer un compte - Instructions + Créer un compte - Erreur + Changer mes paramètres + Fermer + + + a été créé avec succès + Les mots de passe ne correspondent pas + + Nom d\'utilisateur + Mot de passe + Confirmer le mot de passe + + + Ajouter un contact + Paramètres + + diff -r 2cc05187c92e -r 5a932dabf465 res/values-fr/styles.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/res/values-fr/styles.xml Fri Jun 26 21:46:16 2009 +0200 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + diff -r 2cc05187c92e -r 5a932dabf465 res/values/arrays.xml --- a/res/values/arrays.xml Fri Jun 26 21:45:05 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - HTTP - SOCKS4 - SOCKS5 - - diff -r 2cc05187c92e -r 5a932dabf465 res/values/colors.xml --- a/res/values/colors.xml Fri Jun 26 21:45:05 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - #A0C8FF - #000000 - #FFFFFF - \ No newline at end of file diff -r 2cc05187c92e -r 5a932dabf465 res/values/strings.xml --- a/res/values/strings.xml Fri Jun 26 21:45:05 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,248 +0,0 @@ - - - Beem - Ok - Clear - Accept - Refuse - - - - Jabber ID - - - - Connecting... - - - - Use the Beem Service - BeemService Created - BeemService destroyed - - - - Beem - host - Jabber ID - login - password - service - port - proxy_host - proxy_port - use_proxy - proxy_type - proxy_user - proxy_password - None - HTTP - SOCKS4 - SOCKS5 - status - status_text - - - Server connection - Userid: - Password: - Service: - Host/Port: - Proxy informations - Login: - Ok - - - Chat - Alias - Resend suscription - User infos - Block user - Delete user - Are you sure you want to delete this contact? - - Yes - No - - - Login: - Email: - Password: - Repeat: - Ok - Log with - Bad form - Account created - - - Beem - Add contact - Login: - Alias: - Group: - Ok - Contact added - Error Contact not added - Error Login - Bad form - - - - Beem - Chat - %s says :\n%s\n - You say :\n%s\n - %s\n - Tip text here - Is : - Error : %s\n - and is speaking from : - Insert a smiley - login - No status set - - - Type here your status message : - Beem - Change status - - Add new contact - Beem Project - Create account - Edit account - - Updating status - Nothing to change - - - Subscription accepted - Subscription error - Subscription refused - You have received a request for add by %s. Do you want to accept it ? - - - Not connected - - - You have got a new message - - - - - BEEM - Login Activity - - BEEM - Settings - BEEM - EditSettings Activity - - BEEM - Create an account - BEEM - CreateAccount Activity - - BEEM - Contacts - BEEM - ContactList Activity - - - - Reset - Login - Save - Create this account - Create and log - - - - Username - Password - - Login - Error - Close - - Create an account - Settings - About - - About - - BEEM is an EPITECH Innovative Project. Visit us at http://www.beem-project.com ! - - Close - - - - Create an account - Login - - The settings have been saved successfully. - - beem_settings - beem_account_username - beem_account_password - beem_xmpp_server - beem_xmpp_port - beem_xmpp_tls_use - beem_xmpp_proxy_use - beem_xmpp_proxy_server - beem_xmpp_proxy_port - beem_xmpp_proxy_username - beem_xmpp_proxy_password - beem_xmpp_proxy_type - - - edit_settings_tab_account - Account - - edit_settings_tab_xmpp - XMPP - - edit_settings_tab_proxy - Proxy - - - Username - Password - Server - Port - - - - Server - Port - Require SSL/TLS - - - Connect using a proxy - Choose a type of proxy - Server - Port - Username - Password - - - Create an account - Instructions - Create an account - Error - Change my settings - Close - - - has been created successfully - Passwords do not match. - - Username - Password - Confirm password - - - Add a contact - Settings - - diff -r 2cc05187c92e -r 5a932dabf465 res/values/styles.xml --- a/res/values/styles.xml Fri Jun 26 21:45:05 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff -r 2cc05187c92e -r 5a932dabf465 src/com/beem/project/beem/service/Contact.java diff -r 2cc05187c92e -r 5a932dabf465 src/com/beem/project/beem/ui/ContactList.java diff -r 2cc05187c92e -r 5a932dabf465 src/com/beem/project/beem/ui/Login.java --- a/src/com/beem/project/beem/ui/Login.java Fri Jun 26 21:45:05 2009 +0200 +++ b/src/com/beem/project/beem/ui/Login.java Fri Jun 26 21:46:16 2009 +0200 @@ -18,7 +18,6 @@ import android.widget.TextView; import android.widget.Toast; -import com.beem.project.beem.BeemService; import com.beem.project.beem.R; import com.beem.project.beem.service.aidl.IBeemConnectionListener; import com.beem.project.beem.service.aidl.IXmppConnection; diff -r 2cc05187c92e -r 5a932dabf465 src/com/beem/project/beem/ui/SendIM.java --- a/src/com/beem/project/beem/ui/SendIM.java Fri Jun 26 21:45:05 2009 +0200 +++ b/src/com/beem/project/beem/ui/SendIM.java Fri Jun 26 21:46:16 2009 +0200 @@ -308,11 +308,9 @@ // INTERDICTION ! mChat.sendMessage(msg); if (mSpeak != 1) - mText.append(String.format( - getString(R.string.SendIMYouSay), text)); + mText.append(getString(R.string.SendIMYouSay, text)); else - mText.append(String.format( - getString(R.string.SendIMSameSpeaker), text)); + mText.append(getString(R.string.SendIMSameSpeaker, text)); mToSend.setText(null); mScrolling.fullScroll(ScrollView.FOCUS_DOWN); mToSend.requestFocus(); @@ -336,23 +334,15 @@ String from = message.getFrom(); if (from == null) { if (mSpeak != 1) - mText.append(String - .format(getString(R.string.SendIMYouSay), message - .getBody())); + mText.append(getString(R.string.SendIMYouSay, message.getBody())); else - mText.append(String.format( - getString(R.string.SendIMSameSpeaker), message - .getBody())); + mText.append(getString(R.string.SendIMYouSay, message.getBody())); mSpeak = 1; } else { - if (mSpeak != 2) { - String str = String.format(getString(R.string.SendIMSays), - mContactName, message.getBody()); - mText.append(str); - } else - mText.append(String.format( - getString(R.string.SendIMSameSpeaker), message - .getBody())); + if (mSpeak != 2) + mText.append(getString(R.string.SendIMSays, mContactName, message.getBody())); + else + mText.append(getString(R.string.SendIMSameSpeaker, message.getBody())); mSpeak = 2; } } @@ -466,21 +456,12 @@ public void run() { if (m.getBody() != null) { if (m.getType() == Message.MSG_TYPE_ERROR) { - mText.append(String.format( - getString(R.string.SendIMErrorMsg), m - .getBody())); + mText.append(getString(R.string.SendIMErrorMsg, m.getBody())); mSpeak = 0; } else if (mSpeak == 2) - mText.append(String.format( - getString(R.string.SendIMSameSpeaker), m - .getBody())); - else { - - String str = String.format( - getString(R.string.SendIMSays), - mContactName, m.getBody()); - mText.append(str); - } + mText.append(getString(R.string.SendIMSameSpeaker, m.getBody())); + else + mText.append(getString(R.string.SendIMSays, mContactName, m.getBody())); mScrolling.fullScroll(ScrollView.FOCUS_DOWN); mToSend.requestFocus(); mSpeak = 2; diff -r 2cc05187c92e -r 5a932dabf465 src/com/beem/project/beem/utils/PresenceType.java --- a/src/com/beem/project/beem/utils/PresenceType.java Fri Jun 26 21:45:05 2009 +0200 +++ b/src/com/beem/project/beem/utils/PresenceType.java Fri Jun 26 21:46:16 2009 +0200 @@ -1,5 +1,5 @@ /** - * + * */ package com.beem.project.beem.utils; @@ -13,28 +13,28 @@ /** * The user is available to receive messages (default). */ - public static final int AVAILABLE = 100; + public static final int AVAILABLE = 100; /** * The user is unavailable to receive messages. */ - public static final int UNAVAILABLE = 200; + public static final int UNAVAILABLE = 200; /** * Request subscription to recipient's presence. */ - public static final int SUBSCRIBE = 300; + public static final int SUBSCRIBE = 300; /** * Grant subscription to sender's presence. */ - public static final int SUBSCRIBED = 400; + public static final int SUBSCRIBED = 400; /** * Request removal of subscription to sender's presence. */ - public static final int UNSUBSCRIBE = 500; + public static final int UNSUBSCRIBE = 500; /** * Grant removal of subscription to sender's presence. @@ -44,77 +44,79 @@ /** * The presence packet contains an error message. */ - public static final int ERROR = 701; + public static final int ERROR = 701; /** * Get the presence type from a presence packet. - * - * @param presence - * the presence type + * @param presence the presence type + * @return an int representing the presence type */ public static int getPresenceType(Presence presence) { int res = PresenceType.ERROR; switch (presence.getType()) { - case available: - res = PresenceType.AVAILABLE; - break; - case unavailable: - res = PresenceType.UNAVAILABLE; - break; - case subscribe: - res = PresenceType.SUBSCRIBE; - break; - case subscribed: - res = PresenceType.SUBSCRIBED; - break; - case unsubscribe: - res = PresenceType.UNSUBSCRIBE; - break; - case unsubscribed: - res = PresenceType.UNSUBSCRIBED; - break; - case error: - default: - res = PresenceType.ERROR; + case available: + res = PresenceType.AVAILABLE; + break; + case unavailable: + res = PresenceType.UNAVAILABLE; + break; + case subscribe: + res = PresenceType.SUBSCRIBE; + break; + case subscribed: + res = PresenceType.SUBSCRIBED; + break; + case unsubscribe: + res = PresenceType.UNSUBSCRIBE; + break; + case unsubscribed: + res = PresenceType.UNSUBSCRIBED; + break; + case error: + default: + res = PresenceType.ERROR; } - ; return res; } /** - * Get the smack presence mode for a status - * - * @param status - * the status in beem + * Get the smack presence mode for a status. + * @param type the status type in beem * @return the presence mode to use in presence packet or null if there is no mode to use */ public static Presence.Type getPresenceTypeFrom(int type) { Presence.Type res; switch (type) { - case AVAILABLE: - res = Presence.Type.available; - break; - case UNAVAILABLE: - res = Presence.Type.unavailable; - break; - case SUBSCRIBE: - res = Presence.Type.subscribe; - break; - case SUBSCRIBED: - res = Presence.Type.subscribed; - break; - case UNSUBSCRIBE: - res = Presence.Type.unsubscribe; - break; - case UNSUBSCRIBED: - res = Presence.Type.unsubscribed; - break; - case ERROR: - res = Presence.Type.error; - break; - default: - return null; + case AVAILABLE: + res = Presence.Type.available; + break; + case UNAVAILABLE: + res = Presence.Type.unavailable; + break; + case SUBSCRIBE: + res = Presence.Type.subscribe; + break; + case SUBSCRIBED: + res = Presence.Type.subscribed; + break; + case UNSUBSCRIBE: + res = Presence.Type.unsubscribe; + break; + case UNSUBSCRIBED: + res = Presence.Type.unsubscribed; + break; + case ERROR: + res = Presence.Type.error; + break; + default: + return null; } return res; } + + /** + * Private default constructor + */ + private PresenceType() { + } } diff -r 2cc05187c92e -r 5a932dabf465 src/com/beem/project/beem/utils/Status.java --- a/src/com/beem/project/beem/utils/Status.java Fri Jun 26 21:45:05 2009 +0200 +++ b/src/com/beem/project/beem/utils/Status.java Fri Jun 26 21:46:16 2009 +0200 @@ -1,5 +1,5 @@ /** - * + * */ package com.beem.project.beem.utils; @@ -7,34 +7,34 @@ import org.jivesoftware.smack.packet.Presence.Mode; /** - * @author caribou + * @author marseille */ public class Status { /** * Status of a disconnected contact. */ - public static final int CONTACT_STATUS_DISCONNECT = 100; + public static final int CONTACT_STATUS_DISCONNECT = 100; /** * Status of a unavailable (long away) contact. */ - public static final int CONTACT_STATUS_UNAVAILABLE = 200; + public static final int CONTACT_STATUS_UNAVAILABLE = 200; /** * Status of a away contact. */ - public static final int CONTACT_STATUS_AWAY = 300; + public static final int CONTACT_STATUS_AWAY = 300; /** * Status of a busy contact. */ - public static final int CONTACT_STATUS_BUSY = 400; + public static final int CONTACT_STATUS_BUSY = 400; /** * Status of a available contact. */ - public static final int CONTACT_STATUS_AVAILABLE = 500; + public static final int CONTACT_STATUS_AVAILABLE = 500; /** * Status of a available for chat contact. @@ -42,41 +42,38 @@ public static final int CONTACT_STATUS_AVAILABLE_FOR_CHAT = 600; /** - * Get the smack presence mode for a status - * - * @param status - * the status in beem + * Get the smack presence mode for a status. + * @param status the status in beem * @return the presence mode to use in presence packet or null if there is no mode to use */ public static Presence.Mode getPresenceModeFromStatus(int status) { Presence.Mode res; switch (status) { - case CONTACT_STATUS_AVAILABLE: - res = Presence.Mode.available; - break; - case CONTACT_STATUS_AVAILABLE_FOR_CHAT: - res = Presence.Mode.chat; - break; - case CONTACT_STATUS_AWAY: - res = Presence.Mode.away; - break; - case CONTACT_STATUS_BUSY: - res = Presence.Mode.dnd; - break; - case CONTACT_STATUS_UNAVAILABLE: - res = Presence.Mode.xa; - break; - default: - return null; + case CONTACT_STATUS_AVAILABLE: + res = Presence.Mode.available; + break; + case CONTACT_STATUS_AVAILABLE_FOR_CHAT: + res = Presence.Mode.chat; + break; + case CONTACT_STATUS_AWAY: + res = Presence.Mode.away; + break; + case CONTACT_STATUS_BUSY: + res = Presence.Mode.dnd; + break; + case CONTACT_STATUS_UNAVAILABLE: + res = Presence.Mode.xa; + break; + default: + return null; } return res; } /** * Get the status of from a presence packet. - * - * @param presence - * the presence containing status + * @param presence the presence containing status + * @return an int representing the status */ public static int getStatusFromPresence(Presence presence) { int res = Status.CONTACT_STATUS_DISCONNECT; @@ -88,28 +85,34 @@ res = Status.CONTACT_STATUS_AVAILABLE; } else { switch (mode) { - case available: - res = Status.CONTACT_STATUS_AVAILABLE; - break; - case away: - res = Status.CONTACT_STATUS_AWAY; - break; - case chat: - res = Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT; - break; - case dnd: - res = Status.CONTACT_STATUS_BUSY; - break; - case xa: - res = Status.CONTACT_STATUS_UNAVAILABLE; - break; - default: - res = Status.CONTACT_STATUS_DISCONNECT; - break; + case available: + res = Status.CONTACT_STATUS_AVAILABLE; + break; + case away: + res = Status.CONTACT_STATUS_AWAY; + break; + case chat: + res = Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT; + break; + case dnd: + res = Status.CONTACT_STATUS_BUSY; + break; + case xa: + res = Status.CONTACT_STATUS_UNAVAILABLE; + break; + default: + res = Status.CONTACT_STATUS_DISCONNECT; + break; } } } return res; } + /** + * Default constructor masked + */ + private Status() { + } + }