33 lines
1009 B
C++
33 lines
1009 B
C++
#pragma once
|
|
|
|
#include <juce_core/juce_core.h>
|
|
#include <juce_audio_basics/juce_audio_basics.h>
|
|
#include <functional>
|
|
|
|
/**
|
|
* House of Mixtape API client (Path 2 plugin → registry.houseofmixtape.com).
|
|
* Skeleton — submit/poll/output endpoints are stubbed; the actual
|
|
* HTTP/JUCE URL wiring lands in a follow-up commit.
|
|
*/
|
|
class HomApiClient
|
|
{
|
|
public:
|
|
using ProgressCallback = std::function<void (double)>;
|
|
using DoneCallback = std::function<void (juce::var)>;
|
|
using ErrorCallback = std::function<void (const juce::String&)>;
|
|
|
|
explicit HomApiClient (juce::String registryBaseUrl);
|
|
|
|
// Async: upload + submit + poll until done|error.
|
|
void submitJobAsync (const juce::File& audio,
|
|
ProgressCallback onProgress,
|
|
DoneCallback onDone,
|
|
ErrorCallback onError);
|
|
|
|
void setBearerToken (const juce::String& token) { bearer = token; }
|
|
|
|
private:
|
|
juce::String baseUrl;
|
|
juce::String bearer;
|
|
};
|