16 #ifndef ACSDKDAVSCLIENT_DAVSCLIENT_H_
17 #define ACSDKDAVSCLIENT_DAVSCLIENT_H_
22 #include <unordered_map>
27 namespace acsdkAssets {
49 static std::shared_ptr<DavsClient>
create(
50 std::string workingDirectory,
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;
108 std::string workingDirectory,
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));
114 std::string handleRequest(
115 std::shared_ptr<commonInterfaces::DavsRequest> artifactRequest,
116 std::shared_ptr<davsInterfaces::DavsDownloadCallbackInterface> downloadCallback,
117 std::shared_ptr<davsInterfaces::DavsCheckCallbackInterface> checkCallback,
119 bool downloadImmediately);
128 void executeUpdateRegisteredArtifact(
const ArtifactGroup& artifactGroup);
135 std::vector<ArtifactGroup> executeParseArtifactGroupFromJson(
const std::string& jsonArtifactList);
138 const std::string m_workingDirectory;
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_