about summary refs log tree commit diff stats
path: root/difference.h
diff options
context:
space:
mode:
Diffstat (limited to 'difference.h')
-rw-r--r--difference.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/difference.h b/difference.h index bccf9ab..6a03f84 100644 --- a/difference.h +++ b/difference.h
@@ -7,8 +7,9 @@
7#include <utility> 7#include <utility>
8#include <verbly.h> 8#include <verbly.h>
9#include <stdexcept> 9#include <stdexcept>
10#include <twitter.h> 10#include <mastodonpp/mastodonpp.hpp>
11#include <memory> 11#include <memory>
12#include "imagenet.h"
12 13
13class difference { 14class difference {
14public: 15public:
@@ -26,8 +27,6 @@ private:
26 std::pair<Magick::Image, Magick::Image> 27 std::pair<Magick::Image, Magick::Image>
27 getImagesForNoun(verbly::word pictured) const; 28 getImagesForNoun(verbly::word pictured) const;
28 29
29 Magick::Image getImageAtUrl(std::string url) const;
30
31 std::pair<verbly::word, verbly::word> getOppositeIdentifiers() const; 30 std::pair<verbly::word, verbly::word> getOppositeIdentifiers() const;
32 31
33 Magick::Image composeImage( 32 Magick::Image composeImage(
@@ -36,9 +35,9 @@ private:
36 Magick::Image image2, 35 Magick::Image image2,
37 verbly::word word2) const; 36 verbly::word word2) const;
38 37
39 std::string generateTweetText(verbly::word word1, verbly::word word2) const; 38 std::string generatePostText(verbly::word word1, verbly::word word2) const;
40 39
41 void sendTweet(std::string text, Magick::Image image) const; 40 void sendPost(std::string text, Magick::Image image) const;
42 41
43 class could_not_get_images : public std::runtime_error { 42 class could_not_get_images : public std::runtime_error {
44 public: 43 public:
@@ -50,8 +49,11 @@ private:
50 49
51 std::mt19937& rng_; 50 std::mt19937& rng_;
52 std::unique_ptr<verbly::database> database_; 51 std::unique_ptr<verbly::database> database_;
53 std::unique_ptr<twitter::client> client_; 52 std::unique_ptr<mastodonpp::Instance> instance_;
53 std::unique_ptr<mastodonpp::Connection> connection_;
54 std::unique_ptr<imagenet> imagenet_;
54 std::string fontfile_; 55 std::string fontfile_;
56 std::string tempfile_;
55 57
56}; 58};
57 59