summaryrefslogtreecommitdiff
path: root/include/git2/sys
diff options
context:
space:
mode:
authorLeo Yang <lyang@topologyinc.com>2015-03-17 12:49:33 -0400
committerLeo Yang <lyang@topologyinc.com>2015-03-18 13:15:21 -0400
commit142e5379ca850b718c9775cab5e30504503defd0 (patch)
treeb8f461dcdfce90cda06b57276a3706f4b1cfc035 /include/git2/sys
parentbdf0e734506b5b18234d48a0e7c6995aeda30b9d (diff)
downloadlibgit2-142e5379ca850b718c9775cab5e30504503defd0.tar.gz
Add a custom param to git_smart_subtransport_definition
The smart transport has already take the payload param. For the sub transport a payload param is useful for the implementer.
Diffstat (limited to 'include/git2/sys')
-rw-r--r--include/git2/sys/transport.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/git2/sys/transport.h b/include/git2/sys/transport.h
index 69d4e15c5..2cb1a97eb 100644
--- a/include/git2/sys/transport.h
+++ b/include/git2/sys/transport.h
@@ -289,7 +289,8 @@ struct git_smart_subtransport {
/* A function which creates a new subtransport for the smart transport */
typedef int (*git_smart_subtransport_cb)(
git_smart_subtransport **out,
- git_transport* owner);
+ git_transport* owner,
+ void* param);
/**
* Definition for a "subtransport"
@@ -306,6 +307,10 @@ typedef struct git_smart_subtransport_definition {
* http:// is stateless, but git:// is not.
*/
unsigned rpc;
+
+ /** Param of the callback
+ */
+ void* param;
} git_smart_subtransport_definition;
/* Smart transport subtransports that come with libgit2 */
@@ -321,7 +326,8 @@ typedef struct git_smart_subtransport_definition {
*/
GIT_EXTERN(int) git_smart_subtransport_http(
git_smart_subtransport **out,
- git_transport* owner);
+ git_transport* owner,
+ void *param);
/**
* Create an instance of the git subtransport.
@@ -332,7 +338,8 @@ GIT_EXTERN(int) git_smart_subtransport_http(
*/
GIT_EXTERN(int) git_smart_subtransport_git(
git_smart_subtransport **out,
- git_transport* owner);
+ git_transport* owner,
+ void *param);
/**
* Create an instance of the ssh subtransport.
@@ -343,7 +350,8 @@ GIT_EXTERN(int) git_smart_subtransport_git(
*/
GIT_EXTERN(int) git_smart_subtransport_ssh(
git_smart_subtransport **out,
- git_transport* owner);
+ git_transport* owner,
+ void *param);
/**
* Sets a custom transport factory for the remote. The caller can use this