Ring Daemon 16.0.0
|
Go to the source code of this file.
Functions | |
int | generateRequest (git_buf *request, const std::string &cmd, const std::string_view &url) |
int | p2p_subtransport_cb (git_smart_subtransport **out, git_transport *owner, void *payload) |
Setup the subtransport callback. | |
int | p2p_transport_cb (git_transport **out, git_remote *owner, void *) |
Setup the transport callback. | |
void | P2PStreamFree (git_smart_subtransport_stream *) |
Free resources used by the stream. | |
int | P2PStreamRead (git_smart_subtransport_stream *stream, char *buffer, size_t buflen, size_t *read) |
Read on a channel socket. | |
int | P2PStreamWrite (git_smart_subtransport_stream *stream, const char *buffer, size_t len) |
int | P2PSubTransportAction (git_smart_subtransport_stream **out, git_smart_subtransport *transport, const char *url, git_smart_service_t action) |
Handles git actions. | |
int | P2PSubTransportClose (git_smart_subtransport *) |
Close a subtransport Because we use a channel socket, we need to do nothing here. | |
void | P2PSubTransportFree (git_smart_subtransport *transport) |
Free resources used by a transport. | |
int | P2PSubTransportNew (P2PSubTransport **out, git_transport *, void *payload) |
Create a new subtransport. | |
int | sendCmd (P2PStream *s) |
Send a git command on the linked socket. | |
int generateRequest | ( | git_buf * | request, |
const std::string & | cmd, | ||
const std::string_view & | url | ||
) |
int p2p_subtransport_cb | ( | git_smart_subtransport ** | out, |
git_transport * | owner, | ||
void * | payload | ||
) |
Setup the subtransport callback.
out | Subtransport created |
owner | Transport owning the sub transport |
param | The remote |
0 | on success |
Definition at line 238 of file gittransport.cpp.
References P2PSubTransport::base, and P2PSubTransportNew().
Referenced by p2p_transport_cb().
int p2p_transport_cb | ( | git_transport ** | out, |
git_remote * | owner, | ||
void * | param | ||
) |
Setup the transport callback.
out | Transport created |
owner | Remote wanted |
0 | on success |
Definition at line 250 of file gittransport.cpp.
References p2p_subtransport_cb().
Referenced by jami::Manager::init().
void P2PStreamFree | ( | git_smart_subtransport_stream * | stream | ) |
Free resources used by the stream.
Definition at line 135 of file gittransport.cpp.
Referenced by P2PSubTransportAction().
int P2PStreamRead | ( | git_smart_subtransport_stream * | stream, |
char * | buffer, | ||
size_t | buflen, | ||
size_t * | read | ||
) |
Read on a channel socket.
stream | Related stream |
buffer | Buffer to fill |
buflen | Maximum buffer size |
read | Number of bytes read |
Definition at line 91 of file gittransport.cpp.
References sendCmd(), and P2PStream::socket.
Referenced by P2PSubTransportAction().
int P2PStreamWrite | ( | git_smart_subtransport_stream * | stream, |
const char * | buffer, | ||
size_t | len | ||
) |
Definition at line 117 of file gittransport.cpp.
References P2PStream::socket.
Referenced by P2PSubTransportAction().
int P2PSubTransportAction | ( | git_smart_subtransport_stream ** | out, |
git_smart_subtransport * | transport, | ||
const char * | url, | ||
git_smart_service_t | action | ||
) |
Handles git actions.
out | Subtransport's stream created or used by the action |
transport | Subtransport created or used by the action |
url | 'deviceId/conversationId' |
action | Action to perform |
Definition at line 139 of file gittransport.cpp.
References jami::Manager::gitSocket(), jami::Manager::instance(), JAMI_ERROR, P2PStreamFree(), P2PStreamRead(), P2PStreamWrite(), and UPLOAD_PACK_CMD.
Referenced by P2PSubTransportNew().
int P2PSubTransportClose | ( | git_smart_subtransport * | ) |
Close a subtransport Because we use a channel socket, we need to do nothing here.
Will be shutdown by the rest of the code
Definition at line 212 of file gittransport.cpp.
Referenced by P2PSubTransportNew().
void P2PSubTransportFree | ( | git_smart_subtransport * | transport | ) |
Free resources used by a transport.
transport | Transport to free |
Definition at line 218 of file gittransport.cpp.
References jami::Manager::eraseGitTransport(), and jami::Manager::instance().
Referenced by P2PSubTransportNew().
int P2PSubTransportNew | ( | P2PSubTransport ** | out, |
git_transport * | owner, | ||
void * | payload | ||
) |
Create a new subtransport.
out | The new subtransport |
owner | The transport owning this subtransport |
payload | The remote |
Definition at line 224 of file gittransport.cpp.
References jami::Manager::insertGitTransport(), jami::Manager::instance(), P2PSubTransportAction(), P2PSubTransportClose(), and P2PSubTransportFree().
Referenced by p2p_subtransport_cb().
int sendCmd | ( | P2PStream * | s | ) |
Send a git command on the linked socket.
s | Related stream |
Definition at line 64 of file gittransport.cpp.
References P2PStream::cmd, generateRequest(), P2PStream::sent_command, P2PStream::socket, and P2PStream::url.
Referenced by P2PStreamRead().