-bringing copyright tags up to FSF standard
[oweals/gnunet.git] / src / conversation / gnunet-conversation-test.c
index 1f44ca1fc34b02c6208c8cfc7f4bf7bb4d62968f..08f09be29da296492c58c423706e0de6cdfc6cae 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2013 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
@@ -25,8 +25,8 @@
  */
 #include "platform.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_speaker_lib.h" 
-#include "gnunet_microphone_lib.h" 
+#include "gnunet_speaker_lib.h"
+#include "gnunet_microphone_lib.h"
 
 /**
  * How long do we record before we replay?
@@ -74,12 +74,12 @@ static struct GNUNET_SPEAKER_Handle *speaker;
 /**
  * Task scheduled to switch from recording to playback.
  */
-static GNUNET_SCHEDULER_TaskIdentifier switch_task;
+static struct GNUNET_SCHEDULER_Task * switch_task;
 
 /**
  * The shutdown task.
  */
-static GNUNET_SCHEDULER_TaskIdentifier st;
+static struct GNUNET_SCHEDULER_Task * st;
 
 /**
  * Head of DLL with recorded frames.
@@ -104,7 +104,7 @@ do_shutdown (void *cls,
 {
   struct Recording *rec;
 
-  if (GNUNET_SCHEDULER_NO_TASK != switch_task)
+  if (NULL != switch_task)
     GNUNET_SCHEDULER_cancel (switch_task);
   if (NULL != microphone)
     GNUNET_MICROPHONE_destroy (microphone);
@@ -117,7 +117,7 @@ do_shutdown (void *cls,
                                 rec);
     GNUNET_free (rec);
   }
-  fprintf (stderr, 
+  fprintf (stderr,
           _("\nEnd of transmission.  Have a GNU day.\n"));
 }
 
@@ -134,7 +134,7 @@ switch_to_speaker (void *cls,
 {
   struct Recording *rec;
 
-  switch_task = GNUNET_SCHEDULER_NO_TASK;
+  switch_task = NULL;
   microphone->disable_microphone (microphone->cls);
   if (GNUNET_OK !=
       speaker->enable_speaker (speaker->cls))
@@ -145,7 +145,7 @@ switch_to_speaker (void *cls,
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
-  fprintf (stderr, 
+  fprintf (stderr,
           _("\nWe are now playing your recording back.  If you can hear it, your audio settings are working..."));
   for (rec=rec_head; NULL != rec; rec = rec->next)
   {
@@ -170,7 +170,7 @@ switch_to_speaker (void *cls,
  * @param data_size number of bytes in @a data
  * @param data audio data to play
  */
-static void 
+static void
 record (void *cls,
        size_t data_size,
        const void *data)
@@ -211,7 +211,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   st = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
                                     &do_shutdown,
                                     NULL);
-  fprintf (stderr, 
+  fprintf (stderr,
           _("We will now be recording you for %s. After that time, the recording will be played back to you..."),
           GNUNET_STRINGS_relative_time_to_string (TIMEOUT, GNUNET_YES));
   if (GNUNET_OK !=