summaryrefslogtreecommitdiff
path: root/src/org/fox/ttrss/Attachment.java
blob: 38cc16d88e59fb59cb865ca64d3d60a9c0a8e5d6 (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
package org.fox.ttrss;

import android.os.Parcel;
import android.os.Parcelable;

public class Attachment implements Parcelable {
	int id;
	String content_url;
	String content_type;
	String title;
	String duration;
	int post_id;
	
	public Attachment(Parcel in) {
		readFromParcel(in);
	}
	
	@Override
	public int describeContents() {
		return 0;
	}
	
	@Override
	public void writeToParcel(Parcel out, int flags) {
		out.writeInt(id);
		out.writeString(content_url);
		out.writeString(content_type);
		out.writeString(title);
		out.writeString(duration);
		out.writeInt(post_id);
	}
	
	public void readFromParcel(Parcel in) {
		id = in.readInt();
		content_url = in.readString();
		content_type = in.readString();
		title = in.readString();
		duration = in.readString();
		post_id = in.readInt();
	}
	
	@SuppressWarnings("rawtypes")
	public static final Parcelable.Creator CREATOR =
    	new Parcelable.Creator() {
            public Attachment createFromParcel(Parcel in) {
                return new Attachment(in);
            }
 
            public Attachment[] newArray(int size) {
                return new Attachment[size];
            }
        };

}