Increase db number and added getters and setter for new 'uploading' and 'downloading...
[pub/Android/ownCloud.git] / src / com / owncloud / android / datamodel / OCFile.java
index cf25d27..222746b 100644 (file)
@@ -70,6 +70,9 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     private boolean mNeedsUpdateThumbnail;
 
 
     private boolean mNeedsUpdateThumbnail;
 
+    private boolean mIsDownloading;
+    private boolean mIsUploading;
+
 
     /**
      * Create new {@link OCFile} with given path.
 
     /**
      * Create new {@link OCFile} with given path.
@@ -112,6 +115,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         mPermissions = source.readString();
         mRemoteId = source.readString();
         mNeedsUpdateThumbnail = source.readInt() == 0;
         mPermissions = source.readString();
         mRemoteId = source.readString();
         mNeedsUpdateThumbnail = source.readInt() == 0;
+        mIsDownloading = source.readInt() == 0;
+        mIsUploading = source.readInt() == 0;
 
     }
 
 
     }
 
@@ -136,6 +141,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         dest.writeString(mPermissions);
         dest.writeString(mRemoteId);
         dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
         dest.writeString(mPermissions);
         dest.writeString(mRemoteId);
         dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
+        dest.writeInt(mIsDownloading ? 1 : 0);
+        dest.writeInt(mIsUploading ? 1 : 0);
     }
 
     /**
     }
 
     /**
@@ -348,6 +355,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         mPermissions = null;
         mRemoteId = null;
         mNeedsUpdateThumbnail = false;
         mPermissions = null;
         mRemoteId = null;
         mNeedsUpdateThumbnail = false;
+        mIsDownloading = false;
+        mIsUploading = false;
     }
 
     /**
     }
 
     /**
@@ -562,4 +571,20 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         this.mRemoteId = remoteId;
     }
 
         this.mRemoteId = remoteId;
     }
 
+    public boolean isDownloading() {
+        return mIsDownloading;
+    }
+
+    public boolean isUploading() {
+        return mIsUploading;
+    }
+
+    public void setUploading(boolean isUploading) {
+        this.mIsUploading = isUploading;
+    }
+
+    public void setDownloading(boolean isDownloading) {
+        this.mIsDownloading = isDownloading;
+    }
+
 }
 }