interface.(h|cc)をpost用のinterfaceに
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#include <cocoatweet/api/interface/interface.h>
|
||||
|
||||
namespace CocoaTweet::API {
|
||||
size_t Interface::curlCallback_(char* _ptr, size_t _size, size_t _nmemb, std::string* _stream) {
|
||||
int realsize = _size * _nmemb;
|
||||
_stream->append(_ptr, realsize);
|
||||
return realsize;
|
||||
}
|
||||
} // namespace CocoaTweet::API
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <cocoatweet/api/interface/postInterface.h>
|
||||
|
||||
namespace CocoaTweet::API::Interface {
|
||||
size_t postInterface::curlCallback_(char* _ptr, size_t _size, size_t _nmemb, std::string* _stream) {
|
||||
int realsize = _size * _nmemb;
|
||||
_stream->append(_ptr, realsize);
|
||||
return realsize;
|
||||
}
|
||||
} // namespace CocoaTweet::API
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
#ifndef COCOATWEET_API_INTERFACE_H_
|
||||
#define COCOATWEET_API_INTERFACE_H_
|
||||
#ifndef COCOATWEET_API_INTERFACE_POSTINTERFACE_H_
|
||||
#define COCOATWEET_API_INTERFACE_POSTINTERFACE_H_
|
||||
|
||||
#include <functional>
|
||||
#include "cocoatweet/oauth/oauth.h"
|
||||
|
||||
namespace CocoaTweet::API {
|
||||
class Interface {
|
||||
namespace CocoaTweet::API::Interface {
|
||||
class postInterface {
|
||||
public:
|
||||
virtual void process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth,
|
||||
std::function<void(std::string)> _callback) = 0;
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "cocoatweet/api/interface/interface.h"
|
||||
#include "cocoatweet/api/interface/postInterface.h"
|
||||
//#include "cocoatweet/oauth/oauth.h"
|
||||
|
||||
namespace CocoaTweet::API::Statuses {
|
||||
class Update : public Interface {
|
||||
class Update : public CocoaTweet::API::Interface::postInterface {
|
||||
public:
|
||||
Update();
|
||||
void status(const std::string _status);
|
||||
|
||||
Reference in New Issue
Block a user