ICloudStorage.h 1.84 KB
Newer Older
Paweł Wegner's avatar
Paweł Wegner committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*****************************************************************************
 * ICloudStorage.h : interface of ICloudStorage
 *
 *****************************************************************************
 * Copyright (C) 2016-2016 VideoLAN
 *
 * Authors: Paweł Wegner <pawel.wegner95@gmail.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#ifndef ICLOUDSTORAGE_H
#define ICLOUDSTORAGE_H

#include <vector>
Paweł Wegner's avatar
Paweł Wegner committed
28

Paweł Wegner's avatar
Paweł Wegner committed
29 30 31 32
#include "ICloudProvider.h"

namespace cloudstorage {

33 34 35
/**
 * Contains available CloudStorage providers.
 */
Paweł Wegner's avatar
Paweł Wegner committed
36 37
class ICloudStorage {
 public:
Paweł Wegner's avatar
Paweł Wegner committed
38 39
  using Pointer = std::unique_ptr<ICloudStorage>;

Paweł Wegner's avatar
Paweł Wegner committed
40 41
  virtual ~ICloudStorage() = default;

42 43 44 45 46
  /**
   * Retrieves list of available cloud providers.
   *
   * @return cloud providers
   */
47
  virtual std::vector<std::string> providers() const = 0;
48 49 50 51 52 53 54

  /**
   * Gets provider by name.
   *
   * @param name
   * @return cloud provider
   */
55 56
  virtual ICloudProvider::Pointer provider(
      const std::string& name, ICloudProvider::InitData&&) const = 0;
Paweł Wegner's avatar
Paweł Wegner committed
57 58

  static ICloudStorage::Pointer create();
Paweł Wegner's avatar
Paweł Wegner committed
59 60 61 62 63
};

}  // namespace cloudstorage

#endif  // ICLOUDSTORAGE_H