redundant
[oweals/gnunet.git] / src / arm / arm_api.c
index c5bb15fd3c01d4f5eea6f640885a2360a4a35306..e5071c4dcf61b531e9b10193aed0706dc0c9fb2a 100644 (file)
 #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)
 {
@@ -129,6 +163,9 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg)
     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;
@@ -189,10 +226,11 @@ send_service_msg (void *cls, size_t size, void *buf)
  * @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)
@@ -263,7 +301,7 @@ change_service (const char *service_name,
  */
 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)
@@ -305,7 +343,7 @@ GNUNET_ARM_start_service (const char *service_name,
  */
 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)