Commit 336d1275 by Ben Straub

API updates for transport.h

parent f4a62c30
...@@ -45,12 +45,12 @@ typedef struct git_cred_userpass_plaintext { ...@@ -45,12 +45,12 @@ typedef struct git_cred_userpass_plaintext {
/** /**
* Creates a new plain-text username and password credential object. * Creates a new plain-text username and password credential object.
* *
* @param cred The newly created credential object. * @param out The newly created credential object.
* @param username The username of the credential. * @param username The username of the credential.
* @param password The password of the credential. * @param password The password of the credential.
*/ */
GIT_EXTERN(int) git_cred_userpass_plaintext_new( GIT_EXTERN(int) git_cred_userpass_plaintext_new(
git_cred **cred, git_cred **out,
const char *username, const char *username,
const char *password); const char *password);
...@@ -64,7 +64,7 @@ GIT_EXTERN(int) git_cred_userpass_plaintext_new( ...@@ -64,7 +64,7 @@ GIT_EXTERN(int) git_cred_userpass_plaintext_new(
typedef int (*git_cred_acquire_cb)( typedef int (*git_cred_acquire_cb)(
git_cred **cred, git_cred **cred,
const char *url, const char *url,
int allowed_types); unsigned int allowed_types);
/* /*
*** End interface for credentials acquisition *** *** End interface for credentials acquisition ***
...@@ -144,11 +144,11 @@ typedef struct git_transport { ...@@ -144,11 +144,11 @@ typedef struct git_transport {
* is scanned to find a transport that implements the scheme of the URI (i.e. * is scanned to find a transport that implements the scheme of the URI (i.e.
* git:// or http://) and a transport object is returned to the caller. * git:// or http://) and a transport object is returned to the caller.
* *
* @param transport The newly created transport (out) * @param out The newly created transport (out)
* @param url The URL to connect to * @param url The URL to connect to
* @return 0 or an error code * @return 0 or an error code
*/ */
GIT_EXTERN(int) git_transport_new(git_transport **transport, const char *url); GIT_EXTERN(int) git_transport_new(git_transport **out, const char *url);
/** /**
* Function which checks to see if a transport could be created for the * Function which checks to see if a transport could be created for the
...@@ -161,7 +161,7 @@ GIT_EXTERN(int) git_transport_new(git_transport **transport, const char *url); ...@@ -161,7 +161,7 @@ GIT_EXTERN(int) git_transport_new(git_transport **transport, const char *url);
GIT_EXTERN(int) git_transport_valid_url(const char *url); GIT_EXTERN(int) git_transport_valid_url(const char *url);
/* Signature of a function which creates a transport */ /* Signature of a function which creates a transport */
typedef int (*git_transport_cb)(git_transport **transport, void *param); typedef int (*git_transport_cb)(git_transport **out, void *payload);
/* Transports which come with libgit2 (match git_transport_cb). The expected /* Transports which come with libgit2 (match git_transport_cb). The expected
* value for "param" is listed in-line below. */ * value for "param" is listed in-line below. */
...@@ -170,34 +170,34 @@ typedef int (*git_transport_cb)(git_transport **transport, void *param); ...@@ -170,34 +170,34 @@ typedef int (*git_transport_cb)(git_transport **transport, void *param);
* Create an instance of the dummy transport. * Create an instance of the dummy transport.
* *
* @param transport The newly created transport (out) * @param transport The newly created transport (out)
* @param param You must pass NULL for this parameter. * @param payload You must pass NULL for this parameter.
* @return 0 or an error code * @return 0 or an error code
*/ */
GIT_EXTERN(int) git_transport_dummy( GIT_EXTERN(int) git_transport_dummy(
git_transport **transport, git_transport **transport,
/* NULL */ void *param); /* NULL */ void *payload);
/** /**
* Create an instance of the local transport. * Create an instance of the local transport.
* *
* @param transport The newly created transport (out) * @param transport The newly created transport (out)
* @param param You must pass NULL for this parameter. * @param payload You must pass NULL for this parameter.
* @return 0 or an error code * @return 0 or an error code
*/ */
GIT_EXTERN(int) git_transport_local( GIT_EXTERN(int) git_transport_local(
git_transport **transport, git_transport **transport,
/* NULL */ void *param); /* NULL */ void *payload);
/** /**
* Create an instance of the smart transport. * Create an instance of the smart transport.
* *
* @param transport The newly created transport (out) * @param transport The newly created transport (out)
* @param param A pointer to a git_smart_subtransport_definition * @param payload A pointer to a git_smart_subtransport_definition
* @return 0 or an error code * @return 0 or an error code
*/ */
GIT_EXTERN(int) git_transport_smart( GIT_EXTERN(int) git_transport_smart(
git_transport **transport, git_transport **transport,
/* (git_smart_subtransport_definition *) */ void *param); /* (git_smart_subtransport_definition *) */ void *payload);
/* /*
*** End of base transport interface *** *** End of base transport interface ***
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment