package com.kii.cloud.sync;

public interface Authentication {

    /**
     * Change the password of the user.
     * 
     * @param oldPassword
     * @param newPassword
     */
    public int changePassword(String oldPassword, String newPassword);
    
    /**
     * Register user if no account has been registered
     * 
     * @param userName
     *            : user name for login
     * @param password
     *            : password (min length and max length)
     * @param country
     *            :
     * @param nickName
     *            :
     * @param mobile
     *            :
     * @return
     *
     */
    public int register(String userName, String password, String country,
            String nickName, String mobile);
    
    /**
     * Log in using the given username and password. 
     * If the given password is different from previous one, it will login again
     * else just return OK.
     * 
     * @param username
     * @param password
     * @return
     */
    public int login(String username, String password);
    
    /**
     * Logout by clearing all the user information.
     * @return
     */
    public int logout();
    
}

@@ -247,38 +247,34 @@
  newPassword);%0D%0A
-    
 %0D%0A
+
     /**%0D%0A     * 
@@ -630,16 +630,8 @@
 rn%0D%0A
-     *%0D%0A
     
@@ -752,30 +752,26 @@
 g mobile);%0D%0A
-    
 %0D%0A
+
     /**%0D%0A   
@@ -820,25 +820,16 @@
 ssword. 
-%0D%0A     * 
 If the g
@@ -844,16 +844,24 @@
 sword is
+%0D%0A     *
  differe
@@ -901,24 +901,16 @@
 in again
-%0D%0A     *
  else ju
@@ -1063,22 +1063,18 @@
 word);%0D%0A
-    
 %0D%0A
+
     /**%0D
@@ -1127,16 +1127,25 @@
 ation.%0D%0A
+     * %0D%0A
      * @
@@ -1187,17 +1187,13 @@
 out();%0D%0A
-    
 %0D%0A%7D%0D%0A

format code