diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-04-23 09:27:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-04-23 09:27:40 +0000 |
commit | 3b94e08fe7391f9226184c1eb070628360354de6 (patch) | |
tree | 0bb197bb0687ae0e8ba93fe72c2be7dad2e6bc5d /src/core/gnunet-service-core_typemap.h | |
parent | af2be4b67840bf58b0db47dfa2a9310a0a4c6429 (diff) | |
download | gnunet-3b94e08fe7391f9226184c1eb070628360354de6.tar.gz gnunet-3b94e08fe7391f9226184c1eb070628360354de6.zip |
-comments
Diffstat (limited to 'src/core/gnunet-service-core_typemap.h')
-rw-r--r-- | src/core/gnunet-service-core_typemap.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/core/gnunet-service-core_typemap.h b/src/core/gnunet-service-core_typemap.h index aee4573b6..7572d39db 100644 --- a/src/core/gnunet-service-core_typemap.h +++ b/src/core/gnunet-service-core_typemap.h | |||
@@ -37,16 +37,24 @@ struct GSC_TypeMap; | |||
37 | 37 | ||
38 | /** | 38 | /** |
39 | * Add a set of types to our type map. | 39 | * Add a set of types to our type map. |
40 | * | ||
41 | * @param types array of message types supported by this peer | ||
42 | * @param tlen number of entries in @a types | ||
40 | */ | 43 | */ |
41 | void | 44 | void |
42 | GSC_TYPEMAP_add (const uint16_t * types, unsigned int tlen); | 45 | GSC_TYPEMAP_add (const uint16_t *types, |
46 | unsigned int tlen); | ||
43 | 47 | ||
44 | 48 | ||
45 | /** | 49 | /** |
46 | * Remove a set of types from our type map. | 50 | * Remove a set of message types from our type map. |
51 | * | ||
52 | * @param types array of message types no longer supported by this peer | ||
53 | * @param tlen number of entries in @a types | ||
47 | */ | 54 | */ |
48 | void | 55 | void |
49 | GSC_TYPEMAP_remove (const uint16_t * types, unsigned int tlen); | 56 | GSC_TYPEMAP_remove (const uint16_t *types, |
57 | unsigned int tlen); | ||
50 | 58 | ||
51 | 59 | ||
52 | /** | 60 | /** |
@@ -59,7 +67,9 @@ GSC_TYPEMAP_compute_type_map_message (void); | |||
59 | 67 | ||
60 | 68 | ||
61 | /** | 69 | /** |
62 | * Extract a type map from a TYPE_MAP message. | 70 | * Extract a type map from a |
71 | * #GNUNET_MESSAGE_TYPE_CORE_COMRESSED_TYPE_MAP or | ||
72 | * #GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP message. | ||
63 | * | 73 | * |
64 | * @param msg a type map message | 74 | * @param msg a type map message |
65 | * @return NULL on error | 75 | * @return NULL on error |
@@ -74,11 +84,12 @@ GSC_TYPEMAP_get_from_message (const struct GNUNET_MessageHeader *msg); | |||
74 | * | 84 | * |
75 | * @param tmap map to test | 85 | * @param tmap map to test |
76 | * @param types array of types | 86 | * @param types array of types |
77 | * @param tcnt number of entries in types | 87 | * @param tcnt number of entries in @a types |
78 | * @return GNUNET_YES if a type is in the map, GNUNET_NO if not | 88 | * @return #GNUNET_YES if a type is in the map, #GNUNET_NO if not |
79 | */ | 89 | */ |
80 | int | 90 | int |
81 | GSC_TYPEMAP_test_match (const struct GSC_TypeMap *tmap, const uint16_t * types, | 91 | GSC_TYPEMAP_test_match (const struct GSC_TypeMap *tmap, |
92 | const uint16_t *types, | ||
82 | unsigned int tcnt); | 93 | unsigned int tcnt); |
83 | 94 | ||
84 | 95 | ||
@@ -87,13 +98,15 @@ GSC_TYPEMAP_test_match (const struct GSC_TypeMap *tmap, const uint16_t * types, | |||
87 | * | 98 | * |
88 | * @param tmap map to extend (not changed) | 99 | * @param tmap map to extend (not changed) |
89 | * @param types array of types to add | 100 | * @param types array of types to add |
90 | * @param tcnt number of entries in types | 101 | * @param tcnt number of entries in @a types |
91 | * @return updated type map (fresh copy) | 102 | * @return updated type map (fresh copy) |
92 | */ | 103 | */ |
93 | struct GSC_TypeMap * | 104 | struct GSC_TypeMap * |
94 | GSC_TYPEMAP_extend (const struct GSC_TypeMap *tmap, const uint16_t * types, | 105 | GSC_TYPEMAP_extend (const struct GSC_TypeMap *tmap, |
106 | const uint16_t *types, | ||
95 | unsigned int tcnt); | 107 | unsigned int tcnt); |
96 | 108 | ||
109 | |||
97 | /** | 110 | /** |
98 | * Create an empty type map. | 111 | * Create an empty type map. |
99 | * | 112 | * |