convenience functions for accessing services More...
#include "platform.h"
#include "testbed_api.h"
#include "testbed_api_peers.h"
#include "testbed_api_operations.h"
Go to the source code of this file.
Data Structures | |
struct | ServiceConnectData |
Data accessed during service connections. More... | |
Enumerations | |
enum | State { STATE_INIT = 0 , STATE_SLAVES_STARTING , STATE_PEERS_CREATING , STATE_PEERS_STARTING , STATE_PEERS_LINKING , STATE_SEARCH_REGEX , STATE_PEERS_DESTROYING , INIT , CFG_REQUEST_QUEUED , SERVICE_CONNECTED , RC_INIT = 0 , RC_LINKED , RC_PEERS_CREATED , RC_READY , RC_PEERS_SHUTDOWN } |
States for Service connect operations. More... | |
Functions | |
static void | configuration_receiver (void *cls, const struct GNUNET_MessageHeader *msg) |
Type of a function to call when we receive a message from the service. More... | |
static void | opstart_service_connect (void *cls) |
Function called when a service connect operation is ready. More... | |
static void | oprelease_service_connect (void *cls) |
Callback which will be called when service connect type operation is released. More... | |
struct GNUNET_TESTBED_Operation * | GNUNET_TESTBED_service_connect (void *op_cls, struct GNUNET_TESTBED_Peer *peer, const char *service_name, GNUNET_TESTBED_ServiceConnectCompletionCallback cb, void *cb_cls, GNUNET_TESTBED_ConnectAdapter ca, GNUNET_TESTBED_DisconnectAdapter da, void *cada_cls) |
Connect to a service offered by the given peer. More... | |
convenience functions for accessing services
Definition in file testbed_api_services.c.
enum State |
States for Service connect operations.
Definition at line 35 of file testbed_api_services.c.
|
static |
Type of a function to call when we receive a message from the service.
cls | ServiceConnectData |
msg | message received, NULL on timeout or fatal error |
Definition at line 134 of file testbed_api_services.c.
References GNUNET_TESTBED_Controller::cc, GNUNET_TESTBED_Controller::cc_cls, data, GNUNET_TESTBED_EventInformation::emsg, GNUNET_TESTBED_Controller::event_mask, GNUNET_assert, GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT, GNUNET_TESTBED_ET_OPERATION_FINISHED, GNUNET_TESTBED_extract_config_(), GNUNET_TESTBED_parse_error_string_(), info, msg, SERVICE_CONNECTED, and GNUNET_MessageHeader::type.
Referenced by opstart_service_connect().
|
static |
Function called when a service connect operation is ready.
cls | the closure from GNUNET_TESTBED_operation_create_() |
Definition at line 182 of file testbed_api_services.c.
References CFG_REQUEST_QUEUED, configuration_receiver(), data, GNUNET_assert, GNUNET_free, GNUNET_TESTBED_forward_operation_msg_(), GNUNET_TESTBED_generate_peergetconfig_msg_(), GNUNET_TESTBED_get_next_op_id(), and msg.
Referenced by GNUNET_TESTBED_service_connect().
|
static |
Callback which will be called when service connect type operation is released.
cls | the closure from GNUNET_TESTBED_operation_create_() |
Definition at line 210 of file testbed_api_services.c.
References CFG_REQUEST_QUEUED, data, GNUNET_assert, GNUNET_CONFIGURATION_destroy(), GNUNET_free, GNUNET_TESTBED_forward_operation_msg_cancel_(), INIT, and SERVICE_CONNECTED.
Referenced by GNUNET_TESTBED_service_connect().