From cc57105f29b4095daad03273bc1a882368e75664 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 30 Aug 2018 19:22:20 -0400 Subject: Removed stream functionality The Twitter streaming API has officially sunset, so the stream functionality can no longer be used. Because of this, there is no need to keep it in the codebase. refs #3 --- src/stream.h | 71 ------------------------------------------------------------ 1 file changed, 71 deletions(-) delete mode 100644 src/stream.h (limited to 'src/stream.h') diff --git a/src/stream.h b/src/stream.h deleted file mode 100644 index f6ce91e..0000000 --- a/src/stream.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef STREAM_H_E9146952 -#define STREAM_H_E9146952 - -#include -#include -#include -#include -#include -#include "bounding_box.h" -#include "auth.h" -#include "user.h" - -namespace twitter { - - class notification; - - class - [[deprecated("The Twitter streaming API will sunset on August 16th, 2018")]] - stream { - public: - - typedef std::function notify_callback; - - stream( - const auth& tauth, - notify_callback callback, - bool with_followings = true, - bool receive_all_replies = false, - std::list track = {}, - std::list locations = {}); - - ~stream(); - - stream(const stream& other) = delete; - stream(stream&& other) = delete; - stream& operator=(const stream& other) = delete; - stream& operator=(stream&& other) = delete; - - private: - enum class backoff { - none, - network, - http, - rate_limit - }; - - static std::string generateUrl( - bool with_followings, - bool receive_all_replies, - std::list track, - std::list locations); - - void run(std::string url); - int progress(); - size_t write(char* ptr, size_t size, size_t nmemb); - - const auth& _auth; - notify_callback _notify; - bool _stop = false; - std::string _buffer; - time_t _last_write; - bool _established = false; - backoff _backoff_type = backoff::none; - std::chrono::milliseconds _backoff_amount; - user _currentUser; - std::thread _thread; - }; - -} - -#endif /* end of include guard: STREAM_H_E9146952 */ -- cgit 1.4.1