diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox/ttrss/types/FeedCategory.java')
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/types/FeedCategory.java | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/FeedCategory.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/FeedCategory.java new file mode 100644 index 00000000..c8193f94 --- /dev/null +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/FeedCategory.java @@ -0,0 +1,58 @@ +package org.fox.ttrss.types; + +import android.os.Parcel; +import android.os.Parcelable; + +public class FeedCategory implements Parcelable { + public int id; + public String title; + public int unread; + public int order_id; + + public FeedCategory(Parcel in) { + readFromParcel(in); + } + + public FeedCategory(int id, String title, int unread) { + this.id = id; + this.title = title; + this.unread = unread; + this.order_id = 0; + } + + public FeedCategory() { + + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeInt(id); + out.writeString(title); + out.writeInt(unread); + out.writeInt(order_id); + } + + public void readFromParcel(Parcel in) { + id = in.readInt(); + title = in.readString(); + unread = in.readInt(); + order_id = in.readInt(); + } + + @SuppressWarnings("rawtypes") + public static final Parcelable.Creator CREATOR = + new Parcelable.Creator() { + public FeedCategory createFromParcel(Parcel in) { + return new FeedCategory(in); + } + + public FeedCategory[] newArray(int size) { + return new FeedCategory[size]; + } + }; +} |