fedilab-Android-App/app/src/main/java/app/fedilab/android/client/Entities/Attachment.java

142 lines
3.3 KiB
Java
Raw Normal View History

2017-05-05 16:36:04 +02:00
/* Copyright 2017 Thomas Schneider
*
2019-05-18 11:10:30 +02:00
* This file is a part of Fedilab
2017-05-05 16:36:04 +02:00
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
2019-05-18 11:10:30 +02:00
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
2017-05-05 16:36:04 +02:00
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
2019-05-18 11:10:30 +02:00
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
2017-05-05 16:36:04 +02:00
* see <http://www.gnu.org/licenses>. */
2019-05-18 11:10:30 +02:00
package app.fedilab.android.client.Entities;
2017-05-05 16:36:04 +02:00
import android.os.Parcel;
import android.os.Parcelable;
2017-05-05 16:36:04 +02:00
/**
* Created by Thomas on 23/04/2017.
* Manages Media
2017-05-05 16:36:04 +02:00
*/
2017-12-15 18:03:06 +01:00
public class Attachment implements Parcelable{
2017-05-05 16:36:04 +02:00
private String id;
private String type;
private String url;
private String remote_url;
private String preview_url;
2018-02-15 10:18:39 +01:00
private String meta;
2017-05-05 16:36:04 +02:00
private String text_url;
2017-10-27 10:51:00 +02:00
private String description;
2017-05-05 16:36:04 +02:00
public Attachment(Parcel in) {
id = in.readString();
type = in.readString();
url = in.readString();
remote_url = in.readString();
preview_url = in.readString();
text_url = in.readString();
2017-10-27 10:51:00 +02:00
description = in.readString();
}
public static final Creator<Attachment> CREATOR = new Creator<Attachment>() {
@Override
public Attachment createFromParcel(Parcel in) {
return new Attachment(in);
}
@Override
public Attachment[] newArray(int size) {
return new Attachment[size];
}
};
public Attachment() {
}
2017-05-05 16:36:04 +02:00
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getRemote_url() {
return remote_url;
}
public void setRemote_url(String remote_url) {
this.remote_url = remote_url;
}
public String getPreview_url() {
return preview_url;
}
public void setPreview_url(String preview_url) {
this.preview_url = preview_url;
}
public String getText_url() {
return text_url;
}
public void setText_url(String text_url) {
this.text_url = text_url;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(id);
dest.writeString(type);
dest.writeString(url);
dest.writeString(remote_url);
dest.writeString(preview_url);
dest.writeString(text_url);
2017-10-27 10:51:00 +02:00
dest.writeString(description);
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
2018-02-15 10:18:39 +01:00
public String getMeta() {
return meta;
}
public void setMeta(String meta) {
this.meta = meta;
}
2017-05-05 16:36:04 +02:00
}