Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-07-24 21:03:22 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-07-30 22:28:16 +0400
commitb49c8f71aef574ce6606282a498627f5106220d5 (patch)
treeb4a9d07716c80b48e68f36d8fb3fb6c142447ac6 /src/netops.h
parent114dc6e14c47ff574b4c97d4519782de3f9d28b2 (diff)
remote: use the same code to control git and http
This allows us to add capabilitites to both at the same time, keeps them in sync and removes a lot of code. gitno_buffer now uses a callback to fill its buffer, allowing us to use the same interface for git and http (which uses callbacks).
Diffstat (limited to 'src/netops.h')
-rw-r--r--src/netops.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/netops.h b/src/netops.h
index e2c2b8171..dded55b63 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -18,10 +18,14 @@ struct gitno_buffer {
#ifdef GIT_SSL
struct gitno_ssl *ssl;
#endif
+ int (*recv)(gitno_buffer *buffer);
+ void *cb_data;
};
void gitno_buffer_setup(git_transport *t, gitno_buffer *buf, char *data, unsigned int len);
+void gitno_buffer_setup_callback(git_transport *t, gitno_buffer *buf, char *data, unsigned int len, int (*recv)(gitno_buffer *buf), void *cb_data);
int gitno_recv(gitno_buffer *buf);
+int gitno__recv(gitno_buffer *buf);
void gitno_consume(gitno_buffer *buf, const char *ptr);
void gitno_consume_n(gitno_buffer *buf, size_t cons);