gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r14764 - gnunet/src/include


From: gnunet
Subject: [GNUnet-SVN] r14764 - gnunet/src/include
Date: Tue, 29 Mar 2011 13:50:08 +0200

Author: grothoff
Date: 2011-03-29 13:50:08 +0200 (Tue, 29 Mar 2011)
New Revision: 14764

Added:
   gnunet/src/include/gnunet_applications.h
Modified:
   gnunet/src/include/Makefile.am
   gnunet/src/include/gnunet_mesh_service.h
Log:
ideas

Modified: gnunet/src/include/Makefile.am
===================================================================
--- gnunet/src/include/Makefile.am      2011-03-29 10:59:21 UTC (rev 14763)
+++ gnunet/src/include/Makefile.am      2011-03-29 11:50:08 UTC (rev 14764)
@@ -17,6 +17,7 @@
   $(WINPROC) \
   block_dns.h \
   block_fs.h \
+  gnunet_applications.h \
   gnunet_arm_service.h \
   gnunet_bandwidth_lib.h \
   gnunet_bio_lib.h \

Added: gnunet/src/include/gnunet_applications.h
===================================================================
--- gnunet/src/include/gnunet_applications.h                            (rev 0)
+++ gnunet/src/include/gnunet_applications.h    2011-03-29 11:50:08 UTC (rev 
14764)
@@ -0,0 +1,83 @@
+/*
+     This file is part of GNUnet.
+     (C) 2011 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
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file include/gnunet_applications.h
+ * @brief constants for network applications operating on top of the MESH 
service
+ * @author Christian Grothoff
+ */
+
+#ifndef GNUNET_APPLICATIONS_H
+#define GNUNET_APPLICATIONS_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#if 0                           /* keep Emacsens' auto-indent happy */
+}
+#endif
+#endif
+
+/**
+ * Test.
+ */
+#define GNUNET_APPLICATION_TYPE_TEST 1
+
+/**
+ * Internet DNS resolution (external DNS gateway).
+ */
+#define GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER 2
+
+/**
+ * Internet HTTP gateway (port 80).
+ */
+#define GNUNET_APPLICATION_TYPE_INTERNET_HTTP_GATEWAY 3
+
+/**
+ * Internet HTTPS gateway (port 443).
+ */
+#define GNUNET_APPLICATION_TYPE_INTERNET_HTTPS_GATEWAY 4
+
+/**
+ * Internet TCP gateway (any port).
+ */
+#define GNUNET_APPLICATION_TYPE_INTERNET_TCP_GATEWAY 5
+
+/**
+ * Internet UDP gateway (any port).
+ */
+#define GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY 6
+
+/**
+ * GNUnet VPN Search Engine (searches HTTP sites hosted within GNUnet) 
[example]
+ */
+#define GNUNET_APPLICATION_TYPE_GNUNET_SEARCH 7
+
+
+#if 0                           /* keep Emacsens' auto-indent happy */
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+/* ifndef GNUNET_APPLICATIONS_H */
+#endif
+/* end of gnunet_applications.h */

Modified: gnunet/src/include/gnunet_mesh_service.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service.h    2011-03-29 10:59:21 UTC (rev 
14763)
+++ gnunet/src/include/gnunet_mesh_service.h    2011-03-29 11:50:08 UTC (rev 
14764)
@@ -116,6 +116,12 @@
 
 
 /**
+ * Type for an application.  Values defined in gnunet_applications.h
+ */
+typedef uint32_t GNUNET_MESH_ApplicationType;
+
+
+/**
  * Connect to the mesh service.
  *
  * @param cfg configuration to use
@@ -132,9 +138,9 @@
 GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
                      void *cls,
                     GNUNET_MESH_TunnelEndHandler cleaner,
-                     const struct GNUNET_MESH_MessageHandler *handlers);
+                     const struct GNUNET_MESH_MessageHandler *handlers, 
+                    const GNUNET_MESH_ServiceType *stypes);
 
-
 /**
  * Get the peer on the other side of this tunnel if it is just one. Return 
NULL otherwise
  * 
@@ -268,7 +274,7 @@
  *
  * @param h mesh handle
  * @param timeout how long to try to establish a connection
- * @param message_type message type that must be supported by the peer (MESH 
should
+ * @param app_type application type that must be supported by the peer (MESH 
should
  *                discover peer in proximity handling this type)
  * @param connect_handler function to call on successful connect (or timeout);
  *                will be called for EACH of the peers in the list and
@@ -282,7 +288,7 @@
 struct GNUNET_MESH_Tunnel *
 GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *h,
                                          struct GNUNET_TIME_Relative timeout,
-                                         uint16_t message_type,
+                                         GNUNET_MESH_ApplicationType app_type,
                                          GNUNET_MESH_TunnelConnectHandler 
connect_handler,
                                          GNUNET_MESH_TunnelDisconnectHandler 
disconnect_handler,
                                          void *handler_cls);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]