/* DISCONNECT */
+/**
+ * Callback called after the host or guest place disconnected.
+ */
static void
disconnected (void *cls)
{
}
+/**
+ * Callback called after the application disconnected.
+ */
static void
app_disconnected (void *cls)
{
}
+/**
+ * Disconnect from connected GNUnet services.
+ */
static void
disconnect ()
{
}
/**
- * Terminate the test case (failure).
- *
- * @param cls NULL
+ * Callback called when the program failed to finish the requested operation in time.
*/
static void
timeout (void *cls)
}
+/**
+ * Schedule exit with succes result.
+ */
static void
exit_success ()
{
}
+/**
+ * Schedule exit with failure result.
+ */
static void
exit_fail ()
{
/* LEAVE */
+/**
+ * Callback notifying about the host has left and stopped hosting the place.
+ *
+ * This also indicates the end of the connection to the service.
+ */
static void
host_left ()
{
}
+/**
+ * Leave a place permanently and stop hosting a place.
+ */
static void
host_leave ()
{
}
+/**
+ * Callback notifying about the guest has left the place.
+ *
+ * This also indicates the end of the connection to the service.
+ */
static void
guest_left (void *cls)
{
}
+/**
+ * Leave a place permanently as guest.
+ */
static void
guest_leave ()
{
struct GNUNET_PSYC_Environment *env = GNUNET_PSYC_env_create ();
- // method in the middle of vars? FIXME
GNUNET_PSYC_env_add (env, GNUNET_PSYC_OP_SET,
- "_notice_place_leave", DATA2ARG ("Leaving."));
+ "_message", DATA2ARG ("Leaving."));
GNUNET_SOCIAL_guest_leave (gst, env, guest_left, NULL);
GNUNET_PSYC_env_destroy (env);
gst = NULL;
} tmit;
+/**
+ * Callback notifying about available buffer space to write message data
+ * when transmitting messages using host_announce() or guest_talk()
+ */
static int
notify_data (void *cls, uint16_t *data_size, void *data)
{
}
+/**
+ * Host announcement - send a message to the place.
+ */
static void
host_announce (const char *method, const char *data, size_t data_size)
{
GNUNET_SOCIAL_ANNOUNCE_NONE);
}
+
+/**
+ * Assign a state var of @a name to the value of @a data.
+ */
static void
host_assign (const char *name, const char *data, size_t data_size)
{
}
+/**
+ * Guest talk request to host.
+ */
static void
guest_talk (const char *method,
const char *data, size_t data_size)
/* HISTORY REPLAY */
+/**
+ * Callback notifying about the end of history replay results.
+ */
static void
recv_history_replay_result (void *cls, int64_t result,
const void *data, uint16_t data_size)
}
+/**
+ * Replay history between a given @a start and @a end message IDs,
+ * optionally filtered by a method @a prefix.
+ */
static void
history_replay (uint64_t start, uint64_t end, const char *prefix)
{
}
+/**
+ * Replay latest @a limit messages.
+ */
static void
history_replay_latest (uint64_t limit, const char *prefix)
{
/* LOOK AT/FOR */
+/**
+ * Callback notifying about the end of state var results.
+ */
static void
look_result (void *cls, int64_t result_code,
const void *data, uint16_t data_size)
}
+/**
+ * Callback notifying about a state var result.
+ */
static void
look_var (void *cls,
const struct GNUNET_MessageHeader *mod,
uint32_t full_value_size)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "look_at_var: %s\n%.*s\n",
+ "Received var: %s\n%.*s\n",
name, value_size, (const char *) value);
}
+/**
+ * Look for a state var using exact match of the name.
+ */
static void
-look_at (const char *name)
+look_at (const char *full_name)
{
- GNUNET_SOCIAL_place_look_at (plc, name, look_var, look_result, NULL);
+ GNUNET_SOCIAL_place_look_at (plc, full_name, look_var, look_result, NULL);
}
+/**
+ * Look for state vars by name prefix.
+ */
static void
-look_for (const char *name)
+look_for (const char *name_prefix)
{
- GNUNET_SOCIAL_place_look_for (plc, name, look_var, look_result, NULL);
+ GNUNET_SOCIAL_place_look_for (plc, name_prefix, look_var, look_result, NULL);
}
/* SLICER */
+/**
+ * Callback notifying about the start of a new incoming message.
+ */
static void
slicer_recv_method (void *cls,
const struct GNUNET_PSYC_MessageHeader *msg,
}
+/**
+ * Callback notifying about an incoming modifier.
+ */
static void
slicer_recv_modifier (void *cls,
const struct GNUNET_PSYC_MessageHeader *msg,
}
+/**
+ * Callback notifying about an incoming data fragment.
+ */
static void
slicer_recv_data (void *cls,
const struct GNUNET_PSYC_MessageHeader *msg,
}
+/**
+ * Callback notifying about the end of a message.
+ */
static void
slicer_recv_eom (void *cls,
const struct GNUNET_PSYC_MessageHeader *msg,
}
+/**
+ * Create a slicer for receiving message parts.
+ */
static struct GNUNET_PSYC_Slicer *
slicer_create ()
{
/* GUEST ENTER */
+/**
+ * Callback called when the guest receives an entry decision from the host.
+ *
+ * It is called once after using guest_enter() or guest_enter_by_name(),
+ * in case of a reconnection only the local enter callback is called.
+ */
static void
guest_recv_entry_decision (void *cls,
int is_admitted,
}
+/**
+ * Callback called after a guest connection is established to the local service.
+ */
static void
guest_recv_local_enter (void *cls, int result,
const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key,
}
+/**
+ * Create entry requset message.
+ */
static struct GNUNET_PSYC_Message *
guest_enter_msg_create ()
{
}
+/**
+ * Enter a place as guest, using its public key and peer ID.
+ */
static void
guest_enter (const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key,
const struct GNUNET_PeerIdentity *peer)
}
+/**
+ * Enter a place as guest using its GNS address.
+ */
static void
guest_enter_by_name (const char *gns_name)
{
/* HOST ENTER */
+/**
+ * Callback called when a @a nym wants to enter the place.
+ *
+ * The request needs to be replied with an entry decision.
+ */
static void
host_answer_door (void *cls,
struct GNUNET_SOCIAL_Nym *nym,
}
+/**
+ * Callback called when a @a nym has left the place.
+ */
static void
host_farewell (void *cls,
const struct GNUNET_SOCIAL_Nym *nym,
}
+/**
+ * Callback called after the host entered the place.
+ */
static void
host_entered (void *cls, int result,
const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key,
}
+/**
+ * Enter and start hosting a place.
+ */
static void
host_enter ()
{
/* PLACE RECONNECT */
+/**
+ * Perform operations common to both host & guest places.
+ */
static void
place_reconnected ()
{
}
+/**
+ * Callback called after reconnecting to a host place.
+ */
static void
host_reconnected (void *cls, int result,
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
}
+/**
+ * Callback called after reconnecting to a guest place.
+ */
static void
guest_reconnected (void *cls, int result,
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
/* APP */
+/**
+ * Callback called after the ego and place callbacks.
+ */
static void
app_connected (void *cls)
{
}
+/**
+ * Callback notifying about a host place available for reconnection.
+ */
static void
app_recv_host (void *cls,
struct GNUNET_SOCIAL_HostConnection *hconn,
}
+/**
+ * Callback notifying about a guest place available for reconnection.
+ */
static void
app_recv_guest (void *cls,
struct GNUNET_SOCIAL_GuestConnection *gconn,
}
+/**
+ * Callback notifying about an available ego.
+ */
static void
app_recv_ego (void *cls,
struct GNUNET_SOCIAL_Ego *e,
}
+
+/**
+ * Establish application connection to receive available egos and places.
+ */
static void
app_connect ()
{