#include "arm.h"
+/**
+ * FIXME: document.
+ */
struct ArmContext
{
+
+ /**
+ * FIXME: document.
+ */
GNUNET_ARM_Callback callback;
+
+ /**
+ * FIXME: document.
+ */
void *cls;
+
+ /**
+ * FIXME: document.
+ */
char *service_name;
+
+ /**
+ * FIXME: document.
+ */
struct GNUNET_CLIENT_Connection *client;
- struct GNUNET_CONFIGURATION_Handle *cfg;
+
+ /**
+ * FIXME: document.
+ */
+ const struct GNUNET_CONFIGURATION_Handle *cfg;
+
+ /**
+ * FIXME: document.
+ */
struct GNUNET_TIME_Absolute timeout;
+
+ /**
+ * FIXME: document.
+ */
uint16_t type;
};
+/**
+ * FIXME: document.
+ */
static void
arm_service_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
case GNUNET_MESSAGE_TYPE_ARM_IS_DOWN:
ret = GNUNET_NO;
break;
+ case GNUNET_MESSAGE_TYPE_ARM_IS_UNKNOWN:
+ ret = GNUNET_SYSERR;
+ break;
default:
GNUNET_break (0);
ret = GNUNET_SYSERR;
* @param timeout how long to wait before failing for good
* @param cb callback to invoke when service is ready
* @param cb_cls closure for callback
+ * @param type type of the request
*/
static void
change_service (const char *service_name,
- struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_SCHEDULER_Handle *sched,
struct GNUNET_TIME_Relative timeout,
GNUNET_ARM_Callback cb, void *cb_cls, uint16_t type)
*/
void
GNUNET_ARM_start_service (const char *service_name,
- struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_SCHEDULER_Handle *sched,
struct GNUNET_TIME_Relative timeout,
GNUNET_ARM_Callback cb, void *cb_cls)
*/
void
GNUNET_ARM_stop_service (const char *service_name,
- struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_SCHEDULER_Handle *sched,
struct GNUNET_TIME_Relative timeout,
GNUNET_ARM_Callback cb, void *cb_cls)