hxing
[oweals/gnunet.git] / src / core / gnunet-service-core_typemap.h
index 4bbd6eb29b83e7e00e67a09f24a3c1a70e63c994..10c614a852018c7e75647ff8c6d48454521210ad 100644 (file)
@@ -1,4 +1,4 @@
-*
+/*
      This file is part of GNUnet.
      (C) 2011 Christian Grothoff (and other contributing authors)
 
 
 #include "gnunet_util_lib.h"
 #include "gnunet_transport_service.h"
-#include "gnunet_service_core.h"
+
+/**
+ * Map specifying which message types a peer supports.
+ */
+struct GSC_TypeMap;
 
 
 /**
@@ -47,6 +51,15 @@ GSC_TYPEMAP_remove (const uint16_t *types,
                    unsigned int tlen);
 
 
+/**
+ * Compute a type map message for this peer.
+ *
+ * @return this peers current type map message.
+ */
+struct GNUNET_MessageHeader *
+GSC_TYPEMAP_compute_type_map_message (void);
+
+
 /**
  * Test if any of the types from the types array is in the
  * given type map.
@@ -57,10 +70,23 @@ GSC_TYPEMAP_remove (const uint16_t *types,
  * @return GNUNET_YES if a type is in the map, GNUNET_NO if not
  */ 
 int
-GSC_TYPEMAP_test_match (struct GSC_TypeMap *tmap,
+GSC_TYPEMAP_test_match (const struct GSC_TypeMap *tmap,
                        const uint16_t *types,
                        unsigned int tcnt);
 
 
+/**
+ * Initialize typemap subsystem.
+ */
+void
+GSC_TYPEMAP_init (void);
+
+
+/**
+ * Shutdown typemap subsystem.
+ */
+void
+GSC_TYPEMAP_done (void);
+
 #endif
 /* end of gnunet-service-core_typemap.h */