1 /* ownCloud Android client application
2 * Copyright (C) 2012-2013 ownCloud Inc.
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 package com
.owncloud
.android
.ui
.fragment
;
21 import android
.content
.Intent
;
22 import android
.support
.v4
.app
.Fragment
;
24 import com
.owncloud
.android
.datamodel
.OCFile
;
25 import com
.owncloud
.android
.ui
.activity
.TransferServiceGetter
;
28 * Common methods for {@link Fragment}s containing {@link OCFile}s
30 * @author David A. Velasco
33 public interface FileFragment
{
36 * Getter for the hold {@link OCFile}
38 * @return The {@link OCFile} hold
40 public OCFile
getFile();
44 * Interface to implement by any Activity that includes some instance of FileFragment
46 * @author David A. Velasco
48 public interface ContainerActivity
extends TransferServiceGetter
{
51 * Callback method invoked when the detail fragment wants to notice its container
52 * activity about a relevant state the file shown by the fragment.
54 * Added to notify to FileDisplayActivity about the need of refresh the files list.
56 * Currently called when:
57 * - a download is started;
58 * - a rename is completed;
59 * - a deletion is completed;
60 * - the 'inSync' flag is changed;
62 public void onFileStateChanged();
65 * Request the parent activity to show the details of an {@link OCFile}.
67 * @param file File to show details
69 public void showFragmentWithDetails(OCFile file
);