Here we describe the classes used in the OpportunisticOwnCloud application.
ConnectivityChangeReceiver
The ConnectivtyChangeReceive class is responsinle for listeining for network
events and creating Intent classes to handle the network events.
This class has a lifetime that endures throughout the application lifetime.
Extends: BroadcastReceiver
Implements: NONE
Public functions:
void onReceive(Context, Intent)
Sub-Classes: NONE
SyncService
The SyncService is created from the ConnectivityChangeReceive class when a
network event is detected.
Extends: IntentService
Implements: NONE
Public functions: NONE
Sub-Classes:
mThread
Extends: Thread
Implements: NONE
Public functions:
DownLoadThread
Extends: NONE
Implements: Runnable
Public functions:
UploadThread
Extends: NONE
Implements: Runnable
Public functions:
MainActivity
The MainActivity class is primarily responsible for managing the GUI aspect of
OpportunisticOwnCloud. It creates the LocalFileFragmentTab and the
RemoteFileFragmetnTab instances. It also starts the SettingsActivity if the user
has never set OpportunisticOwnCloud settings on the phone prior to running
the applications. MainActivity is launched by the application when it is first opened.
Extends: SherlockFragmentActivity
Implements: NONE
Public functions:
void onCreate(Bundle)
void onPause()
void onResume()
boolean onCreateOptionsMenu(Menu)
boolean onOptionsItemSelected(MenuItem)
Sub-Classes:
mThread
Extends: Thread
Implements: NONE
Public functions:
LocalFileFragmentTab
The LocalFileFragmentTab class is responsible for displaying the files located
on the user’s ownCloud directory on /sdcard. It provides navigation functionality
for file browsing as well as on-demand upload functionality.
Extends: SherlockFragment
Implements: ActionBar.TabListener
Public functions:
void onCreate(Bundle)
void onTabSelected(Tab, FragmentTransaction)
void onTabUnselected(Tab, FragmentTransaction)
void onTabReselected(Tab, FragmentTransaction)
Sub-Classes:
mThread
Extends: Thread
Implements: NONE
Public functions:
UploadThread
Extends: NONE
Implements: Runnable
Public functions:
RemoteFileFragmentTab
The RemoteFileFragmentTab class is responsible for displaying the user’s files located
on the ownCloud server. It provides navigation functionality
for file browsing as well as on-demand download functionality.
Extends: SherlockFragment
Implements: ActionBar.TabListener
Public functions:
void onCreate(Bundle)
void onTabSelected(Tab, FragmentTransaction)
void onTabUnselected(Tab, FragmentTransaction)
void onTabReselected(Tab, FragmentTransaction)
Sub-Classes:
mThread
Extends: Thread
Implements: NONE
Public functions:
DownloadThread
Extends: NONE
Implements: Runnable
Public functions:
SettingsActivity
The SettingsActivity provides a simple interface for the user to set
global settings, including username, password, and URL information for
connecting with the ownCloud server as well as setting sync frequency and
toggling opportunistic synchronization on and off. The data object created
is used globally to provide necessary settings information to the other classes.
Extends: PreferenceActivity
Implements: NONE
Public functions: NONE
Sub-Classes: NONE