AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
RequesterFactory.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKASSETMANAGER_SRC_REQUESTERFACTORY_H_
17 #define ACSDKASSETMANAGER_SRC_REQUESTERFACTORY_H_
18 
19 #include "DavsRequester.h"
20 #include "UrlRequester.h"
22 
23 namespace alexaClientSDK {
24 namespace acsdkAssets {
25 namespace manager {
26 
31 public:
42  static std::unique_ptr<RequesterFactory> create(
43  std::shared_ptr<StorageManager> storageManager,
44  std::shared_ptr<commonInterfaces::AmdCommunicationInterface> communicationHandler,
45  std::shared_ptr<davsInterfaces::ArtifactHandlerInterface> davsClient,
46  std::string urlTmpDirectory,
47  std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> authDelegate,
48  std::shared_ptr<UrlAllowListWrapper> allowList);
49 
58  std::shared_ptr<Requester> createFromStorage(const std::string& metadataFilePath);
59 
67  std::shared_ptr<Requester> createFromMetadata(
68  const std::shared_ptr<RequesterMetadata>& metadata,
69  const std::string& metadataFilePath);
70 
71 private:
73  std::shared_ptr<StorageManager> storageManager,
74  std::shared_ptr<commonInterfaces::AmdCommunicationInterface> communicationHandler,
75  std::shared_ptr<davsInterfaces::ArtifactHandlerInterface> davsClient,
76  std::string urlTmpDirectory,
77  std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> authDelegate,
78  std::shared_ptr<UrlAllowListWrapper> allowList);
79 
80 private:
81  const std::shared_ptr<StorageManager> m_storageManager;
82  const std::shared_ptr<commonInterfaces::AmdCommunicationInterface> m_communicationHandler;
83  const std::shared_ptr<davsInterfaces::ArtifactHandlerInterface> m_davsClient;
85  const std::string m_urlTmpDirectory;
86  const std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> m_authDelegate;
87  const std::shared_ptr<alexaClientSDK::avsCommon::utils::power::PowerResource> m_urlPowerResource;
88  std::shared_ptr<UrlAllowListWrapper> m_allowedUrlList;
89 };
90 
91 } // namespace manager
92 } // namespace acsdkAssets
93 } // namespace alexaClientSDK
94 
95 #endif // ACSDKASSETMANAGER_SRC_REQUESTERFACTORY_H_
alexaClientSDK::acsdkAssets::manager::RequesterFactory::create
static std::unique_ptr< RequesterFactory > create(std::shared_ptr< StorageManager > storageManager, std::shared_ptr< commonInterfaces::AmdCommunicationInterface > communicationHandler, std::shared_ptr< davsInterfaces::ArtifactHandlerInterface > davsClient, std::string urlTmpDirectory, std::shared_ptr< alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface > authDelegate, std::shared_ptr< UrlAllowListWrapper > allowList)
Definition: RequesterFactory.cpp:49
alexaClientSDK::acsdkAssets::manager::RequesterFactory::createFromStorage
std::shared_ptr< Requester > createFromStorage(const std::string &metadataFilePath)
Definition: RequesterFactory.cpp:118
alexaClientSDK::acsdkAssets::manager::RequesterFactory
Definition: RequesterFactory.h:30
UrlRequester.h
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
alexaClientSDK::acsdkAssets::manager::RequesterFactory::createFromMetadata
std::shared_ptr< Requester > createFromMetadata(const std::shared_ptr< RequesterMetadata > &metadata, const std::string &metadataFilePath)
Definition: RequesterFactory.cpp:146
UrlAllowListWrapper.h
DavsRequester.h

AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0