diff options
| author | Vicent Martà <vicent@github.com> | 2012-12-05 11:47:19 -0800 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-12-05 11:47:19 -0800 |
| commit | e05ca13f1f3550f59790c0f992841abceee1b4c5 (patch) | |
| tree | a01c119011d0c6020c9288096d09ed055c475bd8 /include/git2/remote.h | |
| parent | a541eafa606b58e7ce3df8e496da8e032fdb74ec (diff) | |
| parent | ee1c33b146a366260a4648b1f29f470fedaca0fa (diff) | |
| download | libgit2-e05ca13f1f3550f59790c0f992841abceee1b4c5.tar.gz | |
Merge pull request #1115 from ben/struct-versions
Version info for public structs
Diffstat (limited to 'include/git2/remote.h')
| -rw-r--r-- | include/git2/remote.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index 0483cfc4b..75e2a59d8 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -347,12 +347,16 @@ typedef enum git_remote_completion_type { * Set the calbacks to be called by the remote. */ struct git_remote_callbacks { + unsigned int version; void (*progress)(const char *str, int len, void *data); int (*completion)(git_remote_completion_type type, void *data); int (*update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data); void *payload; }; +#define GIT_REMOTE_CALLBACKS_VERSION 1 +#define GIT_REMOTE_CALLBACKS_INIT {GIT_REMOTE_CALLBACKS_VERSION, 0} + /** * Set the callbacks for a remote * @@ -361,8 +365,9 @@ struct git_remote_callbacks { * * @param remote the remote to configure * @param callbacks a pointer to the user's callback settings + * @return 0 or an error code */ -GIT_EXTERN(void) git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks); +GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks); /** * Get the statistics structure that is filled in by the fetch operation. |
