~ubuntu-branches/ubuntu/trusty/gnunet/trusty

« back to all changes in this revision

Viewing changes to src/applications/fs/fsui/fsui-loader.c

  • Committer: Package Import Robot
  • Author(s): Bertrand Marc
  • Date: 2012-05-06 00:28:20 UTC
  • mfrom: (1.2.17)
  • Revision ID: package-import@ubuntu.com-20120506002820-n02u1ginv8pjh0ee
Tags: 0.9.2-1
* New maintainer (Closes: #660438).
* New upstream release (Closes: #621645).
* Remove debian/patches, not necessary any more.
* Update dependencies, according to README:
  + update minimal versions. 
  + depends on libunistring-dev.
  + depends on libltdl-dev instead of libltdl3-dev.
  + no need to depend on libgtk anymore.
  + gnunet-server suggests miniupnpc.
* debian/rules:
  + no need to define LOGFILE and PIDFILE.
  + create a minimal conf file.
  + cut gnunet-download-manager.scm extension.
  + remove autogenerated files in clean.
* Gnunet is now released under the GPL v3.
* Standards version 3.9.3.
* Add debian/watch.
* Adding Italian debconf translations, thanks to Beatrice Torracca
  (Closes: #663432).
* Move to dh-autoreconf and add extend-diff-ignore in debian/source/options.
* Remove gnunet-tools since gnunet-setup is not part of gnunet anymore
  (Closes:#651192).
* gnunet-server.init:
  + several services are now supervised by gnunet-service-arm.
  + define the logfile at run time.
* Use a secured group gnunetdns for SUID binaries and change permissions
  accordingly, see https://gnunet.org/gnunet-access-control-model
* gnunet-server.postinst, gnunet-server.postrm: use dpkg-statoverride to set
  and remove setuid permissions.
* Remove properly the old incompatible /etc/gnunetd.conf, use
  /etc/gnunet.conf instead.
* Add minimal (generic) man pages when information is available.
* Remove dpkg options for compression.
* gnunet-server.docs: add README.mysql and README.postgres.
* debian/rules: remove template binaries after dh_install.
* debian/copyright:
  + use copyright format 1.0.
  + mention AUTHORS and translators.
  + use GPL-3+ when possible.
  + add a paragraph for two files distributed under MIT/X11.
* Use dh_installdocs --link-doc to avoid redundancy.
* Remove unused debian/gnunet-dev.lintian-overrides.
* debian/control: add Vcs-git and Vcs-browser fields.
* gnunet-server.postrm:
  + use debconf to determine which user and group to delete.
  + remove /var/lib/gnunet on purge.
  + remove /etc/default/gnunet-server on purge (Closes: #668766).
* Make gnunet-dbg dependencies alternatives as it provides debugging
  symbol for all of them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
     This file is part of GNUnet.
3
 
     (C) 2006 Christian Grothoff (and other contributing authors)
4
 
 
5
 
     GNUnet is free software; you can redistribute it and/or modify
6
 
     it under the terms of the GNU General Public License as published
7
 
     by the Free Software Foundation; either version 2, or (at your
8
 
     option) any later version.
9
 
 
10
 
     GNUnet is distributed in the hope that it will be useful, but
11
 
     WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
     General Public License for more details.
14
 
 
15
 
     You should have received a copy of the GNU General Public License
16
 
     along with GNUnet; see the file COPYING.  If not, write to the
17
 
     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
 
     Boston, MA 02111-1307, USA.
19
 
*/
20
 
 
21
 
/**
22
 
 * @file applications/fs/fsui/fsui-loader.c
23
 
 * @brief little program to just load and unload an FSUI file
24
 
 * @author Christian Grothoff
25
 
 */
26
 
 
27
 
#include "platform.h"
28
 
#include "gnunet_fsui_lib.h"
29
 
#include "gnunet_util.h"
30
 
 
31
 
static void *
32
 
eventCallback (void *cls, const GNUNET_FSUI_Event * event)
33
 
{
34
 
#if 0
35
 
  switch (event->type)
36
 
    {
37
 
    case GNUNET_FSUI_search_result:
38
 
      printf ("Received search result\n");
39
 
      break;
40
 
    case GNUNET_FSUI_upload_complete:
41
 
      printf ("Upload complete.\n");
42
 
      break;
43
 
    case GNUNET_FSUI_download_complete:
44
 
      printf ("Download complete.\n");
45
 
      break;
46
 
    case GNUNET_FSUI_unindex_complete:
47
 
      printf ("Unindex complete.\n");
48
 
      break;
49
 
    default:
50
 
      printf ("Other event.\n");
51
 
      break;
52
 
    }
53
 
#endif
54
 
  return NULL;
55
 
}
56
 
 
57
 
int
58
 
main (int argc, char *argv[])
59
 
{
60
 
  struct GNUNET_FSUI_Context *ctx;
61
 
  struct GNUNET_GC_Configuration *cfg;
62
 
 
63
 
  GNUNET_os_init (NULL);
64
 
  cfg = GNUNET_GC_create ();
65
 
  if (argc != 2)
66
 
    {
67
 
      fprintf (stderr, "Call with name of FSUI resource file!\n");
68
 
      return -1;
69
 
    }
70
 
  ctx =
71
 
    GNUNET_FSUI_start (NULL, cfg, argv[1], 16, GNUNET_YES, &eventCallback,
72
 
                       NULL);
73
 
  if (ctx != NULL)
74
 
    GNUNET_FSUI_stop (ctx);
75
 
  else
76
 
    fprintf (stderr, "GNUNET_FSUI_start failed!\n");
77
 
  GNUNET_GC_free (cfg);
78
 
  return (ctx == NULL);
79
 
}