blob: a78d748016f440c211b5ac22be7e0a64f63a7cdb [file] [log] [blame]
/**
* @file S3.h
* GetGPS class declaration
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __S3_H__
#define __S3_H__
#include <aws/core/Aws.h>
#include <aws/s3/S3Client.h>
#include <aws/s3/model/Bucket.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/logging/DefaultLogSystem.h>
#include <aws/core/utils/logging/AWSLogging.h>
namespace org {
namespace apache {
namespace nifi {
namespace minifi {
namespace processors {
class S3Initializer{
public:
S3Initializer(){
Aws::InitAPI(options);
Aws::Utils::Logging::InitializeAWSLogging(
Aws::MakeShared<Aws::Utils::Logging::DefaultLogSystem>(
"RunUnitTests", Aws::Utils::Logging::LogLevel::Trace, "aws_sdk_"));
}
~S3Initializer(){
Aws::ShutdownAPI(options);
}
private:
Aws::SDKOptions options;
};
class S3Singleton{
public:
static S3Initializer *get(){
static S3Initializer init;
return &init;
}
private:
S3Singleton(){
}
};
} /* namespace processors */
} /* namespace minifi */
} /* namespace nifi */
} /* namespace apache */
} /* namespace org */
#endif