mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-09-07 18:16:00 -05:00
remote::Storage just barely working.
This commit is contained in:
43
include/remote/Form.hpp
Normal file
43
include/remote/Form.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace remote
|
||||
{
|
||||
/// @brief This is a class to build URL encoded form bodies and be more readable than snprintfs.
|
||||
class Form
|
||||
{
|
||||
public:
|
||||
Form() = default;
|
||||
|
||||
/// @brief Copy constructor
|
||||
/// @param form Form to copy from.
|
||||
Form(const Form &form);
|
||||
|
||||
/// @brief Move constructor.
|
||||
/// @param form Form to copy from.
|
||||
Form(Form &&form);
|
||||
|
||||
/// @brief = Operator.
|
||||
/// @param form Form to copy.
|
||||
Form &operator=(const Form &form);
|
||||
|
||||
/// @brief = Move operator.
|
||||
/// @param form Form to rob of its life.
|
||||
Form &operator=(Form &&form);
|
||||
|
||||
/// @brief Appends a parameter to the form/URL encoded text.
|
||||
/// @param param Parameter to append.
|
||||
/// @param value Value to append.
|
||||
Form &append_parameter(std::string_view param, std::string_view value);
|
||||
|
||||
/// @brief Returns the C string of the form string.
|
||||
const char *get() const;
|
||||
|
||||
/// @brief Returns m_form.length()
|
||||
size_t length() const;
|
||||
|
||||
private:
|
||||
/// @brief String containing the actual data posted.
|
||||
std::string m_form{};
|
||||
};
|
||||
} // namespace remote
|
||||
@@ -8,116 +8,85 @@ namespace remote
|
||||
class GoogleDrive final : public remote::Storage
|
||||
{
|
||||
public:
|
||||
/// @brief Google Drive class constructor. Unlike PC prototype, the path to the client_secret is hardcoded.
|
||||
/// @param
|
||||
GoogleDrive(void);
|
||||
/// @brief Loads the config from SD.
|
||||
GoogleDrive();
|
||||
|
||||
/// @brief Changes the current parent directory.
|
||||
/// @param id ID of the parent to target.
|
||||
void change_directory(std::string_view id) override;
|
||||
|
||||
/// @brief Creates a new directory on Google Drive.
|
||||
/// @brief Creates a directory on Google Drive.
|
||||
/// @param name Name of the directory to create.
|
||||
/// @return True on success. False on failure.
|
||||
bool create_directory(std::string_view name) override;
|
||||
|
||||
/// @brief Deletes a directory from Google Drive.
|
||||
/// @param id ID of the directory to delete.
|
||||
/// @return True on success. False on failure.
|
||||
bool delete_directory(std::string_view id) override;
|
||||
|
||||
/// @brief Uploads a file to Google Drive.
|
||||
/// @param source Source path.
|
||||
/// @return True on success. False on failure.
|
||||
/// @brief Uploads the file from source. File name is used to name the file.
|
||||
/// @param source Path to upload the file from.
|
||||
bool upload_file(const fslib::Path &source) override;
|
||||
|
||||
/// @brief Patches or updates a file on Google Drive.
|
||||
/// @param id ID of the file to patch.
|
||||
/// @param source Source path of the updated file.
|
||||
/// @return True on success. False on failure.
|
||||
bool patch_file(std::string_view id, const fslib::Path &source) override;
|
||||
|
||||
/// @brief Deletes a file from Google Drive.
|
||||
/// @param id ID of the file to delete.
|
||||
/// @return True on success. False on failure.
|
||||
bool delete_file(std::string_view id) override;
|
||||
/// @brief Patches or updates the file on Google Drive.
|
||||
/// @param file Pointer to the item containing the data needed to update the file.
|
||||
/// @param source Source path to update from.
|
||||
bool patch_file(remote::Item *file, const fslib::Path &source) override;
|
||||
|
||||
/// @brief Downloads a file from Google Drive.
|
||||
/// @param id ID of the file to download.
|
||||
/// @param destination Path with the destination to save the file to.
|
||||
/// @return True on success. False on failure.
|
||||
bool download_file(std::string_view id, const fslib::Path &destination) override;
|
||||
/// @param file Pointer to the item containing data to download the file.
|
||||
/// @param destination Location to write the downloaded file to.
|
||||
bool download_file(const remote::Item *file, const fslib::Path &destination) override;
|
||||
|
||||
// Sign in related functions.
|
||||
/// @brief Returns if a sign in is required for using Google Drive.
|
||||
/// @return True if sign in is required. False if it isn't.
|
||||
bool sign_in_required(void) const;
|
||||
/// @brief Deletes an item from Google Drive.
|
||||
/// @param item Pointer to item containing data to delete the item.
|
||||
bool delete_item(const remote::Item *item) override;
|
||||
|
||||
/// @brief Gets the data needed to display and sign into Google.
|
||||
/// @param code String to write the sign in code to.
|
||||
/// @param expires std::time_t to write the expiration time to.
|
||||
/// @param wait Time in seconds while pinging server.
|
||||
/// @return True on success. False on failure.
|
||||
bool get_sign_in_data(std::string &code, std::time_t &expires, int &wait);
|
||||
/// @brief Returns whether or not a sign in is required to use drive. AKA the refresh token is missing.
|
||||
bool sign_in_required() const;
|
||||
|
||||
/// @brief This function waits for the response from the server that the user signed in.
|
||||
/// @return True on success. False on failure.
|
||||
bool sign_in(void);
|
||||
/// @brief Requests the the necessary data from Google to login.
|
||||
/// @param message String to store the message to.
|
||||
/// @param code String to store the device code from Google.
|
||||
/// @param expiration time_t to store when the sign in window closes.
|
||||
/// @param wait Int to store the time in seconds between server pings.
|
||||
bool get_sign_in_data(std::string &message, std::string &code, std::time_t &expiration, int &wait);
|
||||
|
||||
/// @brief This is the function that pings the server to see if the user entered the code yet.
|
||||
/// @param code The code Google reponded with for verification.
|
||||
/// @return If the user signs in, true. If not, false;
|
||||
bool poll_sign_in(std::string_view code);
|
||||
|
||||
private:
|
||||
/// @brief Client ID.
|
||||
/// @brief Google client ID.
|
||||
std::string m_clientId;
|
||||
|
||||
/// @brief Client secret.
|
||||
/// @brief Google client secret.
|
||||
std::string m_clientSecret;
|
||||
|
||||
/// @brief Authorization token.
|
||||
/// @brief Authentication token.
|
||||
std::string m_token;
|
||||
|
||||
/// @brief Token refresh token.
|
||||
/// @brief Token used for refreshing token when it expires.
|
||||
std::string m_refreshToken;
|
||||
|
||||
/// @brief Authentication header string.
|
||||
/// @brief This is to save the authentication header string instead of recreating it over and over.
|
||||
std::string m_authHeader;
|
||||
|
||||
/// @brief Calculated time the token expires in.
|
||||
/// @brief This is the calculate time when the auth token expires.
|
||||
std::time_t m_tokenExpires;
|
||||
|
||||
/// @brief Gets and sets the root ID of Google Drive using V2 of the API.
|
||||
/// @return True on success. False on failure.
|
||||
bool get_set_root_id(void);
|
||||
/// @brief Uses V2 of Drive's API to get the root directory ID from Google.
|
||||
bool get_root_id();
|
||||
|
||||
/// @brief Returns whether or not the token is still valid with a grace period of 10 seconds.
|
||||
/// @return True if the token is still valid. False if it isn't.
|
||||
bool token_is_valid(void) const;
|
||||
/// @brief Returns whether or not the auth token is still valid for use or needs to be refreshed.
|
||||
bool token_is_valid() const;
|
||||
|
||||
/// @brief Forces a refresh of the access token.
|
||||
/// @return True on success. False on failure.
|
||||
bool refresh_token(void);
|
||||
/// @brief Attempts to refresh the auth token if needed.
|
||||
bool refresh_token();
|
||||
|
||||
/// @brief Requests a listing and processes it.
|
||||
/// @return True on success. False on failure.
|
||||
bool request_listing(void);
|
||||
/// @brief Requests and processes the entire listing for JKSV.
|
||||
bool request_listing();
|
||||
|
||||
/// @brief Processes a file list from Google Drive.
|
||||
/// @param json Json object to process.
|
||||
/// @return True on success. False on failure.
|
||||
/// @brief Processes and listing
|
||||
/// @param json Json object to use for parsing.
|
||||
bool process_listing(json::Object &json);
|
||||
|
||||
/// @brief Tries to locate a directory according to its ID instead of its name.
|
||||
/// @param id ID of the directory to search for.
|
||||
/// @return Iterator to directory found. m_list.end() on failure.
|
||||
remote::Storage::List::iterator find_directory_by_id(std::string_view id);
|
||||
|
||||
/// @brief Tries to locate a file according to its ID instead of its name.
|
||||
/// @param id ID of the file to locate.
|
||||
/// @return Iterator to the file on success. m_list.end() on failure.
|
||||
remote::Storage::List::iterator find_file_by_id(std::string_view id);
|
||||
|
||||
/// @brief Checks for, logs, and returns if an error is detected within the json::Object passed.
|
||||
/// @param json json::Object to check.
|
||||
/// @return True if an error was found. False if one wasn't.
|
||||
bool error_occurred(json::Object &json);
|
||||
/// @brief Performs a quick check on the json object passed for errors.
|
||||
/// @param json Json object to check.
|
||||
/// @param log Whether or not to log the error.
|
||||
/// @note This doesn't catch every error. Google's errors aren't consistent.
|
||||
bool error_occurred(json::Object &json, bool log = true);
|
||||
};
|
||||
} // namespace remote
|
||||
|
||||
@@ -16,23 +16,23 @@ namespace remote
|
||||
|
||||
/// @brief Returns the name of the item.
|
||||
/// @return Name of the item.
|
||||
std::string_view get_name(void) const;
|
||||
std::string_view get_name() const;
|
||||
|
||||
/// @brief Returns the id of the item.
|
||||
/// @return ID of the item.
|
||||
std::string_view get_id(void) const;
|
||||
std::string_view get_id() const;
|
||||
|
||||
/// @brief Returns the parent id of the item.
|
||||
/// @return Parent ID of the item.
|
||||
std::string_view get_parent_id(void) const;
|
||||
std::string_view get_parent_id() const;
|
||||
|
||||
/// @brief Gets the size of the item.
|
||||
/// @return Size of the item in bytes.
|
||||
size_t get_size(void) const;
|
||||
size_t get_size() const;
|
||||
|
||||
/// @brief Returns whether or not the item is a directory.
|
||||
/// @return Whether or not the item is a directory.
|
||||
bool is_directory(void) const;
|
||||
bool is_directory() const;
|
||||
|
||||
/// @brief Sets the name of the item.
|
||||
/// @param name New name of the item.
|
||||
|
||||
@@ -8,102 +8,113 @@
|
||||
|
||||
namespace remote
|
||||
{
|
||||
/// @brief This is the base storage class.
|
||||
class Storage
|
||||
{
|
||||
public:
|
||||
// Definition for remote file listing.
|
||||
/// @brief Definition to make things easier to type.
|
||||
using DirectoryListing = std::vector<remote::Item *>;
|
||||
|
||||
/// @brief This makes writing some stuff for these classes way easier.
|
||||
using List = std::vector<remote::Item>;
|
||||
|
||||
/// @brief Default storage constructor.
|
||||
Storage(void) = default;
|
||||
/// @brief This just allocates the curl::Handle.
|
||||
Storage();
|
||||
|
||||
/// @brief Returns whether or not the storage type/driver was initialized successfully.
|
||||
/// @return True if it was. False if it wasn't.
|
||||
bool is_initialized(void) const;
|
||||
/// @brief Returns whether or not the Storage type was successfully. initialized.
|
||||
bool is_initialized() const;
|
||||
|
||||
// Directory functions.
|
||||
/// @brief Returns whether or not a directory with name exists within the current parent.
|
||||
/// @param name Name of the directory.
|
||||
/// @return True if one was found. False if one wasn't.
|
||||
/// @param name Name of the directory to search for.
|
||||
bool directory_exists(std::string_view name);
|
||||
|
||||
/// @brief Tries to locate and get the ID of a directory within the current parent.
|
||||
/// @param name Name of the directory to get.
|
||||
/// @param idOut String to write the ID to if it's found.
|
||||
/// @return True on success. False on failure.
|
||||
bool get_directory_id(std::string_view name, std::string &idOut);
|
||||
/// @brief Returns the parent to the root directory.
|
||||
void return_to_root();
|
||||
|
||||
/// @brief Returns whether or not a file exists within the current parent directory.
|
||||
/// @param name Name of the file to search for.
|
||||
/// @return True if one is found. False if one isn't.
|
||||
bool file_exists(std::string_view name);
|
||||
/// @brief This allows the root to be set to something other than what it originally was at construction.
|
||||
/// @param root Item to be used as the new root.
|
||||
void set_root_directory(remote::Item *root);
|
||||
|
||||
/// @brief Tries to locate and get the ID of a file within the current parent directory.
|
||||
/// @param name Name of the file to search for
|
||||
/// @param idOut String it write the ID to.
|
||||
/// @return True on success. False when no file is found.
|
||||
bool get_file_id(std::string_view name, std::string &idOut);
|
||||
/// @brief Changes the current parent directory.
|
||||
/// @param Item Item to use as the current parent directory.
|
||||
void change_directory(remote::Item *item);
|
||||
|
||||
/// @brief Virtual function to change the current parent/working directory.
|
||||
/// @param name Name or ID of the directory to change to.
|
||||
virtual void change_directory(std::string_view name) = 0;
|
||||
|
||||
/// @brief Virtual function to create a new directory within the current parent directory.
|
||||
/// @brief Creates a directory in the current parent directory.
|
||||
/// @param name Name of the directory to create.
|
||||
/// @return True on success. False on failure.
|
||||
virtual bool create_directory(std::string_view name) = 0;
|
||||
|
||||
/// @brief Virtual function to delete a directory from within the current parent directory.
|
||||
/// @param name Name or ID of the directory to delete.
|
||||
/// @return True on success. False on failure.
|
||||
virtual bool delete_directory(std::string_view name) = 0;
|
||||
/// @brief Searches the list for a directory matching name and the current parent.
|
||||
/// @param name Name of the directory to search for.
|
||||
/// @return Pointer to the item representing the directory on success. nullptr on failure/not found.
|
||||
remote::Item *get_directory_by_name(std::string_view name);
|
||||
|
||||
/// @brief Virtual function to upload a file to remote storage.
|
||||
/// @param source fslib::Path of the source file to upload.
|
||||
/// @return True on success. False on failure.
|
||||
/// @brief Retrieves a listing of the items in the current parent directory.
|
||||
/// @param out List to fill.
|
||||
remote::Storage::DirectoryListing get_directory_listing();
|
||||
|
||||
// File functions.
|
||||
/// @brief Returns whether a file with name exists within the current directory.
|
||||
/// @param name Name of the file.
|
||||
bool file_exists(std::string_view name);
|
||||
|
||||
/// @brief Uploads a file from the SD card to the remote.
|
||||
/// @param source Path to the file to upload.
|
||||
virtual bool upload_file(const fslib::Path &source) = 0;
|
||||
|
||||
/// @brief Virtual function to patch or update a file.
|
||||
/// @param name Name or ID of the file to update.
|
||||
/// @param source Source path to upload from.
|
||||
/// @return True on success. False on failure.
|
||||
virtual bool patch_file(std::string_view name, const fslib::Path &source) = 0;
|
||||
/// @brief Patches or updates a file on the remote.
|
||||
/// @param item Item to be updated.
|
||||
/// @param source Path to the file to update with.
|
||||
virtual bool patch_file(remote::Item *file, const fslib::Path &source) = 0;
|
||||
|
||||
/// @brief Virtual function for downloading a file.
|
||||
/// @param name Name or ID of the file.
|
||||
/// @param destination fslib::Path containing the destination path.
|
||||
/// @return True on success. False on failure.
|
||||
virtual bool download_file(std::string_view name, const fslib::Path &destination) = 0;
|
||||
/// @brief Downloads a file from the remote.
|
||||
/// @param item Item to download.
|
||||
/// @param destination Path to download the file to.
|
||||
virtual bool download_file(const remote::Item *file, const fslib::Path &destination) = 0;
|
||||
|
||||
/// @brief Virtual function to delete a file from the remote storage.
|
||||
/// @param name Name or ID of the file to delete.
|
||||
/// @return True on success. False on failure.
|
||||
virtual bool delete_file(std::string_view name) = 0;
|
||||
/// @brief Searches the list for a file matching name and the current parent.
|
||||
/// @param name Name of the file to search for.
|
||||
/// @return Pointer to the item if located. nullptr if not.
|
||||
remote::Item *get_file_by_name(std::string_view name);
|
||||
|
||||
// General functions that apply to both.
|
||||
/// @brief Deletes a file or folder from the remote.
|
||||
/// @param item Item to delete.
|
||||
virtual bool delete_item(const remote::Item *item) = 0;
|
||||
|
||||
/// @brief Returns whether or not the remote storage type supports UTF-8 for names or requires path safe titles.
|
||||
bool supports_utf8() const;
|
||||
|
||||
protected:
|
||||
/// @brief Whether or not initialization of the remote storage service was successful.
|
||||
/// @brief This is the size of the buffers used for snprintf'ing URLs together.
|
||||
static constexpr size_t SIZE_URL_BUFFER = 0x401;
|
||||
|
||||
/// @brief This is the size used for uploads.
|
||||
static constexpr size_t SIZE_UPLOAD_BUFFER = 0x10000;
|
||||
|
||||
/// @brief This allows JKSV to know whether or not the storage type supports UTF-8.
|
||||
bool m_utf8Paths = false;
|
||||
|
||||
/// @brief This stores whether or not the instance was initialized successfully.
|
||||
bool m_isInitialized = false;
|
||||
|
||||
/// @brief The root directory of the remote storage.
|
||||
/// @brief This is the root directory of the remote storage.
|
||||
std::string m_root;
|
||||
|
||||
/// @brief Current parent directory.
|
||||
/// @brief This stores the current parent.
|
||||
std::string m_parent;
|
||||
|
||||
/// @brief Current storage listing.
|
||||
Storage::List m_list;
|
||||
|
||||
/// @brief CURL handle.
|
||||
/// @brief Curl handle.
|
||||
curl::Handle m_curl;
|
||||
|
||||
/// @brief Searches for a directory in the current parent directory.
|
||||
/// @param name Name of the directory to search for.
|
||||
/// @return Iterator to found directory or m_list.end() on failure.
|
||||
Storage::List::iterator find_directory(std::string_view name);
|
||||
/// @brief This is the main remote listing.
|
||||
Storage::List m_list;
|
||||
|
||||
/// @brief Searches for a file named file within the current parent directory.
|
||||
/// @brief Searches the list for a directory matching name and the current parent.
|
||||
/// @param name Name to search for.
|
||||
Storage::List::iterator find_directory_by_name(std::string_view name);
|
||||
|
||||
/// @brief Searches to find if a file with name exists within the current parent.
|
||||
/// @param name Name of the file to search for.
|
||||
/// @return Iterator to the file found. m_list.end() on failure.
|
||||
Storage::List::iterator find_file(std::string_view name);
|
||||
Storage::List::iterator find_file_by_name(std::string_view name);
|
||||
};
|
||||
} // namespace remote
|
||||
|
||||
60
include/remote/URL.hpp
Normal file
60
include/remote/URL.hpp
Normal file
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace remote
|
||||
{
|
||||
/// @brief This is a class to make URLs easier to build for Google Drive and WebDav.
|
||||
/// @note Normally I don't go this route, but it makes things easier.
|
||||
class URL final
|
||||
{
|
||||
public:
|
||||
/// @brief Default
|
||||
URL() = default;
|
||||
|
||||
/// @brief Constructs a URL with a base URL already in place.
|
||||
/// @param base String_view containing the base URL.
|
||||
URL(std::string_view base);
|
||||
|
||||
/// @brief Copy constructor.
|
||||
/// @param url URL to copy.
|
||||
URL(const URL &url);
|
||||
|
||||
/// @brief Move constructor.
|
||||
/// @param url URL to move.
|
||||
URL(URL &&url);
|
||||
|
||||
/// @brief Makes a copy of the URL passed.
|
||||
/// @param url remote::URL instance to make a copy of.
|
||||
URL &operator=(const URL &url);
|
||||
|
||||
/// @brief Move operator.
|
||||
/// @param url URL to move.
|
||||
URL &operator=(URL &&url);
|
||||
|
||||
/// @brief Sets the base URL. Basically resets the string back to square 0.
|
||||
/// @param base Base URL to start with.
|
||||
URL &set_base(std::string_view base);
|
||||
|
||||
/// @brief Appends the string passed as a path to the URL
|
||||
/// @param path Path to append;
|
||||
URL &append_path(std::string_view path);
|
||||
|
||||
/// @brief Appends a string parameter
|
||||
/// @param param Parameter to append.
|
||||
/// @param value Value of the parameter to append.
|
||||
URL &append_parameter(std::string_view param, std::string_view value);
|
||||
|
||||
/// @brief Appends a trailing slash if needed.
|
||||
URL &append_slash();
|
||||
|
||||
/// @brief Returns the C string of the url string.
|
||||
const char *get() const;
|
||||
|
||||
private:
|
||||
/// @brief This is where the actual URL is held.
|
||||
std::string m_url;
|
||||
|
||||
/// @brief This checks and appends the necessary separator to the URL string.
|
||||
void append_separator();
|
||||
};
|
||||
} // namespace remote
|
||||
58
include/remote/WebDav.hpp
Normal file
58
include/remote/WebDav.hpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
#include "remote/Storage.hpp"
|
||||
#include "remote/URL.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace remote
|
||||
{
|
||||
class WebDav final : public remote::Storage
|
||||
{
|
||||
public:
|
||||
/// @brief Loads the WebDav config from the SD card and loads the listing.
|
||||
WebDav();
|
||||
|
||||
/// @brief Creates a new directory on the WebDav server.
|
||||
/// @param name Name of the directory to create.
|
||||
bool create_directory(std::string_view name) override;
|
||||
|
||||
/// @brief Uploads a file to the webdav server. File name is retrieved from the path.
|
||||
/// @param source Local path of the file to upload.
|
||||
bool upload_file(const fslib::Path &source) override;
|
||||
|
||||
/// @brief Patches or updates a file on the WebDav server.
|
||||
/// @param file Pointer to the file to update.
|
||||
/// @param source Path of the source file to update with.
|
||||
bool patch_file(remote::Item *file, const fslib::Path &source) override;
|
||||
|
||||
/// @brief Downloads the passed file from the WebDav server.
|
||||
/// @param file Pointer to the file to download.
|
||||
/// @param destination Path to write the downloaded data from.
|
||||
bool download_file(const remote::Item *item, const fslib::Path &destination) override;
|
||||
|
||||
/// @brief Deletes the target item from the WebDav server.
|
||||
/// @param item Item to delete.
|
||||
bool delete_item(const remote::Item *item) override;
|
||||
|
||||
private:
|
||||
/// @brief Origin or server address.
|
||||
std::string m_origin;
|
||||
|
||||
/// @brief Username for curl requests.
|
||||
std::string m_username;
|
||||
|
||||
/// @brief Password for curl requests.
|
||||
std::string m_password;
|
||||
|
||||
/// @brief Appends the username and password to a WebDav curl request.
|
||||
void append_credentials();
|
||||
|
||||
/// @brief Requests PROPFIND to the url passed.
|
||||
/// @param url URL to PROPFIND with.
|
||||
/// @param xml String to record XML response to.
|
||||
bool prop_find(const remote::URL &url, std::string &xml);
|
||||
|
||||
/// @brief Processes a PROPFIND XML response.
|
||||
/// @param xml XML response.
|
||||
bool process_listing(std::string_view xml);
|
||||
};
|
||||
} // namespace remote
|
||||
19
include/remote/remote.hpp
Normal file
19
include/remote/remote.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include "remote/Storage.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace remote
|
||||
{
|
||||
// Both of these are needed in two different places.
|
||||
static constexpr std::string_view PATH_GOOGLE_DRIVE_CONFIG = "sdmc:/config/JKSV/client_secret.json";
|
||||
static constexpr std::string_view PATH_WEBDAV_CONFIG = "sdmc:/config/JKSV/WebDav.json";
|
||||
|
||||
/// @brief Initializes the Storage instance to Google Drive.
|
||||
void initialize_google_drive();
|
||||
|
||||
/// @brief Initializes the Storage instance to WebDav
|
||||
void initialize_webdav();
|
||||
|
||||
/// @brief Returns the pointer to the Storage instance.
|
||||
remote::Storage *get_remote_storage();
|
||||
} // namespace remote
|
||||
Reference in New Issue
Block a user