OXY-SYNC-CONTAINER 1.0
OXY-SYNC-CONTAINER Library Documentation
Loading...
Searching...
No Matches
oxy::sync::service::IPack Struct Referenceabstract

Interface for pack operations, including opening connections and managing packs. More...

#include <services.hpp>

Public Member Functions

virtual void download (std::string const &packName, std::string const &destination) const =0
 Download the specified pack to the given destination.
virtual std::string get_digest (std::string const &packName) const =0
 Get the digest of the specified pack.
virtual int64_t get_size (std::string const &packName) const =0
 Get the size of the specified pack.
virtual void open (const IConnectionPtr &conn)=0
 Open a connection using the specified IConnection pointer.
virtual void remove (std::string const &packName) const =0
 Remove the specified pack.
virtual void upload (std::string const &source, std::string const &packName) const =0
 Upload the specified source to the given pack.

Detailed Description

Interface for pack operations, including opening connections and managing packs.

This abstract class defines the interface for pack operations in the sync container library. Implementations of this interface must provide methods to open connections, retrieve pack digests, get pack sizes, download and upload packs, and remove packs.

Member Function Documentation

◆ download()

virtual void oxy::sync::service::IPack::download ( std::string const & packName,
std::string const & destination ) const
pure virtual

Download the specified pack to the given destination.

Parameters
packNameThe name of the pack to download.
destinationThe destination path where the pack will be downloaded.

◆ get_digest()

virtual std::string oxy::sync::service::IPack::get_digest ( std::string const & packName) const
pure virtual

Get the digest of the specified pack.

Parameters
packNameThe name of the pack.
Returns
The digest of the pack.

◆ get_size()

virtual int64_t oxy::sync::service::IPack::get_size ( std::string const & packName) const
pure virtual

Get the size of the specified pack.

Parameters
packNameThe name of the pack.
Returns
The size of the pack.

◆ open()

virtual void oxy::sync::service::IPack::open ( const IConnectionPtr & conn)
pure virtual

Open a connection using the specified IConnection pointer.

Parameters
connThe IConnection pointer to use for the connection.

◆ remove()

virtual void oxy::sync::service::IPack::remove ( std::string const & packName) const
pure virtual

Remove the specified pack.

Parameters
packNameThe name of the pack to remove.

◆ upload()

virtual void oxy::sync::service::IPack::upload ( std::string const & source,
std::string const & packName ) const
pure virtual

Upload the specified source to the given pack.

Parameters
sourceThe source path of the data to upload.
packNameThe name of the pack to upload to.