2#ifndef __ASE_SERVER_HH__
3#define __ASE_SERVER_HH__
13 static ServerImplP instancep ();
27 uint64 user_note (
const String &text,
const String &channel =
"misc", UserNote::Flags flags = UserNote::TRANSIENT,
const String &rest =
"")
override;
28 bool user_reply (
uint64 noteid,
uint r)
override;
37 void telemem_release (
Block telememblock)
const;
38 ptrdiff_t telemem_start ()
const;
43static constexpr const char* telemetry_type (
const int8 &field) {
return "i8"; }
44static constexpr const char* telemetry_type (
const int32 &field) {
return "i32"; }
45static constexpr const char* telemetry_type (
const float &field) {
return "f32"; }
46static constexpr const char* telemetry_type (
const double &field) {
return "f64"; }
48template<
class T>
inline TelemetryField
49telemetry_field (
const String &name,
const T *field)
51 auto start = ServerImpl::instancep()->telemem_start();
52 const ptrdiff_t offset = ptrdiff_t (field) - start;
54 TelemetryField tfield { name, telemetry_type (*field),
int32 (offset),
sizeof (*field) };
Base type for classes that have a Property.
String get_clap_version() override
Retrieve CLAP support version.
String get_flac_version() override
Retrieve FLAC handler version.
String get_build_id() override
Retrieve ASE build id.
Value get_data(const String &key) const override
Retrieve session data.
ProjectP last_project() override
Retrieve the last created project.
PropertyP access_preference(const String &ident) override
Retrieve property handle for a Preference identifier.
StringS list_preferences() override
Retrieve a list of all preference identifiers.
ProjectP create_project(String projectname) override
Create a new project (name is modified to be unique if necessary.
String get_version() override
Retrieve ASE version.
void shutdown() override
Shutdown ASE.
String get_sndfile_version() override
Retrieve libsndfile support version.
bool broadcast_telemetry(const TelemetrySegmentS &plan, int32 interval_ms) override
Broadcast telemetry memory segments to the current Jsonipc connection.
String get_opus_version() override
Retrieve Opus handler version.
bool set_data(const String &key, const Value &v) override
Assign session data, prefix ephemerals with '_'.
Central singleton, serves as API entry point.
#define ASE_ASSERT_RETURN(expr,...)
Return from the current function if expr evaluates to false and issue an assertion warning.
The Anklang C++ API namespace.
uint64_t uint64
A 64-bit unsigned integer, use PRI*64 in format strings.
int32_t int32
A 32-bit signed integer.
int8_t int8
An 8-bit signed integer.
Error
Enum representing Error states.
std::string String
Convenience alias for std::string.
uint32_t uint32
A 32-bit unsigned integer.
uint32_t uint
Provide 'uint' as convenience type.
MusicalTuning
Musical tunings, see: http://en.wikipedia.org/wiki/Musical_tuning.
Memory area (over-)aligned to cache size and utilizing huge pages.
Reference for an allocated memory block.
Value type used to interface with various property types.