Update year in copyright lines
[Sone.git] / src / main / java / net / pterodactylus / sone / data / SoneOptions.java
index 4abf16f..d7089d9 100644 (file)
@@ -1,11 +1,11 @@
 package net.pterodactylus.sone.data;
 
-import static net.pterodactylus.sone.data.SoneOptions.ShowCustomAvatars.NEVER;
+import static net.pterodactylus.sone.data.SoneOptions.LoadExternalContent.NEVER;
+
+import javax.annotation.Nonnull;
 
 /**
  * All Sone-specific options.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
 public interface SoneOptions {
 
@@ -24,15 +24,16 @@ public interface SoneOptions {
        boolean isShowNewReplyNotifications();
        void setShowNewReplyNotifications(boolean showNewReplyNotifications);
 
-       ShowCustomAvatars getShowCustomAvatars();
-       void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars);
+       LoadExternalContent getShowCustomAvatars();
+       void setShowCustomAvatars(LoadExternalContent showCustomAvatars);
+
+       @Nonnull LoadExternalContent getLoadLinkedImages();
+       void setLoadLinkedImages(@Nonnull LoadExternalContent loadLinkedImages);
 
        /**
-        * The possible values for the “show custom avatars” option.
-        *
-        * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+        * Possible values for all options that are related to loading external content.
         */
-       enum ShowCustomAvatars {
+       enum LoadExternalContent {
 
                /** Never show custom avatars. */
                NEVER,
@@ -53,8 +54,6 @@ public interface SoneOptions {
 
        /**
         * {@link SoneOptions} implementation.
-        *
-        * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
         */
        public class DefaultSoneOptions implements SoneOptions {
 
@@ -63,7 +62,8 @@ public interface SoneOptions {
                private boolean showNewSoneNotifications = true;
                private boolean showNewPostNotifications = true;
                private boolean showNewReplyNotifications = true;
-               private ShowCustomAvatars showCustomAvatars = NEVER;
+               private LoadExternalContent showCustomAvatars = NEVER;
+               private LoadExternalContent loadLinkedImages = NEVER;
 
                @Override
                public boolean isAutoFollow() {
@@ -116,15 +116,26 @@ public interface SoneOptions {
                }
 
                @Override
-               public ShowCustomAvatars getShowCustomAvatars() {
+               public LoadExternalContent getShowCustomAvatars() {
                        return showCustomAvatars;
                }
 
                @Override
-               public void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars) {
+               public void setShowCustomAvatars(LoadExternalContent showCustomAvatars) {
                        this.showCustomAvatars = showCustomAvatars;
                }
 
+               @Nonnull
+               @Override
+               public LoadExternalContent getLoadLinkedImages() {
+                       return loadLinkedImages;
+               }
+
+               @Override
+               public void setLoadLinkedImages(@Nonnull LoadExternalContent loadLinkedImages) {
+                       this.loadLinkedImages = loadLinkedImages;
+               }
+
        }
 
 }