Skip to content

Commit

Permalink
replaced raw pointer with shared_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
HJLebbink committed Mar 20, 2024
1 parent b29b43e commit 914702e
Show file tree
Hide file tree
Showing 60 changed files with 157 additions and 142 deletions.
4 changes: 2 additions & 2 deletions examples/BucketExists.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create bucket exists arguments.
minio::s3::BucketExistsArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/ComposeObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create compose object arguments.
minio::s3::ComposeObjectArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/CopyObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create copy object arguments.
minio::s3::CopyObjectArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteBucketEncryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete bucket encryption arguments.
minio::s3::DeleteBucketEncryptionArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteBucketLifecycle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete bucket lifecycle arguments.
minio::s3::DeleteBucketLifecycleArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteBucketNotification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete bucket notification arguments.
minio::s3::DeleteBucketNotificationArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteBucketPolicy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete bucket policy arguments.
minio::s3::DeleteBucketPolicyArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteBucketReplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete bucket encryption arguments.
minio::s3::DeleteBucketEncryptionArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteBucketTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete bucket tags arguments.
minio::s3::DeleteBucketTagsArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteObjectLockConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete object lock config arguments.
minio::s3::DeleteObjectLockConfigArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DeleteObjectTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create delete object tags arguments.
minio::s3::DeleteObjectTagsArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DisableObjectLegalHold.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create disable object legal hold arguments.
minio::s3::DisableObjectLegalHoldArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/DownloadObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create download object arguments.
minio::s3::DownloadObjectArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/EnableObjectLegalHold.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create enable object legal hold arguments.
minio::s3::EnableObjectLegalHoldArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBucketEncryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get bucket encryption arguments.
minio::s3::GetBucketEncryptionArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBucketLifecycle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get bucket lifecycle arguments.
minio::s3::GetBucketLifecycleArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBucketNotification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get bucket notification arguments.
minio::s3::GetBucketNotificationArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBucketPolicy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get bucket policy arguments.
minio::s3::GetBucketPolicyArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBucketReplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get bucket encryption arguments.
minio::s3::GetBucketEncryptionArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBucketTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get bucket tags arguments.
minio::s3::GetBucketTagsArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetBucketVersioning.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get bucket versioning arguments.
minio::s3::GetBucketVersioningArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get object arguments.
minio::s3::GetObjectArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetObjectLockConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get object lock config arguments.
minio::s3::GetObjectLockConfigArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetObjectProgress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get object arguments.
minio::s3::GetObjectArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetObjectRetention.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get object retention arguments.
minio::s3::GetObjectRetentionArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetObjectTags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get object tags arguments.
minio::s3::GetObjectTagsArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetPresignedObjectUrl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get presigned object url arguments.
minio::s3::GetPresignedObjectUrlArgs args;
Expand Down
4 changes: 2 additions & 2 deletions examples/GetPresignedPostFormData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main() {
minio::s3::BaseUrl base_url("play.min.io");

// Create credential provider.
minio::creds::StaticProvider provider(
auto provider = std::make_unique<minio::creds::StaticProvider>(
"Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG");

// Create S3 client.
minio::s3::Client client(base_url, &provider);
minio::s3::Client client(base_url, std::move(provider));

// Create get presigned post form data arguments.
minio::utils::UtcTime expiration = minio::utils::UtcTime::Now();
Expand Down
Loading

0 comments on commit 914702e

Please sign in to comment.