AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Member Functions | List of all members
alexaClientSDK::sampleApplications::ipcServerSampleApp::CachingDownloadManager Class Reference

#include <CachingDownloadManager.h>

Inheritance diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::CachingDownloadManager:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::CachingDownloadManager:
Collaboration graph
[legend]

Classes

class  CachedContent
 
class  Observer
 

Public Member Functions

 CachingDownloadManager (std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface > httpContentFetcherInterfaceFactoryInterface, unsigned long cachePeriodInSeconds, unsigned long maxCacheSize, std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface > miscStorage, const std::shared_ptr< registrationManager::CustomerDataManagerInterface > customerDataManager)
 
std::string retrieveContent (const std::string &source, std::shared_ptr< Observer > observer=nullptr)
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::CustomerDataHandler
 CustomerDataHandler (const std::shared_ptr< registrationManager::CustomerDataManagerInterface > &dataManager)
 
virtual ~CustomerDataHandler ()
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::CustomerDataHandlerInterface
virtual ~CustomerDataHandlerInterface ()=default
 

Constructor & Destructor Documentation

◆ CachingDownloadManager()

alexaClientSDK::sampleApplications::ipcServerSampleApp::CachingDownloadManager::CachingDownloadManager ( std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface httpContentFetcherInterfaceFactoryInterface,
unsigned long  cachePeriodInSeconds,
unsigned long  maxCacheSize,
std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface miscStorage,
const std::shared_ptr< registrationManager::CustomerDataManagerInterface customerDataManager 
)

Constructor.

Parameters
httpContentFetcherFactoryPointer to a http content fetcher factory for making download requests
cachePeriodInSecondsNumber of seconds to reuse cache for downloaded packages
maxCacheSizeMaximum cache size for caching downloaded packages
miscStorageWrapper to read and write to misc stor=age database

Member Function Documentation

◆ retrieveContent()

std::string alexaClientSDK::sampleApplications::ipcServerSampleApp::CachingDownloadManager::retrieveContent ( const std::string &  source,
std::shared_ptr< Observer observer = nullptr 
)

Method that should be called when requesting content

Parameters
sourceURL
observerAn observer to notify of the download, or nullptr to disable notifications.
Returns
content - either from cache or from source

The documentation for this class was generated from the following file:

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