diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 06:58:46 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-10 06:58:46 +0000 |
commit | 6be5b5571d1a7ff8329979f8239e178ddf2d4650 (patch) | |
tree | 8aaaeb612b6c3a1e3fb9647f0da35e8cf285a502 /cast/standalone_receiver/cast_service.h | |
parent | 47e697dc1f119f76c7df761a09f70c417cada2da (diff) | |
parent | a1f37d7e15e391e1973053f8d58f07e4d240f1b4 (diff) | |
download | openscreen-android14-mainline-resolv-release.tar.gz |
Snap for 8564071 from a1f37d7e15e391e1973053f8d58f07e4d240f1b4 to mainline-resolv-releaseaml_res_341510000aml_res_341410010aml_res_341311030aml_res_341110000aml_res_340912000aml_res_331820000aml_res_331611010aml_res_331512000aml_res_331314010aml_res_331114000aml_res_331011050aml_res_330910000aml_res_330810000android14-mainline-resolv-releaseandroid13-mainline-resolv-release
Change-Id: I75e6f58deccde26956558ee09b7041761a9a8541
Diffstat (limited to 'cast/standalone_receiver/cast_service.h')
-rw-r--r-- | cast/standalone_receiver/cast_service.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/cast/standalone_receiver/cast_service.h b/cast/standalone_receiver/cast_service.h index 99137de2..57bedcbe 100644 --- a/cast/standalone_receiver/cast_service.h +++ b/cast/standalone_receiver/cast_service.h @@ -8,7 +8,7 @@ #include <memory> #include <string> -#include "cast/common/public/service_info.h" +#include "cast/common/public/receiver_info.h" #include "cast/receiver/application_agent.h" #include "cast/receiver/channel/static_credentials.h" #include "cast/receiver/public/receiver_socket_factory.h" @@ -41,19 +41,33 @@ namespace cast { // * Publishes over mDNS to be discoverable to all senders on the same LAN. class CastService final : public discovery::ReportingClient { public: - CastService(TaskRunner* task_runner, - const InterfaceInfo& interface, - GeneratedCredentials credentials, - const std::string& friendly_name, - const std::string& model_name, - bool enable_discovery = true); + struct Configuration { + // The task runner to be used for async calls. + TaskRunner* task_runner; + // The interface the cast service is running on. + InterfaceInfo interface; + + // The credentials that the cast service should use for TLS. + GeneratedCredentials credentials; + + // The friendly name to be used for broadcasting. + std::string friendly_name; + + // The model name to be used for broadcasting. + std::string model_name; + + // Whether we should broadcast over mDNS/DNS-SD. + bool enable_discovery = true; + }; + + explicit CastService(Configuration config); ~CastService() final; private: using LazyDeletedDiscoveryService = SerialDeletePtr<discovery::DnsSdService>; using LazyDeletedDiscoveryPublisher = - SerialDeletePtr<discovery::DnsSdServicePublisher<ServiceInfo>>; + SerialDeletePtr<discovery::DnsSdServicePublisher<ReceiverInfo>>; // discovery::ReportingClient overrides. void OnFatalError(Error error) final; |