package info.knacki.pass.git;

import info.knacki.pass.git.entities.GitCommit;
import info.knacki.pass.git.entities.GitObject;
import info.knacki.pass.git.entities.GitRef;
import info.knacki.pass.io.OnResponseListener;
import info.knacki.pass.io.OnStreamResponseListener;

public interface GitInterface {

    void GetRefs(OnResponseListener<GitRef[]> callback);

    void FetchCommit(GitRef ref, OnResponseListener<GitCommit> response);

    void FetchTree(GitCommit ci, OnStreamResponseListener<GitObject.GitTree> response);

    void FetchHead(final OnStreamResponseListener<GitCommit> response);

    void FetchBlob(GitObject.GitBlob blob, OnResponseListener<byte[]> response);

    void PushBlobs(GitCommit.Builder commitBuilder, OnStreamResponseListener<Void> resp);
}
