16 #ifndef ACSDKDAVSCLIENT_DAVSCLIENT_H_ 17 #define ACSDKDAVSCLIENT_DAVSCLIENT_H_ 22 #include <unordered_map> 27 namespace acsdkAssets {
49 static std::shared_ptr<DavsClient>
create(
51 std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> authDelegate,
52 std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::InternetConnectionMonitorInterface> wifiMonitor,
53 std::shared_ptr<davsInterfaces::DavsEndpointHandlerInterface> davsEndpointHandler,
54 std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface>
metricRecorder =
nullptr,
55 std::chrono::seconds forcedUpdateInterval = std::chrono::seconds(0));
67 std::shared_ptr<commonInterfaces::DavsRequest> artifactRequest,
68 std::shared_ptr<davsInterfaces::DavsDownloadCallbackInterface> downloadCallback,
69 std::shared_ptr<davsInterfaces::DavsCheckCallbackInterface> checkCallback,
70 bool downloadImmediately)
override;
73 std::shared_ptr<commonInterfaces::DavsRequest> artifactRequest,
74 std::shared_ptr<davsInterfaces::DavsDownloadCallbackInterface> downloadCallback,
75 std::shared_ptr<davsInterfaces::DavsCheckCallbackInterface> checkCallback)
override;
109 std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> authDelegate,
110 std::shared_ptr<davsInterfaces::DavsEndpointHandlerInterface> davsEndpointHandler,
111 std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface>
metricRecorder =
nullptr,
112 std::chrono::seconds forcedUpdateInterval = std::chrono::seconds(0));
115 std::shared_ptr<commonInterfaces::DavsRequest> artifactRequest,
116 std::shared_ptr<davsInterfaces::DavsDownloadCallbackInterface> downloadCallback,
117 std::shared_ptr<davsInterfaces::DavsCheckCallbackInterface> checkCallback,
118 bool enableAutoUpdate,
119 bool downloadImmediately);
128 void executeUpdateRegisteredArtifact(
const ArtifactGroup& artifactGroup);
135 std::vector<ArtifactGroup> executeParseArtifactGroupFromJson(
const std::string& jsonArtifactList);
141 const std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> m_authDelegate;
144 const std::shared_ptr<davsInterfaces::DavsEndpointHandlerInterface> m_davsEndpointHandler;
147 const std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> m_metricRecorder;
150 const std::chrono::seconds m_forcedUpdateInterval;
153 const std::shared_ptr<alexaClientSDK::avsCommon::utils::power::PowerResource> m_powerResource;
156 std::unordered_map<std::string, std::shared_ptr<DavsHandler>> m_handlers;
168 #endif // ACSDKDAVSCLIENT_DAVSCLIENT_H_
std::string registerArtifact(std::shared_ptr< commonInterfaces::DavsRequest > artifactRequest, std::shared_ptr< davsInterfaces::DavsDownloadCallbackInterface > downloadCallback, std::shared_ptr< davsInterfaces::DavsCheckCallbackInterface > checkCallback, bool downloadImmediately) override
Definition: DavsClient.h:30
void deregisterArtifact(const std::string &requestUUID) override
::std::string string
Definition: gtest-port.h:1097
Definition: ArtifactHandlerInterface.h:26
Single-thread executor implementation.
Definition: Executor.h:45
bool getIdleState() const
static std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder
Metric recorder shared ptr.
Definition: BaseAPLCapabilityAgentTest.cpp:261
~DavsClient() override=default
std::string downloadOnce(std::shared_ptr< commonInterfaces::DavsRequest > artifactRequest, std::shared_ptr< davsInterfaces::DavsDownloadCallbackInterface > downloadCallback, std::shared_ptr< davsInterfaces::DavsCheckCallbackInterface > checkCallback) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void setIdleState(bool idleState)
Definition: DavsClient.h:87
void enableAutoUpdate(const std::string &requestUUID, bool enable) override
std::string key
Definition: DavsClient.h:89
static std::shared_ptr< DavsClient > create(std::string workingDirectory, std::shared_ptr< alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface > authDelegate, std::shared_ptr< alexaClientSDK::avsCommon::sdkInterfaces::InternetConnectionMonitorInterface > wifiMonitor, std::shared_ptr< davsInterfaces::DavsEndpointHandlerInterface > davsEndpointHandler, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder=nullptr, std::chrono::seconds forcedUpdateInterval=std::chrono::seconds(0))
Definition: InternetConnectionObserverInterface.h:26
void onConnectionStatusChanged(bool connected) override
AuthDelegate that curlWrapper will use to get the Authentication Token.
void checkAndUpdateArtifactGroupFromJson(const std::string &jsonArtifactList)
AuthDelegate that curlWrapper will use to get the Authentication Token.
void checkAndUpdateArtifactGroupVector(const std::vector< DavsClient::ArtifactGroup > &artifactVector)
AuthDelegate that curlWrapper will use to get the Authentication Token.
std::string type
Definition: DavsClient.h:88