--- 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 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.beem.project.beem" android:versionCode="1"
android:versionName="1.0">
--- /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
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string-array name="proxy_types">
+ <item>HTTP</item>
+ <item>SOCKS4</item>
+ <item>SOCKS5</item>
+ </string-array>
+</resources>
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="blue_sky">#A0C8FF</color>
+ <color name="black">#000000</color>
+ <color name="white">#FFFFFF</color>
+</resources>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Beem</string>
+ <string name="OkButton">Ok</string>
+ <string name="ClearButton">Clear</string>
+ <string name="AcceptButton">Accept</string>
+ <string name="RefuseButton">Refuse</string>
+
+ <!-- Beem class -->
+
+ <string name="BeemJabberID">Jabber ID</string>
+
+ <!-- BeemApplication class -->
+
+ <string name="BeemApplicationConnect">Connecting...</string>
+
+ <!-- BeemService class -->
+
+ <string name="BeemServiceDescription">Use the Beem Service</string>
+ <string name="BeemServiceCreated">BeemService Created</string>
+ <string name="BeemServiceDestroyed">BeemService destroyed</string>
+
+ <!-- Preferences informations -->
+
+ <string name="PreferenceFileName">Beem</string>
+ <string name="PreferenceHostKey">host</string>
+ <string name="PreferenceJID">Jabber ID</string>
+ <string name="PreferenceLoginKey">login</string>
+ <string name="PreferencePasswordKey">password</string>
+ <string name="PreferenceService">service</string>
+ <string name="PreferencePortKey">port</string>
+ <string name="PreferenceProxyHost">proxy_host</string>
+ <string name="PreferenceProxyPort">proxy_port</string>
+ <string name="PreferenceUseProxy">use_proxy</string>
+ <string name="PreferenceProxyType">proxy_type</string>
+ <string name="PreferenceProxyUser">proxy_user</string>
+ <string name="PreferenceProxyPassword">proxy_password</string>
+ <string name="PreferenceProxyTypeNone">None</string>
+ <string name="PreferenceProxyTypeHttp">HTTP</string>
+ <string name="PreferenceProxyTypeSocks4">SOCKS4</string>
+ <string name="PreferenceProxyTypeSocks5">SOCKS5</string>
+ <string name="PreferenceStatus">status</string>
+ <string name="PreferenceStatusText">status_text</string>
+
+ <!-- ContactListSettings class -->
+ <string name="CLSServerConnection">Server connection</string>
+ <string name="CLSUserid">Userid:</string>
+ <string name="CLSPassword">Password:</string>
+ <string name="CLSService">Service:</string>
+ <string name="CLSHostPort">Host/Port:</string>
+ <string name="CLSProxyInfo">Proxy informations</string>
+ <string name="CLSLogin">Login:</string>
+ <string name="CLSOkButton">Ok</string>
+
+ <!-- ContactDialog class -->
+ <string name="CDChat">Chat</string>
+ <string name="CDAlias">Alias</string>
+ <string name="CDResend">Resend suscription</string>
+ <string name="CDInfos">User infos</string>
+ <string name="CDBlock">Block user</string>
+ <string name="CDDelete">Delete user</string>
+ <string name="CDSure2Delete">Are you sure you want to delete this contact?
+ </string>
+ <string name="CDSure2DeleteYes">Yes</string>
+ <string name="CDSure2DeleteNo">No</string>
+
+ <!-- AccountCreation class -->
+ <string name="ACLogin">Login:</string>
+ <string name="ACEmail">Email:</string>
+ <string name="ACPassword">Password:</string>
+ <string name="ACRepeat">Repeat:</string>
+ <string name="ACOkButton">Ok</string>
+ <string name="ACOkLoginButton">Log with</string>
+ <string name="ACBadForm">Bad form</string>
+ <string name="ACCreated">Account created</string>
+
+ <!-- AddContact class -->
+ <string name="AddCActTitle">Beem - Add contact</string>
+ <string name="AddCLogin">Login:</string>
+ <string name="AddCAlias">Alias:</string>
+ <string name="AddCGroup">Group:</string>
+ <string name="AddCOkButton">Ok</string>
+ <string name="AddCContactAdded">Contact added</string>
+ <string name="AddCContactAddedError">Error Contact not added</string>
+ <string name="AddCContactAddedLoginError">Error Login</string>
+ <string name="AddCBadForm">Bad form</string>
+
+ <!-- SendIM class -->
+
+ <string name="SendIMActTitle">Beem - Chat</string>
+ <string name="SendIMSays"> %s says :\n%s\n</string>
+ <string name="SendIMYouSay">You say :\n%s\n</string>
+ <string name="SendIMSameSpeaker">%s\n</string>
+ <string name="SendIMToSendHint">Tip text here</string>
+ <string name="SendIMState">Is : </string>
+ <string name="SendIMErrorMsg">Error : %s\n</string>
+ <string name="SendIMFrom">and is speaking from : </string>
+ <string name="SendIMSmiley">Insert a smiley</string>
+ <string name="SendIMLoginHint">login</string>
+ <string name="SendIMNoStatusSet">No status set</string>
+
+ <!-- ChangeStatus class -->
+ <string name="ChangeStatusText">Type here your status message :</string>
+ <string name="ChangeStatusActTitle">Beem - Change status</string>
+
+ <string name="MenuAddContact">Add new contact</string>
+ <string name="MenuAccountAbout">Beem Project</string>
+ <string name="MenuAccountCreate">Create account</string>
+ <string name="MenuConnection">Edit account</string>
+
+ <string name="ChangeStatusOk">Updating status</string>
+ <string name="ChangeStatusNoChange">Nothing to change</string>
+
+ <!-- Subscription class -->
+ <string name="SubscriptAccept">Subscription accepted</string>
+ <string name="SubscriptError">Subscription error</string>
+ <string name="SubscriptRefused">Subscription refused</string>
+ <string name="SubscriptText">You have received a request for add by %s. Do you want to accept it ?</string>
+
+ <!-- ContactList class -->
+ <string name="ConListNotConnected">Not connected</string>
+
+ <!-- BeemChatManager -->
+ <string name="BeemChatManagerNewMessage">You have got a new message</string>
+
+ <!--
+ Services
+ -->
+
+ <!--
+ Activities
+ -->
+ <string name="login_tag">BEEM - Login Activity</string>
+
+ <string name="edit_settings_name">BEEM - Settings</string>
+ <string name="edit_settings_tag">BEEM - EditSettings Activity</string>
+
+ <string name="create_account_name">BEEM - Create an account</string>
+ <string name="create_account_tag">BEEM - CreateAccount Activity</string>
+
+ <string name="contact_list_name">BEEM - Contacts</string>
+ <string name="contact_list_tag">BEEM - ContactList Activity</string>
+
+
+ <!--
+ Buttons
+ -->
+ <string name="button_reset">Reset</string>
+ <string name="button_login">Login</string>
+ <string name="button_save">Save</string>
+ <string name="button_create_account">Create this account</string>
+ <string name="button_create_login_account">Create and log</string>
+
+
+ <!--
+ LogAs Activity
+ -->
+ <string name="login_username">Username</string>
+ <string name="login_password">Password</string>
+
+ <string name="login_error_dialog_title">Login - Error</string>
+ <string name="login_close_dialog_button">Close</string>
+
+ <string name="login_menu_create_account">Create an account</string>
+ <string name="login_menu_settings">Settings</string>
+ <string name="login_menu_about">About</string>
+
+ <string name="login_about_title">About</string>
+ <string name="login_about_msg">
+ BEEM is an EPITECH Innovative Project. Visit us at http://www.beem-project.com !
+ </string>
+ <string name="login_about_button">Close</string>
+
+
+ <!--
+ EditSettings Activity
+ -->
+ <string name="settings_menu_create_account">Create an account</string>
+ <string name="settings_menu_login">Login</string>
+
+ <string name="settings_saved_ok">The settings have been saved successfully.</string>
+
+ <string name="settings_filename">beem_settings</string>
+ <string name="settings_key_account_username">beem_account_username</string>
+ <string name="settings_key_account_password">beem_account_password</string>
+ <string name="settings_key_xmpp_server">beem_xmpp_server</string>
+ <string name="settings_key_xmpp_port">beem_xmpp_port</string>
+ <string name="settings_key_xmpp_tls_use">beem_xmpp_tls_use</string>
+ <string name="settings_key_proxy_use">beem_xmpp_proxy_use</string>
+ <string name="settings_key_proxy_server">beem_xmpp_proxy_server</string>
+ <string name="settings_key_proxy_port">beem_xmpp_proxy_port</string>
+ <string name="settings_key_proxy_username">beem_xmpp_proxy_username</string>
+ <string name="settings_key_proxy_password">beem_xmpp_proxy_password</string>
+ <string name="settings_key_proxy_type">beem_xmpp_proxy_type</string>
+
+ <!-- EditSettings Activity tabs -->
+ <string name="settings_tab_tag_account">edit_settings_tab_account</string>
+ <string name="settings_tab_label_account">Account</string>
+
+ <string name="settings_tab_tag_xmpp">edit_settings_tab_xmpp</string>
+ <string name="settings_tab_label_xmpp">XMPP</string>
+
+ <string name="settings_tab_tag_proxy">edit_settings_tab_proxy</string>
+ <string name="settings_tab_label_proxy">Proxy</string>
+
+ <!-- EditSettings Activity Account tab -->
+ <string name="settings_account_username">Username</string>
+ <string name="settings_account_password">Password</string>
+ <string name="settings_account_server">Server</string>
+ <string name="settings_account_port">Port</string>
+
+
+ <!-- EditSettings Activity XMPP tab -->
+ <string name="settings_xmpp_server">Server</string>
+ <string name="settings_xmpp_port">Port</string>
+ <string name="settings_xmpp_use_tls">Require SSL/TLS</string>
+
+ <!-- EditSettings Activity Proxy tab -->
+ <string name="settings_proxy_use">Connect using a proxy</string>
+ <string name="settings_proxy_type_prompt">Choose a type of proxy</string>
+ <string name="settings_proxy_server">Server</string>
+ <string name="settings_proxy_port">Port</string>
+ <string name="settings_proxy_username">Username</string>
+ <string name="settings_proxy_password">Password</string>
+
+ <!--
+ Create an account Activity
+ -->
+ <string name="create_account_instr_dialog_title">Create an account - Instructions</string>
+ <string name="create_account_err_dialog_title">Create an account - Error</string>
+ <string name="create_account_err_dialog_settings_button">Change my settings</string>
+ <string name="create_account_close_dialog_button">Close</string>
+
+
+ <string name="create_account_successfull_after">has been created successfully</string>
+ <string name="create_account_err_passwords">Passwords do not match.</string>
+
+ <string name="create_account_username">Username</string>
+ <string name="create_account_password">Password</string>
+ <string name="create_account_confirm_password">Confirm password</string>
+
+ <!--
+ ContactList Activity
+ -->
+ <string name="contact_list_menu_add_contact">Add a contact</string>
+ <string name="contact_list_menu_settings">Settings</string>
+
+</resources>
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="Label">
+ <item name="android:textSize">16sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:typeface">sans</item>
+ <item name="android:capitalize">characters</item>
+ <item name="android:textColor">#FFFFFF</item>
+ <item name="android:focusable">false</item>
+ </style>
+ <style name="CheckBoxLabel" parent="@style/Label">
+ <item name="android:enabled">true</item>
+ </style>
+ <style name="Theme.BEEM.Default" parent="@android:style/Theme">
+ <item name="android:windowBackground">@drawable/background</item>
+ </style>
+
+
+<!-- Old PC style -->
+
+ <style name="OldTheme">
+ <item name="android:textViewStyle" >@style/OldThemeTextView</item>
+ </style>
+ <style name="OldThemeTextView" parent="@android:style/Widget.TextView">
+ <item name="android:textColor">#ff009900</item>
+ <item name="android:background">@color/black</item>
+ </style>
+
+
+<!-- Other style -->
+
+</resources>
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string-array name="proxy_types">
+ <item>HTTP</item>
+ <item>SOCKS4</item>
+ <item>SOCKS5</item>
+ </string-array>
+</resources>
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="blue_sky">#A0C8FF</color>
+ <color name="black">#000000</color>
+ <color name="white">#FFFFFF</color>
+</resources>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Beem</string>
+ <string name="OkButton">Ok</string>
+ <string name="ClearButton">Annuler</string>
+ <string name="AcceptButton">Accepter</string>
+ <string name="RefuseButton">Refuser</string>
+
+ <!-- Beem class -->
+
+ <string name="BeemJabberID">Jabber ID</string>
+
+ <!-- BeemApplication class -->
+
+ <string name="BeemApplicationConnect">Connexion en cours...</string>
+
+ <!-- BeemService class -->
+
+ <string name="BeemServiceDescription">Utilisation du service BEEM</string>
+ <string name="BeemServiceCreated">BeemService Créé</string>
+ <string name="BeemServiceDestroyed">BeemService détruit</string>
+
+ <!-- Preferences informations -->
+
+ <string name="PreferenceFileName">Beem</string>
+ <string name="PreferenceHostKey">host</string>
+ <string name="PreferenceJID">Jabber ID</string>
+ <string name="PreferenceLoginKey">login</string>
+ <string name="PreferencePasswordKey">password</string>
+ <string name="PreferenceService">service</string>
+ <string name="PreferencePortKey">port</string>
+ <string name="PreferenceProxyHost">proxy_host</string>
+ <string name="PreferenceProxyPort">proxy_port</string>
+ <string name="PreferenceUseProxy">use_proxy</string>
+ <string name="PreferenceProxyType">proxy_type</string>
+ <string name="PreferenceProxyUser">proxy_user</string>
+ <string name="PreferenceProxyPassword">proxy_password</string>
+ <string name="PreferenceProxyTypeNone">None</string>
+ <string name="PreferenceProxyTypeHttp">HTTP</string>
+ <string name="PreferenceProxyTypeSocks4">SOCKS4</string>
+ <string name="PreferenceProxyTypeSocks5">SOCKS5</string>
+ <string name="PreferenceStatus">status</string>
+ <string name="PreferenceStatusText">status_text</string>
+
+ <!-- ContactListSettings class -->
+ <string name="CLSServerConnection">Connexion au serveur</string>
+ <string name="CLSUserid">Utilisateurid:</string>
+ <string name="CLSPassword">Mot de passe:</string>
+ <string name="CLSService">Service:</string>
+ <string name="CLSHostPort">Host/Port:</string>
+ <string name="CLSProxyInfo">Informations Proxy</string>
+ <string name="CLSLogin">Nom d'utilisateur:</string>
+ <string name="CLSOkButton">Ok</string>
+
+ <!-- ContactDialog class -->
+ <string name="CDChat">Chat</string>
+ <string name="CDAlias">Alias</string>
+ <string name="CDResend">Réenvoyer la demande</string>
+ <string name="CDInfos">Informations utilisateur</string>
+ <string name="CDBlock">Bloquer l'utilisateur</string>
+ <string name="CDDelete">Supprimer l'utilisateur</string>
+ <string name="CDSure2Delete">Êtes-vous sûr de vouloir supprimer ce contact ?</string>
+ <string name="CDSure2DeleteYes">Oui</string>
+ <string name="CDSure2DeleteNo">Non</string>
+
+ <!-- AccountCreation class -->
+ <string name="ACLogin">Nom d'utilisateur:</string>
+ <string name="ACEmail">Courriel:</string>
+ <string name="ACPassword">Mot de passe:</string>
+ <string name="ACRepeat">Répéter:</string>
+ <string name="ACOkButton">Ok</string>
+ <string name="ACOkLoginButton">Se connecter avec</string>
+ <string name="ACBadForm">Mauvais formulaire</string>
+ <string name="ACCreated">Compte créé</string>
+
+ <!-- AddContact class -->
+ <string name="AddCActTitle">Beem - Ajouter un contact</string>
+ <string name="AddCLogin">Nom d'utilisateur:</string>
+ <string name="AddCAlias">Alias:</string>
+ <string name="AddCGroup">Groupe:</string>
+ <string name="AddCOkButton">Ok</string>
+ <string name="AddCContactAdded">Contact ajouté</string>
+ <string name="AddCContactAddedError">Erreur Contact pas ajouté</string>
+ <string name="AddCContactAddedLoginError">Error Nom d'utilisateur</string>
+ <string name="AddCBadForm">Mauvais formulaire</string>
+
+ <!-- SendIM class -->
+
+ <string name="SendIMActTitle">Beem - Chat</string>
+ <string name="SendIMSays"> %s dit :\n%s\n</string>
+ <string name="SendIMYouSay">Vous dites :\n%s\n</string>
+ <string name="SendIMSameSpeaker">%s\n</string>
+ <string name="SendIMToSendHint">Tapez votre texte ici</string>
+ <string name="SendIMState">Est : </string>
+ <string name="SendIMErrorMsg">Erreur : %s\n</string>
+ <string name="SendIMFrom">et est entrain de parler depuis : </string>
+ <string name="SendIMSmiley">Insérer un sourire</string>
+ <string name="SendIMLoginHint">nom d'uilisateur</string>
+ <string name="SendIMNoStatusSet">Aucun statut défini</string>
+
+ <!-- ChangeStatus class -->
+ <string name="ChangeStatusText">Tapez votre message de statut ici :</string>
+ <string name="ChangeStatusActTitle">Beem - Changer statut</string>
+
+ <string name="MenuAddContact">Ajouter un nouveau contact</string>
+ <string name="MenuAccountAbout">Beem Project</string>
+ <string name="MenuAccountCreate">Créé un compte</string>
+ <string name="MenuConnection">Modifier compte</string>
+
+ <string name="ChangeStatusOk">Mise à jour du statut</string>
+ <string name="ChangeStatusNoChange">Rien à changer</string>
+
+ <!-- Subscription class -->
+ <string name="SubscriptAccept">Abonnement accepté</string>
+ <string name="SubscriptError">Erreur d'abonnement</string>
+ <string name="SubscriptRefused">Abonnement refusé</string>
+ <string name="SubscriptText">Vous avez une requête d'ajout de la part de %s. Souhaitez-vous l'accepter ?</string>
+
+ <!-- ContactList class -->
+ <string name="ConListNotConnected">Non connecté</string>
+
+ <!-- BeemChatManager -->
+ <string name="BeemChatManagerNewMessage">Vous avez reçu un nouveau message</string>
+
+ <!--
+ Services
+ -->
+
+ <!--
+ Activities
+ -->
+ <string name="login_tag">BEEM - Activité de connexion</string>
+
+ <string name="edit_settings_name">BEEM - Paramètres</string>
+ <string name="edit_settings_tag">BEEM - EditSettings Activity</string>
+
+ <string name="create_account_name">BEEM - Créer un compte</string>
+ <string name="create_account_tag">BEEM - CreateAccount Activity</string>
+
+ <string name="contact_list_name">BEEM - Contacts</string>
+ <string name="contact_list_tag">BEEM - ContactList Activity</string>
+
+
+ <!--
+ Buttons
+ -->
+ <string name="button_reset">Réinitialiser</string>
+ <string name="button_login">Se connecter</string>
+ <string name="button_save">Enregistrer</string>
+ <string name="button_create_account">Créer ce compte</string>
+ <string name="button_create_login_account">Créer et enregistrer</string>
+
+
+ <!--
+ LogAs Activity
+ -->
+ <string name="login_username">Nom d'utilisateur</string>
+ <string name="login_password">Mot de passe</string>
+
+ <string name="login_error_dialog_title">Connexion - Erreur</string>
+ <string name="login_close_dialog_button">Fermer</string>
+
+ <string name="login_menu_create_account">Créer un compte</string>
+ <string name="login_menu_settings">Paramètres</string>
+ <string name="login_menu_about">À propos</string>
+
+ <string name="login_about_title">À propos</string>
+ <string name="login_about_msg">
+ BEEM est un EPITECH Innovative Project. Rencontrez nous sur http://www.beem-project.com !
+ </string>
+ <string name="login_about_button">Fermer</string>
+
+
+ <!--
+ EditSettings Activity
+ -->
+ <string name="settings_menu_create_account">Créer un compte</string>
+ <string name="settings_menu_login">Se connecter</string>
+
+ <string name="settings_saved_ok">Les paramètres ont été enregistrés avec succès.</string>
+
+ <string name="settings_filename">beem_settings</string>
+ <string name="settings_key_account_username">beem_account_username</string>
+ <string name="settings_key_account_password">beem_account_password</string>
+ <string name="settings_key_xmpp_server">beem_xmpp_server</string>
+ <string name="settings_key_xmpp_port">beem_xmpp_port</string>
+ <string name="settings_key_xmpp_tls_use">beem_xmpp_tls_use</string>
+ <string name="settings_key_proxy_use">beem_xmpp_proxy_use</string>
+ <string name="settings_key_proxy_server">beem_xmpp_proxy_server</string>
+ <string name="settings_key_proxy_port">beem_xmpp_proxy_port</string>
+ <string name="settings_key_proxy_username">beem_xmpp_proxy_username</string>
+ <string name="settings_key_proxy_password">beem_xmpp_proxy_password</string>
+ <string name="settings_key_proxy_type">beem_xmpp_proxy_type</string>
+
+ <!-- EditSettings Activity tabs -->
+ <string name="settings_tab_tag_account">edit_settings_tab_account</string>
+ <string name="settings_tab_label_account">Compte</string>
+
+ <string name="settings_tab_tag_xmpp">edit_settings_tab_xmpp</string>
+ <string name="settings_tab_label_xmpp">XMPP</string>
+
+ <string name="settings_tab_tag_proxy">edit_settings_tab_proxy</string>
+ <string name="settings_tab_label_proxy">Proxy</string>
+
+ <!-- EditSettings Activity Account tab -->
+ <string name="settings_account_username">Nom d\'utilisateur</string>
+ <string name="settings_account_password">Mot de passe</string>
+ <string name="settings_account_server">Serveur</string>
+ <string name="settings_account_port">Port</string>
+
+
+ <!-- EditSettings Activity XMPP tab -->
+ <string name="settings_xmpp_server">Serveur</string>
+ <string name="settings_xmpp_port">Port</string>
+ <string name="settings_xmpp_use_tls">Utiliser SSL/TLS</string>
+
+ <!-- EditSettings Activity Proxy tab -->
+ <string name="settings_proxy_use">Utiliser un proxy</string>
+ <string name="settings_proxy_type_prompt">Choisir un type de proxy</string>
+ <string name="settings_proxy_server">Serveur</string>
+ <string name="settings_proxy_port">Port</string>
+ <string name="settings_proxy_username">Nom d\'utilisateur</string>
+ <string name="settings_proxy_password">Mot de passe</string>
+
+ <!--
+ Create an account Activity
+ -->
+ <string name="create_account_instr_dialog_title">Créer un compte - Instructions</string>
+ <string name="create_account_err_dialog_title">Créer un compte - Erreur</string>
+ <string name="create_account_err_dialog_settings_button">Changer mes paramètres</string>
+ <string name="create_account_close_dialog_button">Fermer</string>
+
+
+ <string name="create_account_successfull_after">a été créé avec succès</string>
+ <string name="create_account_err_passwords">Les mots de passe ne correspondent pas</string>
+
+ <string name="create_account_username">Nom d\'utilisateur</string>
+ <string name="create_account_password">Mot de passe</string>
+ <string name="create_account_confirm_password">Confirmer le mot de passe</string>
+
+ <!--
+ ContactList Activity
+ -->
+ <string name="contact_list_menu_add_contact">Ajouter un contact</string>
+ <string name="contact_list_menu_settings">Paramètres</string>
+
+</resources>
--- /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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="Label">
+ <item name="android:textSize">16sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:typeface">sans</item>
+ <item name="android:capitalize">characters</item>
+ <item name="android:textColor">#FFFFFF</item>
+ <item name="android:focusable">false</item>
+ </style>
+ <style name="CheckBoxLabel" parent="@style/Label">
+ <item name="android:enabled">true</item>
+ </style>
+ <style name="Theme.BEEM.Default" parent="@android:style/Theme">
+ <item name="android:windowBackground">@drawable/background</item>
+ </style>
+
+
+<!-- Old PC style -->
+
+ <style name="OldTheme">
+ <item name="android:textViewStyle" >@style/OldThemeTextView</item>
+ </style>
+ <style name="OldThemeTextView" parent="@android:style/Widget.TextView">
+ <item name="android:textColor">#ff009900</item>
+ <item name="android:background">@color/black</item>
+ </style>
+
+
+<!-- Other style -->
+
+</resources>
--- 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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <string-array name="proxy_types">
- <item>HTTP</item>
- <item>SOCKS4</item>
- <item>SOCKS5</item>
- </string-array>
-</resources>
--- 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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <color name="blue_sky">#A0C8FF</color>
- <color name="black">#000000</color>
- <color name="white">#FFFFFF</color>
-</resources>
\ No newline at end of file
--- 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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <string name="app_name">Beem</string>
- <string name="OkButton">Ok</string>
- <string name="ClearButton">Clear</string>
- <string name="AcceptButton">Accept</string>
- <string name="RefuseButton">Refuse</string>
-
- <!-- Beem class -->
-
- <string name="BeemJabberID">Jabber ID</string>
-
- <!-- BeemApplication class -->
-
- <string name="BeemApplicationConnect">Connecting...</string>
-
- <!-- BeemService class -->
-
- <string name="BeemServiceDescription">Use the Beem Service</string>
- <string name="BeemServiceCreated">BeemService Created</string>
- <string name="BeemServiceDestroyed">BeemService destroyed</string>
-
- <!-- Preferences informations -->
-
- <string name="PreferenceFileName">Beem</string>
- <string name="PreferenceHostKey">host</string>
- <string name="PreferenceJID">Jabber ID</string>
- <string name="PreferenceLoginKey">login</string>
- <string name="PreferencePasswordKey">password</string>
- <string name="PreferenceService">service</string>
- <string name="PreferencePortKey">port</string>
- <string name="PreferenceProxyHost">proxy_host</string>
- <string name="PreferenceProxyPort">proxy_port</string>
- <string name="PreferenceUseProxy">use_proxy</string>
- <string name="PreferenceProxyType">proxy_type</string>
- <string name="PreferenceProxyUser">proxy_user</string>
- <string name="PreferenceProxyPassword">proxy_password</string>
- <string name="PreferenceProxyTypeNone">None</string>
- <string name="PreferenceProxyTypeHttp">HTTP</string>
- <string name="PreferenceProxyTypeSocks4">SOCKS4</string>
- <string name="PreferenceProxyTypeSocks5">SOCKS5</string>
- <string name="PreferenceStatus">status</string>
- <string name="PreferenceStatusText">status_text</string>
-
- <!-- ContactListSettings class -->
- <string name="CLSServerConnection">Server connection</string>
- <string name="CLSUserid">Userid:</string>
- <string name="CLSPassword">Password:</string>
- <string name="CLSService">Service:</string>
- <string name="CLSHostPort">Host/Port:</string>
- <string name="CLSProxyInfo">Proxy informations</string>
- <string name="CLSLogin">Login:</string>
- <string name="CLSOkButton">Ok</string>
-
- <!-- ContactDialog class -->
- <string name="CDChat">Chat</string>
- <string name="CDAlias">Alias</string>
- <string name="CDResend">Resend suscription</string>
- <string name="CDInfos">User infos</string>
- <string name="CDBlock">Block user</string>
- <string name="CDDelete">Delete user</string>
- <string name="CDSure2Delete">Are you sure you want to delete this contact?
- </string>
- <string name="CDSure2DeleteYes">Yes</string>
- <string name="CDSure2DeleteNo">No</string>
-
- <!-- AccountCreation class -->
- <string name="ACLogin">Login:</string>
- <string name="ACEmail">Email:</string>
- <string name="ACPassword">Password:</string>
- <string name="ACRepeat">Repeat:</string>
- <string name="ACOkButton">Ok</string>
- <string name="ACOkLoginButton">Log with</string>
- <string name="ACBadForm">Bad form</string>
- <string name="ACCreated">Account created</string>
-
- <!-- AddContact class -->
- <string name="AddCActTitle">Beem - Add contact</string>
- <string name="AddCLogin">Login:</string>
- <string name="AddCAlias">Alias:</string>
- <string name="AddCGroup">Group:</string>
- <string name="AddCOkButton">Ok</string>
- <string name="AddCContactAdded">Contact added</string>
- <string name="AddCContactAddedError">Error Contact not added</string>
- <string name="AddCContactAddedLoginError">Error Login</string>
- <string name="AddCBadForm">Bad form</string>
-
- <!-- SendIM class -->
-
- <string name="SendIMActTitle">Beem - Chat</string>
- <string name="SendIMSays"> %s says :\n%s\n</string>
- <string name="SendIMYouSay">You say :\n%s\n</string>
- <string name="SendIMSameSpeaker">%s\n</string>
- <string name="SendIMToSendHint">Tip text here</string>
- <string name="SendIMState">Is : </string>
- <string name="SendIMErrorMsg">Error : %s\n</string>
- <string name="SendIMFrom">and is speaking from : </string>
- <string name="SendIMSmiley">Insert a smiley</string>
- <string name="SendIMLoginHint">login</string>
- <string name="SendIMNoStatusSet">No status set</string>
-
- <!-- ChangeStatus class -->
- <string name="ChangeStatusText">Type here your status message :</string>
- <string name="ChangeStatusActTitle">Beem - Change status</string>
-
- <string name="MenuAddContact">Add new contact</string>
- <string name="MenuAccountAbout">Beem Project</string>
- <string name="MenuAccountCreate">Create account</string>
- <string name="MenuConnection">Edit account</string>
-
- <string name="ChangeStatusOk">Updating status</string>
- <string name="ChangeStatusNoChange">Nothing to change</string>
-
- <!-- Subscription class -->
- <string name="SubscriptAccept">Subscription accepted</string>
- <string name="SubscriptError">Subscription error</string>
- <string name="SubscriptRefused">Subscription refused</string>
- <string name="SubscriptText">You have received a request for add by %s. Do you want to accept it ?</string>
-
- <!-- ContactList class -->
- <string name="ConListNotConnected">Not connected</string>
-
- <!-- BeemChatManager -->
- <string name="BeemChatManagerNewMessage">You have got a new message</string>
-
- <!--
- Services
- -->
-
- <!--
- Activities
- -->
- <string name="login_tag">BEEM - Login Activity</string>
-
- <string name="edit_settings_name">BEEM - Settings</string>
- <string name="edit_settings_tag">BEEM - EditSettings Activity</string>
-
- <string name="create_account_name">BEEM - Create an account</string>
- <string name="create_account_tag">BEEM - CreateAccount Activity</string>
-
- <string name="contact_list_name">BEEM - Contacts</string>
- <string name="contact_list_tag">BEEM - ContactList Activity</string>
-
-
- <!--
- Buttons
- -->
- <string name="button_reset">Reset</string>
- <string name="button_login">Login</string>
- <string name="button_save">Save</string>
- <string name="button_create_account">Create this account</string>
- <string name="button_create_login_account">Create and log</string>
-
-
- <!--
- LogAs Activity
- -->
- <string name="login_username">Username</string>
- <string name="login_password">Password</string>
-
- <string name="login_error_dialog_title">Login - Error</string>
- <string name="login_close_dialog_button">Close</string>
-
- <string name="login_menu_create_account">Create an account</string>
- <string name="login_menu_settings">Settings</string>
- <string name="login_menu_about">About</string>
-
- <string name="login_about_title">About</string>
- <string name="login_about_msg">
- BEEM is an EPITECH Innovative Project. Visit us at http://www.beem-project.com !
- </string>
- <string name="login_about_button">Close</string>
-
-
- <!--
- EditSettings Activity
- -->
- <string name="settings_menu_create_account">Create an account</string>
- <string name="settings_menu_login">Login</string>
-
- <string name="settings_saved_ok">The settings have been saved successfully.</string>
-
- <string name="settings_filename">beem_settings</string>
- <string name="settings_key_account_username">beem_account_username</string>
- <string name="settings_key_account_password">beem_account_password</string>
- <string name="settings_key_xmpp_server">beem_xmpp_server</string>
- <string name="settings_key_xmpp_port">beem_xmpp_port</string>
- <string name="settings_key_xmpp_tls_use">beem_xmpp_tls_use</string>
- <string name="settings_key_proxy_use">beem_xmpp_proxy_use</string>
- <string name="settings_key_proxy_server">beem_xmpp_proxy_server</string>
- <string name="settings_key_proxy_port">beem_xmpp_proxy_port</string>
- <string name="settings_key_proxy_username">beem_xmpp_proxy_username</string>
- <string name="settings_key_proxy_password">beem_xmpp_proxy_password</string>
- <string name="settings_key_proxy_type">beem_xmpp_proxy_type</string>
-
- <!-- EditSettings Activity tabs -->
- <string name="settings_tab_tag_account">edit_settings_tab_account</string>
- <string name="settings_tab_label_account">Account</string>
-
- <string name="settings_tab_tag_xmpp">edit_settings_tab_xmpp</string>
- <string name="settings_tab_label_xmpp">XMPP</string>
-
- <string name="settings_tab_tag_proxy">edit_settings_tab_proxy</string>
- <string name="settings_tab_label_proxy">Proxy</string>
-
- <!-- EditSettings Activity Account tab -->
- <string name="settings_account_username">Username</string>
- <string name="settings_account_password">Password</string>
- <string name="settings_account_server">Server</string>
- <string name="settings_account_port">Port</string>
-
-
- <!-- EditSettings Activity XMPP tab -->
- <string name="settings_xmpp_server">Server</string>
- <string name="settings_xmpp_port">Port</string>
- <string name="settings_xmpp_use_tls">Require SSL/TLS</string>
-
- <!-- EditSettings Activity Proxy tab -->
- <string name="settings_proxy_use">Connect using a proxy</string>
- <string name="settings_proxy_type_prompt">Choose a type of proxy</string>
- <string name="settings_proxy_server">Server</string>
- <string name="settings_proxy_port">Port</string>
- <string name="settings_proxy_username">Username</string>
- <string name="settings_proxy_password">Password</string>
-
- <!--
- Create an account Activity
- -->
- <string name="create_account_instr_dialog_title">Create an account - Instructions</string>
- <string name="create_account_err_dialog_title">Create an account - Error</string>
- <string name="create_account_err_dialog_settings_button">Change my settings</string>
- <string name="create_account_close_dialog_button">Close</string>
-
-
- <string name="create_account_successfull_after">has been created successfully</string>
- <string name="create_account_err_passwords">Passwords do not match.</string>
-
- <string name="create_account_username">Username</string>
- <string name="create_account_password">Password</string>
- <string name="create_account_confirm_password">Confirm password</string>
-
- <!--
- ContactList Activity
- -->
- <string name="contact_list_menu_add_contact">Add a contact</string>
- <string name="contact_list_menu_settings">Settings</string>
-
-</resources>
--- 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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <style name="Label">
- <item name="android:textSize">16sp</item>
- <item name="android:textStyle">bold</item>
- <item name="android:typeface">sans</item>
- <item name="android:capitalize">characters</item>
- <item name="android:textColor">#FFFFFF</item>
- <item name="android:focusable">false</item>
- </style>
- <style name="CheckBoxLabel" parent="@style/Label">
- <item name="android:enabled">true</item>
- </style>
- <style name="Theme.BEEM.Default" parent="@android:style/Theme">
- <item name="android:windowBackground">@drawable/background</item>
- </style>
-
-
-<!-- Old PC style -->
-
- <style name="OldTheme">
- <item name="android:textViewStyle" >@style/OldThemeTextView</item>
- </style>
- <style name="OldThemeTextView" parent="@android:style/Widget.TextView">
- <item name="android:textColor">#ff009900</item>
- <item name="android:background">@color/black</item>
- </style>
-
-
-<!-- Other style -->
-
-</resources>
--- 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;
--- 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;
--- 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() {
+ }
}
--- 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() {
+ }
+
}