mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-05-02 19:39:32 +01:00
applied platformio structure
This commit is contained in:
40
lib/spotify/cspot/include/Session.h
Normal file
40
lib/spotify/cspot/include/Session.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h> // for uint8_t
|
||||
#include <memory> // for shared_ptr, unique_ptr
|
||||
#include <string> // for string
|
||||
#include <vector> // for vector
|
||||
|
||||
namespace cspot {
|
||||
class AuthChallenges;
|
||||
class LoginBlob;
|
||||
class PlainConnection;
|
||||
class ShannonConnection;
|
||||
} // namespace cspot
|
||||
|
||||
#define LOGIN_REQUEST_COMMAND 0xAB
|
||||
#define AUTH_SUCCESSFUL_COMMAND 0xAC
|
||||
#define AUTH_DECLINED_COMMAND 0xAD
|
||||
|
||||
namespace cspot {
|
||||
class Session {
|
||||
protected:
|
||||
std::unique_ptr<cspot::AuthChallenges> challenges;
|
||||
std::shared_ptr<cspot::PlainConnection> conn;
|
||||
std::shared_ptr<LoginBlob> authBlob;
|
||||
|
||||
std::string deviceId = "142137fd329622137a14901634264e6f332e2411";
|
||||
|
||||
public:
|
||||
Session();
|
||||
~Session();
|
||||
|
||||
std::shared_ptr<cspot::ShannonConnection> shanConn;
|
||||
|
||||
void connect(std::unique_ptr<cspot::PlainConnection> connection);
|
||||
void connectWithRandomAp();
|
||||
void close();
|
||||
virtual bool triggerTimeout() = 0;
|
||||
std::vector<uint8_t> authenticate(std::shared_ptr<LoginBlob> blob);
|
||||
};
|
||||
} // namespace cspot
|
||||
Reference in New Issue
Block a user