Main Page
Namespaces
Classes
Files
File List
File Members
include
file_management
file_upload
file_management_factory.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 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
#pragma once
17
18
#include <
file_management/file_upload/file_manager.h
>
19
#include <
dataflow_lite/dataflow/status_monitor.h
>
20
#include <
file_management/file_upload/file_upload_streamer.h
>
21
#include <
dataflow_lite/dataflow/observed_queue.h
>
22
#include <
dataflow_lite/dataflow/queue_monitor.h
>
23
24
namespace
Aws
{
25
namespace
FileManagement {
26
36
template
<
37
typename
T,
38
typename
O,
39
class
=
typename
std::enable_if<std::is_base_of<DataReader<T>, O>::value, O>::type>
40
std::shared_ptr<FileUploadStreamer<T>>
createFileUploadStreamer
(
41
std::shared_ptr<O> file_manager,
42
FileUploadStreamerOptions
file_manager_options)
43
{
44
if
(!file_manager) {
45
throw
"Invalid file_manager"
;
46
}
47
// Create a file upload manager to handle uploading a file.
48
auto
file_upload_manager =
49
std::make_shared<Aws::FileManagement::FileUploadStreamer<T>>(
50
file_manager,
51
file_manager_options);
52
return
file_upload_manager;
53
}
54
55
}
// namespace FileManagement
56
}
// namespace Aws
57
Aws::FileManagement::createFileUploadStreamer
std::shared_ptr< FileUploadStreamer< T > > createFileUploadStreamer(std::shared_ptr< O > file_manager, FileUploadStreamerOptions file_manager_options)
Definition:
file_management_factory.h:40
Aws
Aws::FileManagement::FileUploadStreamerOptions
Definition:
file_upload_streamer.h:41
file_upload_streamer.h
observed_queue.h
queue_monitor.h
status_monitor.h
file_manager.h
file_management
Author(s): AWS RoboMaker
autogenerated on Fri May 7 2021 02:18:23