about summary refs log tree commit diff stats
path: root/src/auth.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/auth.h')
-rw-r--r--src/auth.h44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/auth.h b/src/auth.h index ef07e81..30c178c 100644 --- a/src/auth.h +++ b/src/auth.h
@@ -2,28 +2,36 @@
2#define AUTH_H_48EF85FD 2#define AUTH_H_48EF85FD
3 3
4#include <string> 4#include <string>
5#include "../vendor/liboauthcpp/include/liboauthcpp/liboauthcpp.h"
5 6
6namespace twitter { 7namespace twitter {
7 8
8 class auth { 9 class auth {
9 public: 10 public:
10 void setConsumerKey(std::string _arg); 11
11 void setConsumerSecret(std::string _arg); 12 auth(
12 void setAccessKey(std::string _arg); 13 std::string consumerKey,
13 void setAccessSecret(std::string _arg); 14 std::string consumerSecret,
14 15 std::string accessKey,
15 std::string getConsumerKey() const; 16 std::string accessSecret) :
16 std::string getConsumerSecret() const; 17 consumer_(std::move(consumerKey), std::move(consumerSecret)),
17 std::string getAccessKey() const; 18 token_(std::move(accessKey), std::move(accessSecret)),
18 std::string getAccessSecret() const; 19 client_(&consumer_, &token_)
19 20 {
20 private: 21 }
21 std::string _consumer_key; 22
22 std::string _consumer_secret; 23 const OAuth::Client& getClient() const
23 std::string _access_key; 24 {
24 std::string _access_secret; 25 return client_;
26 }
27
28 private:
29
30 OAuth::Consumer consumer_;
31 OAuth::Token token_;
32 OAuth::Client client_;
25 }; 33 };
26 34
27}; 35};
28 36
29#endif /* end of include guard: AUTH_H_48EF85FD */ 37#endif /* end of include guard: AUTH_H_48EF85FD */