diff options
Diffstat (limited to 'src/main/java/org/gnunet/dht/BlockType.java')
-rw-r--r-- | src/main/java/org/gnunet/dht/BlockType.java | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/main/java/org/gnunet/dht/BlockType.java b/src/main/java/org/gnunet/dht/BlockType.java new file mode 100644 index 0000000..cf00d38 --- /dev/null +++ b/src/main/java/org/gnunet/dht/BlockType.java | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2011, 2012 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 3, 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 | package org.gnunet.dht; | ||
22 | |||
23 | /** | ||
24 | * Information on how to interpret a block of data. | ||
25 | */ | ||
26 | public enum BlockType { | ||
27 | /** | ||
28 | * Any type of block, used as a wildcard when searching. Should | ||
29 | * never be attached to a specific block. | ||
30 | */ | ||
31 | ANY(0), | ||
32 | /** | ||
33 | * Data block (leaf) in the CHK tree. | ||
34 | */ | ||
35 | DBLOCK(1), | ||
36 | /** | ||
37 | * Inner block in the CHK tree. | ||
38 | */ | ||
39 | IBLOCK(2), | ||
40 | /** | ||
41 | * Type of a block representing a keyword search result. Note that | ||
42 | * the values for KBLOCK, SBLOCK and NBLOCK must be consecutive. | ||
43 | */ | ||
44 | KBLOCK(3), | ||
45 | /** | ||
46 | * Type of a block that is used to advertise content in a namespace. | ||
47 | */ | ||
48 | SBLOCK(4), | ||
49 | /** | ||
50 | * Type of a block that is used to advertise a namespace. | ||
51 | */ | ||
52 | NBLOCK(5), | ||
53 | /** | ||
54 | * Type of a block representing a block to be encoded on demand from disk. | ||
55 | * Should never appear on the network directly. | ||
56 | */ | ||
57 | FS_ONDEMAND(6), | ||
58 | /** | ||
59 | * Type of a block that contains a HELLO for a peer (for | ||
60 | * DHT find-peer operations). | ||
61 | */ | ||
62 | DHT_HELLO(7), | ||
63 | /** | ||
64 | * Block for testing. | ||
65 | */ | ||
66 | TEST(8), | ||
67 | /** | ||
68 | * Block for storing .gnunet-domains | ||
69 | */ | ||
70 | DNS(10), | ||
71 | /** | ||
72 | * Block for storing record data | ||
73 | */ | ||
74 | NAMERECORD(11); | ||
75 | |||
76 | public final int val; | ||
77 | |||
78 | BlockType(int val) { | ||
79 | this.val = val; | ||
80 | } | ||
81 | } | ||