summaryrefslogtreecommitdiff
path: root/src/org/fox/ttrss/types/FeedCategory.java
blob: c8193f943679d0333fab3c3861f37d18586cd9b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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];
            }
        };
}