5 #ifndef CVMFS_SESSION_CONTEXT_H_
6 #define CVMFS_SESSION_CONTEXT_H_
28 size_t SendCB(
void* ptr,
size_t size,
size_t nmemb,
void* userp);
29 size_t RecvCB(
void* buffer,
size_t size,
size_t nmemb,
void* userp);
51 bool Initialize(
const std::string& api_url,
const std::string& session_token,
52 const std::string& key_id,
const std::string& secret,
54 uint64_t max_queue_size = 10);
55 bool Finalize(
bool commit,
const std::string& old_root_hash,
56 const std::string& new_root_hash,
65 const std::string& name =
"",
66 const bool force_dispatch =
false);
73 virtual bool Commit(
const std::string& old_root_hash,
74 const std::string& new_root_hash,
116 virtual bool Commit(
const std::string& old_root_hash,
117 const std::string& new_root_hash,
136 #endif // CVMFS_SESSION_CONTEXT_H_
static void * UploadLoop(void *data)
UniquePtr< Tube< UploadJob > > upload_jobs_
std::string session_token_
virtual Future< bool > * DispatchObjectPack(ObjectPack *pack)=0
pthread_mutex_t current_pack_mtx_
virtual bool InitializeDerived(uint64_t max_queue_size)
uint64_t bytes_dispatched_
virtual bool Commit(const std::string &old_root_hash, const std::string &new_root_hash, const RepositoryTag &tag)=0
ObjectPack::BucketHandle NewBucket()
virtual Future< bool > * DispatchObjectPack(ObjectPack *pack)
virtual bool Commit(const std::string &old_root_hash, const std::string &new_root_hash, const RepositoryTag &tag)
static const uint64_t kDefaultLimit
uint64_t bytes_committed_
bool CommitBucket(const ObjectPack::BucketContentType type, const shash::Any &id, const ObjectPack::BucketHandle handle, const std::string &name="", const bool force_dispatch=false)
virtual bool DoUpload(const UploadJob *job)
const std::string * json_message
ObjectPackProducer * pack_serializer
virtual bool FinalizeDerived()=0
std::vector< ObjectPack::BucketHandle > active_handles_
virtual ~SessionContextBase()
bool Finalize(bool commit, const std::string &old_root_hash, const std::string &new_root_hash, const RepositoryTag &tag)
virtual bool InitializeDerived(uint64_t max_queue_size)=0
static UploadJob terminator_
size_t SendCB(void *ptr, size_t size, size_t nmemb, void *userp)
ObjectPack * current_pack_
Tube< Future< bool > > upload_results_
bool Initialize(const std::string &api_url, const std::string &session_token, const std::string &key_id, const std::string &secret, uint64_t max_pack_size=ObjectPack::kDefaultLimit, uint64_t max_queue_size=10)
virtual bool FinalizeDerived()
size_t RecvCB(void *buffer, size_t size, size_t nmemb, void *userp)