*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
-/* Called before FDs are polled to choose a timeout. We ask for a 3s
- * timeout and every 10s or so we force a dispatch. */
+/** @brief Called before FDs are polled to choose a timeout.
+ *
+ * We ask for a 3s timeout and every 10s or so we force a dispatch.
+ */
static gboolean gtkclient_prepare(GSource *source,
gint *timeout) {
const struct eclient_source *esource = (struct eclient_source *)source;
static gboolean gtkclient_prepare(GSource *source,
gint *timeout) {
const struct eclient_source *esource = (struct eclient_source *)source;
static gboolean gtkclient_check(GSource *source) {
const struct eclient_source *esource = (struct eclient_source *)source;
D(("gtkclient_check fd=%d events=%x revents=%x",
static gboolean gtkclient_check(GSource *source) {
const struct eclient_source *esource = (struct eclient_source *)source;
D(("gtkclient_check fd=%d events=%x revents=%x",
static gboolean gtkclient_dispatch(GSource *source,
GSourceFunc attribute((unused)) callback,
gpointer attribute((unused)) user_data) {
static gboolean gtkclient_dispatch(GSource *source,
GSourceFunc attribute((unused)) callback,
gpointer attribute((unused)) user_data) {
static void gtkclient_poll(void *u,
disorder_eclient attribute((unused)) *c,
int fd, unsigned mode) {
static void gtkclient_poll(void *u,
disorder_eclient attribute((unused)) *c,
int fd, unsigned mode) {
-/* Report a communication-level error. It will be automatically retried. */
+/** @brief Report a communication-level error
+ *
+ * Any operations still outstanding are automatically replied by the underlying
+ * @ref lib/eclient.c code.
+ */
static void gtkclient_comms_error(void attribute((unused)) *u,
const char *msg) {
D(("gtkclient_comms_error %s", msg));
static void gtkclient_comms_error(void attribute((unused)) *u,
const char *msg) {
D(("gtkclient_comms_error %s", msg));
-/* Report a protocol error. It will not be retried. We offer a callback to
- * the submitter of the original command and if none is supplied we pop up an
- * error box. */
+/** @brief Report a protocol-level error
+ *
+ * The error will not be retried. We offer a callback to the submitter of the
+ * original command and if none is supplied we pop up an error box.
+ */
void popup_protocol_error(int attribute((unused)) code,
const char *msg) {
gtk_label_set_text(GTK_LABEL(report_label), msg);
void popup_protocol_error(int attribute((unused)) code,
const char *msg) {
gtk_label_set_text(GTK_LABEL(report_label), msg);
static const disorder_eclient_callbacks gtkclient_callbacks = {
gtkclient_comms_error,
gtkclient_protocol_error,
static const disorder_eclient_callbacks gtkclient_callbacks = {
gtkclient_comms_error,
gtkclient_protocol_error,