2026-09-06 20:46:08 -07:00
|
|
|
/*
|
|
|
|
|
streamer-tools OBS Camera Plugin - core library
|
|
|
|
|
Copyright (C) 2026 CyberCoveLLC <jknapp85@gmail.com>
|
|
|
|
|
|
2026-09-07 04:44:16 -07:00
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
2026-09-06 20:46:08 -07:00
|
|
|
|
2026-09-07 04:44:16 -07:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2026-09-06 20:46:08 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2026-09-06 22:13:28 -07:00
|
|
|
// The small shared pieces of the core library: its version string, and the
|
|
|
|
|
// streamer-tools connection settings that both the API client and the OBS
|
|
|
|
|
// adapter pass around. Everything substantial lives in its own header --
|
|
|
|
|
// api_client.h, session.h, http.h, json.h -- and none of it depends on OBS,
|
|
|
|
|
// so the whole library builds and tests headlessly on all three platforms.
|
2026-09-06 20:46:08 -07:00
|
|
|
|
|
|
|
|
namespace stplugin {
|
|
|
|
|
|
2026-09-06 22:13:28 -07:00
|
|
|
// The core library's version string, injected by CMake from the top-level
|
|
|
|
|
// project() version, so what OBS logs on load is the actual build.
|
2026-09-06 20:46:08 -07:00
|
|
|
const char *core_version();
|
|
|
|
|
|
2026-09-06 22:13:28 -07:00
|
|
|
// What an operator types into the source's properties, and what ApiClient
|
|
|
|
|
// needs to reach the two read-key-scoped endpoints in
|
|
|
|
|
// apps/server/src/obs/plugin.routes.ts (streamer-tools repo). The read key is
|
|
|
|
|
// a credential: it is masked in the properties UI and never logged (see
|
|
|
|
|
// ApiClient::redactedUrl).
|
2026-09-06 20:46:08 -07:00
|
|
|
struct ConnectionConfig {
|
|
|
|
|
std::string server_url;
|
|
|
|
|
std::string room_slug;
|
|
|
|
|
std::string read_key;
|
|
|
|
|
|
|
|
|
|
bool is_valid() const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace stplugin
|