X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/7101a04247be24d9eb3c1aa49b88ec2496c7d2d6..def870aa0fffb6127d77efe1bda3f7dc617406c8:/src/com/owncloud/android/ui/fragment/FileFragment.java diff --git a/src/com/owncloud/android/ui/fragment/FileFragment.java b/src/com/owncloud/android/ui/fragment/FileFragment.java index 5537d62e..9cd1b9c7 100644 --- a/src/com/owncloud/android/ui/fragment/FileFragment.java +++ b/src/com/owncloud/android/ui/fragment/FileFragment.java @@ -18,9 +18,11 @@ package com.owncloud.android.ui.fragment; +import android.content.Intent; import android.support.v4.app.Fragment; import com.owncloud.android.datamodel.OCFile; +import com.owncloud.android.ui.activity.TransferServiceGetter; /** * Common methods for {@link Fragment}s containing {@link OCFile}s @@ -36,4 +38,39 @@ public interface FileFragment { * @return The {@link OCFile} hold */ public OCFile getFile(); + + + /** + * Interface to implement by any Activity that includes some instance of FileFragment + * + * @author David A. Velasco + */ + public interface ContainerActivity extends TransferServiceGetter { + + /** + * Callback method invoked when the detail fragment wants to notice its container + * activity about a relevant state the file shown by the fragment. + * + * Added to notify to FileDisplayActivity about the need of refresh the files list. + * + * Currently called when: + * - a download is started; + * - a rename is completed; + * - a deletion is completed; + * - the 'inSync' flag is changed; + */ + public void onFileStateChanged(); + + /** + * Request the parent activity to show the details of an {@link OCFile}. + * + * @param file File to show details + */ + public void showFragmentWithDetails(OCFile file); + + + public void notifySuccessfulDownload(OCFile file, Intent intent, boolean success); + + } + }