more changes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef MODELS_H_
|
||||
#define MODELS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
struct Song
|
||||
{
|
||||
int Id;
|
||||
@@ -30,6 +32,24 @@ struct LoginRes
|
||||
int Expiration;
|
||||
};
|
||||
|
||||
struct loginResult
|
||||
{
|
||||
int user_id;
|
||||
std::string username;
|
||||
std::string access_token;
|
||||
std::string token_type;
|
||||
std::string message;
|
||||
int expiration;
|
||||
};
|
||||
|
||||
struct auth_credentials
|
||||
{
|
||||
std::string domain;
|
||||
std::string api_identifier;
|
||||
std::string client_id;
|
||||
std::string client_secret;
|
||||
};
|
||||
|
||||
struct TokenReq
|
||||
{
|
||||
char ClientId[1024];
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef TOKEN_MANAGER_H_
|
||||
#define TOKEN_MANAGER_H_
|
||||
|
||||
#include "models.h"
|
||||
|
||||
class token_manager
|
||||
{
|
||||
public:
|
||||
token_manager();
|
||||
|
||||
loginResult retrieve_token();
|
||||
|
||||
//LoginRes* retrieve_token(TokenReq *tok);
|
||||
private:
|
||||
auth_credentials parse_auth_credentials();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user