summaryrefslogtreecommitdiff
path: root/src/photos/PhotoFileAdapter.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/photos/PhotoFileAdapter.vala')
-rw-r--r--src/photos/PhotoFileAdapter.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/photos/PhotoFileAdapter.vala b/src/photos/PhotoFileAdapter.vala
index 644917c..df49edb 100644
--- a/src/photos/PhotoFileAdapter.vala
+++ b/src/photos/PhotoFileAdapter.vala
@@ -57,6 +57,13 @@ public abstract class PhotoFileAdapter {
//
public abstract class PhotoFileReader : PhotoFileAdapter {
+ public enum Role {
+ DEFAULT,
+ THUMBNAIL
+ }
+
+ PhotoFileReader.Role role = Role.DEFAULT;
+
protected PhotoFileReader(string filepath, PhotoFileFormat file_format) {
base (filepath, file_format);
}
@@ -76,6 +83,14 @@ public abstract class PhotoFileReader : PhotoFileAdapter {
public virtual Gdk.Pixbuf scaled_read(Dimensions full, Dimensions scaled) throws Error {
return resize_pixbuf(unscaled_read(), scaled, Gdk.InterpType.BILINEAR);
}
+
+ public void set_role (PhotoFileReader.Role role) {
+ this.role = role;
+ }
+
+ public PhotoFileReader.Role get_role () {
+ return this.role;
+ }
}
//