diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-09-20 23:23:42 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-10-02 06:42:27 +0200 |
commit | ffc97d51264f8af435ccf52d33a62a6925b174c9 (patch) | |
tree | e4d0e30c0f0d3a678260f06d77ea5c81810cba43 | |
parent | 36a241acbb39aa46cf5f7807aebd92e45f2f5eaf (diff) | |
download | libgit2-ffc97d51264f8af435ccf52d33a62a6925b174c9.tar.gz |
remote: add some comments to the callback struct
Hopefully clear up what they're for.
-rw-r--r-- | include/git2/remote.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index 8c21870de..8145de180 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -400,15 +400,47 @@ typedef enum git_remote_completion_type { /** * The callback settings structure * - * Set the calbacks to be called by the remote. + * Set the callbacks to be called by the remote when informing the user + * about the progress of the network operations. */ struct git_remote_callbacks { unsigned int version; + /** + * Textual progress from the remote. Text send over the + * progress side-band will be passed to this function (this is + * the 'counting objects' output. + */ void (*progress)(const char *str, int len, void *data); + + /** + * Completion is called when different parts of the download + * process are done (currently unused). + */ int (*completion)(git_remote_completion_type type, void *data); + + /** + * This will be called if the remote host requires + * authentication in order to connect to it. + */ int (*credentials)(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *data); + + /** + * During the download of new data, this will be regularly + * called with the current count of progress done by the + * indexer. + */ int (*transfer_progress)(const git_transfer_progress *stats, void *data); + + /** + * Each time a reference is updated locally, this function + * will be called with information about it. + */ int (*update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data); + + /** + * This will be passed to each of the callbacks in this struct + * as the last parameter. + */ void *payload; }; |