diff options
| author | Ben Straub <bs@github.com> | 2012-11-29 12:26:09 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2012-11-30 12:55:45 -0800 |
| commit | bde336ea51df071de922827ae322df7b01b059ce (patch) | |
| tree | 1fbf4d0e9bf4dc9499abd83226e2452f6e8047c8 /include/git2/transport.h | |
| parent | da820437368aae2088e992e7ce8944253693aa16 (diff) | |
| download | libgit2-bde336ea51df071de922827ae322df7b01b059ce.tar.gz | |
Add version fields and init macros for public input structs.
Diffstat (limited to 'include/git2/transport.h')
| -rw-r--r-- | include/git2/transport.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h index 61726922f..84d71c612 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -31,11 +31,15 @@ typedef enum { /* The base structure for all credential types */ typedef struct git_cred { + unsigned int version; /* This should update if subtypes are extended */ git_credtype_t credtype; void (*free)( struct git_cred *cred); } git_cred; +#define GIT_CRED_VERSION 1 +#define GIT_CRED_INIT {GIT_CRED_VERSION, 0} + /* A plaintext username and password */ typedef struct git_cred_userpass_plaintext { git_cred parent; @@ -82,6 +86,7 @@ typedef enum { typedef void (*git_transport_message_cb)(const char *str, int len, void *data); typedef struct git_transport { + unsigned int version; /* Set progress and error callbacks */ int (*set_callbacks)(struct git_transport *transport, git_transport_message_cb progress_cb, @@ -140,6 +145,9 @@ typedef struct git_transport { void (*free)(struct git_transport *transport); } git_transport; +#define GIT_TRANSPORT_VERSION 1 +#define GIT_TRANSPORT_INIT {GIT_TRANSPORT_VERSION, 0} + /** * Function to use to create a transport from a URL. The transport database * is scanned to find a transport that implements the scheme of the URI (i.e. @@ -284,6 +292,7 @@ typedef int (*git_smart_subtransport_cb)( typedef struct git_smart_subtransport_definition { /* The function to use to create the git_smart_subtransport */ git_smart_subtransport_cb callback; + /* True if the protocol is stateless; false otherwise. For example, * http:// is stateless, but git:// is not. */ unsigned rpc : 1; |
