Store the “known” status of a post in the database.
[Sone.git] / src / main / java / net / pterodactylus / sone / database / PostDatabase.java
index 7bfa33a..8fa4000 100644 (file)
 package net.pterodactylus.sone.database;
 
 import java.util.Collection;
+import java.util.Set;
 
 import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.Sone;
 
+import com.google.common.base.Function;
 import com.google.common.base.Optional;
 
 /**
@@ -31,6 +33,8 @@ import com.google.common.base.Optional;
  */
 public interface PostDatabase {
 
+       Function<String, Optional<Post>> getPost();
+
        /**
         * Returns the post with the given ID.
         *
@@ -96,4 +100,11 @@ public interface PostDatabase {
         */
        void removePosts(Sone sone);
 
+       void setPostKnown(Post post);
+       boolean isPostKnown(Post post);
+       void likePost(Post post, Sone localSone);
+       void unlikePost(Post post, Sone localSone);
+       boolean isLiked(Post post, Sone sone);
+       Set<Sone> getLikes(Post post);
+
 }