Milestone 4
This commit is contained in:
parent
691eb327d0
commit
420da2d468
6 changed files with 1039 additions and 24 deletions
|
|
@ -47,6 +47,7 @@ struct ConnectionOptions {
|
|||
bool autoconnect = true;
|
||||
std::string application_name = "warppipe";
|
||||
std::optional<std::string> remote_name;
|
||||
std::optional<std::string> config_path;
|
||||
};
|
||||
|
||||
struct AudioFormat {
|
||||
|
|
@ -88,6 +89,9 @@ struct NodeInfo {
|
|||
NodeId id;
|
||||
std::string name;
|
||||
std::string media_class;
|
||||
std::string application_name;
|
||||
std::string process_binary;
|
||||
std::string media_role;
|
||||
};
|
||||
|
||||
struct PortInfo {
|
||||
|
|
@ -125,10 +129,18 @@ struct RuleMatch {
|
|||
};
|
||||
|
||||
struct RouteRule {
|
||||
RuleId id;
|
||||
RuleMatch match;
|
||||
std::string target_node;
|
||||
};
|
||||
|
||||
struct MetadataInfo {
|
||||
std::string default_sink_name;
|
||||
std::string default_source_name;
|
||||
std::string configured_sink_name;
|
||||
std::string configured_source_name;
|
||||
};
|
||||
|
||||
class Client {
|
||||
public:
|
||||
Client(const Client&) = delete;
|
||||
|
|
@ -161,6 +173,11 @@ class Client {
|
|||
|
||||
Result<RuleId> AddRouteRule(const RouteRule& rule);
|
||||
Status RemoveRouteRule(RuleId id);
|
||||
Result<std::vector<RouteRule>> ListRouteRules();
|
||||
|
||||
Result<MetadataInfo> GetDefaults();
|
||||
Status SetDefaultSink(std::string_view node_name);
|
||||
Status SetDefaultSource(std::string_view node_name);
|
||||
|
||||
Status SaveConfig(std::string_view path);
|
||||
Status LoadConfig(std::string_view path);
|
||||
|
|
@ -171,6 +188,8 @@ class Client {
|
|||
Status Test_InsertLink(const Link& link);
|
||||
Status Test_RemoveGlobal(uint32_t id);
|
||||
Status Test_ForceDisconnect();
|
||||
Status Test_TriggerPolicyCheck();
|
||||
size_t Test_GetPendingAutoLinkCount() const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue