adding number of preferences to allow iterating over preferences
[oweals/gnunet.git] / src / include / gnunet_lockmanager_service.h
index 6f63fd529f15cb00493529053cebd247619089a1..c25c9cc9fee89016cb5954f4e914e8497dc39fd4 100644 (file)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2012 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -35,6 +35,8 @@ extern "C"
 #endif
 #endif
 
+#include "gnunet_configuration_lib.h"
+
 /**
  * Opaque handle for the lockmanager service
  */
@@ -85,18 +87,19 @@ enum GNUNET_LOCKMANAGER_Status
  *
  * @param cls the closure from GNUNET_LOCKMANAGER_lock call
  *
- * @param domain_name the locking domain of the lock 
+ * @param domain_name the locking domain of the lock
  *
  * @param lock the lock for which this status is relevant
  *
  * @param status GNUNET_LOCKMANAGER_SUCCESS if the lock has been successfully
- *          acquired; GNUNET_LOCKMANAGER_RELEASE when the acquired lock is lost
+ *          acquired; GNUNET_LOCKMANAGER_RELEASE when the acquired lock is
+ *          lost.
  */
-typedef void 
+typedef void
 (*GNUNET_LOCKMANAGER_StatusCallback) (void *cls,
                                       const char *domain_name,
                                       uint32_t lock,
-                                      enum GNUNET_LOCKMANAGER_Status 
+                                      enum GNUNET_LOCKMANAGER_Status
                                       status);
 
 
@@ -127,8 +130,7 @@ struct GNUNET_LOCKMANAGER_LockingRequest;
  *
  * @param status_cb_cls the closure to the above callback
  *
- * @return the locking request handle for this request. It will be invalidated
- *           when status_cb is called.
+ * @return the locking request handle for this request
  */
 struct GNUNET_LOCKMANAGER_LockingRequest *
 GNUNET_LOCKMANAGER_acquire_lock (struct GNUNET_LOCKMANAGER_Handle *handle,
@@ -141,8 +143,8 @@ GNUNET_LOCKMANAGER_acquire_lock (struct GNUNET_LOCKMANAGER_Handle *handle,
 
 /**
  * Function to cancel the locking request generated by
- * GNUNET_LOCKMANAGER_acquire_lock. If the lock is acquired us then the lock is
- * released. GNUNET_LOCKMANAGER_StatusCallback will not be called upon any
+ * GNUNET_LOCKMANAGER_acquire_lock. If the lock is acquired by us then the lock
+ * is released. GNUNET_LOCKMANAGER_StatusCallback will not be called upon any
  * status changes resulting due to this call.
  *
  * @param request the LockingRequest to cancel