com.kii.cloud.filesync
Class KiiFS

java.lang.Object
  extended by com.kii.cloud.filesync.KiiFS

public final class KiiFS
extends java.lang.Object

Kii File System (sync available).


Field Summary
static java.lang.String TAG
           
 
Method Summary
static void reset(Context context)
          Reset all sync specific data.
static void sync(Context context, java.io.File dir, Account account, ProgressCallback callback)
          Make sync the dir.
static void sync(Context context, java.io.File dir, java.lang.String username, java.lang.String password, ProgressCallback callback)
          Make sync the dir.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG

public static final java.lang.String TAG
See Also:
Constant Field Values
Method Detail

reset

public static void reset(Context context)
                  throws java.lang.IllegalStateException
Reset all sync specific data. All files are remained after this.

Parameters:
context - Context to store sync related data.
Throws:
java.lang.IllegalStateException - Sync is running, terminate it first.

sync

public static void sync(Context context,
                        java.io.File dir,
                        Account account,
                        ProgressCallback callback)
                 throws java.lang.InterruptedException,
                        java.lang.IllegalArgumentException,
                        java.lang.IllegalStateException,
                        SyncException,
                        java.util.MissingResourceException
Make sync the dir. It blocks until end of sync. If you want to terminate the sync, use Thread#interrupt of that thread.

Parameters:
context - Context to store sync related data.
dir - Sync target directory.
account - Account to sync.
callback - Progress handler.
Throws:
java.lang.InterruptedException - The sync was interrupted.
java.lang.IllegalArgumentException - Something wrong for args (dir or so).
java.lang.IllegalStateException - Already syncing.
SyncException - Error occured during sync.
java.util.MissingResourceException

sync

public static void sync(Context context,
                        java.io.File dir,
                        java.lang.String username,
                        java.lang.String password,
                        ProgressCallback callback)
                 throws java.lang.InterruptedException,
                        java.lang.IllegalArgumentException,
                        java.lang.IllegalStateException,
                        SyncException,
                        java.util.MissingResourceException
Make sync the dir. It blocks until end of sync. If you want to terminate the sync, use Thread#interrupt of that thread.

Parameters:
context - Context to store sync related data.
dir - Sync target directory.
username - Username. This api only accept username for authentication. If you want to use email/phone for authentication, Use sync(Context, File, Account, ProgressCallback)
password - Password.
callback - Progress handler.
Throws:
java.lang.InterruptedException - The sync was interrupted.
java.lang.IllegalArgumentException - Something wrong for args (dir or so).
java.lang.IllegalStateException - Already syncing.
SyncException - Error occured during sync.
java.util.MissingResourceException
See Also:
sync(Context, File, Account, ProgressCallback)