root / src / com / rackspacecloud / android / AndroidCloudApplication.java @ 54986b23
History | View | Annotate | Download (1.9 kB)
1 |
package com.rackspacecloud.android; |
---|---|
2 |
|
3 |
import java.util.ArrayList; |
4 |
|
5 |
import org.apache.http.HttpEntity; |
6 |
|
7 |
import com.rackspace.cloud.files.api.client.ContainerObjects; |
8 |
|
9 |
import android.app.Application; |
10 |
|
11 |
public class AndroidCloudApplication extends Application { |
12 |
|
13 |
/*
|
14 |
* these fields act as global fields for the application
|
15 |
* they are used for some async tasks that need this
|
16 |
* data but may lose reference to them on a rotation
|
17 |
*/
|
18 |
private boolean isLoggingIn; |
19 |
private boolean taskProcessing; |
20 |
private boolean deletingObjectProcessing; |
21 |
private boolean deletingContainerProcessing; |
22 |
private boolean downloadingObject; |
23 |
private HttpEntity downloadedObject;
|
24 |
private ArrayList<ContainerObjects> curDirFiles; |
25 |
|
26 |
public void setAddingObject(boolean processing){ |
27 |
taskProcessing = processing; |
28 |
} |
29 |
|
30 |
public boolean isAddingObject(){ |
31 |
return taskProcessing;
|
32 |
} |
33 |
|
34 |
public void setDownloadedEntity(HttpEntity obj){ |
35 |
downloadedObject = obj; |
36 |
} |
37 |
|
38 |
public HttpEntity getDownloadedEntity(){
|
39 |
return downloadedObject;
|
40 |
} |
41 |
|
42 |
public void setDownloadingObject(boolean processing){ |
43 |
downloadingObject = processing; |
44 |
} |
45 |
|
46 |
public boolean isDownloadingObject(){ |
47 |
return downloadingObject;
|
48 |
} |
49 |
|
50 |
public void setDeleteingObject(boolean processing){ |
51 |
deletingObjectProcessing = processing; |
52 |
} |
53 |
|
54 |
public boolean isDeletingObject(){ |
55 |
return deletingObjectProcessing;
|
56 |
} |
57 |
|
58 |
public void setDeletingContainer(boolean processing){ |
59 |
deletingContainerProcessing = processing; |
60 |
} |
61 |
|
62 |
public boolean isDeletingContainer(){ |
63 |
return deletingContainerProcessing;
|
64 |
} |
65 |
|
66 |
public ArrayList<ContainerObjects> getCurFiles(){ |
67 |
return curDirFiles;
|
68 |
} |
69 |
|
70 |
public void setCurFiles(ArrayList<ContainerObjects> files){ |
71 |
curDirFiles = new ArrayList<ContainerObjects>(); |
72 |
for(ContainerObjects obj : files){
|
73 |
curDirFiles.add(obj); |
74 |
} |
75 |
|
76 |
} |
77 |
|
78 |
public void setIsLoggingIn(boolean logginIn){ |
79 |
isLoggingIn = logginIn; |
80 |
} |
81 |
|
82 |
public boolean isLogginIn(){ |
83 |
return isLoggingIn;
|
84 |
} |
85 |
} |