diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-08 20:28:46 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-08 20:28:46 +0000 |
commit | 8fa1a818df4f8466dbaeece10f2a1bdecc396595 (patch) | |
tree | 249afe774b316e755b4d1d7de5045bb2b8107c17 /src/testbed/testbed_api.h | |
parent | 216d130e277fee333b243faefd3c4e3aec2b22a0 (diff) | |
download | gnunet-8fa1a818df4f8466dbaeece10f2a1bdecc396595.tar.gz gnunet-8fa1a818df4f8466dbaeece10f2a1bdecc396595.zip |
operation and peer_destroy
Diffstat (limited to 'src/testbed/testbed_api.h')
-rw-r--r-- | src/testbed/testbed_api.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/testbed/testbed_api.h b/src/testbed/testbed_api.h index aee284c40..53e4607ff 100644 --- a/src/testbed/testbed_api.h +++ b/src/testbed/testbed_api.h | |||
@@ -27,6 +27,57 @@ | |||
27 | #ifndef TESTBED_API_H | 27 | #ifndef TESTBED_API_H |
28 | #define TESTBED_API_H | 28 | #define TESTBED_API_H |
29 | 29 | ||
30 | |||
31 | /** | ||
32 | * Enumeration of operations | ||
33 | */ | ||
34 | enum OperationType | ||
35 | { | ||
36 | /** | ||
37 | * Peer destroy operation | ||
38 | */ | ||
39 | OP_PEER_DESTROY | ||
40 | }; | ||
41 | |||
42 | |||
43 | /** | ||
44 | * The counter for generating unique operation ids. Use its current value and | ||
45 | * increment it (defined in testbed_api.c) | ||
46 | */ | ||
47 | extern uint64_t GNUNET_TESTBED_operation_id; | ||
48 | |||
49 | /** | ||
50 | * Testbed operation structure | ||
51 | */ | ||
52 | struct GNUNET_TESTBED_Operation | ||
53 | { | ||
54 | /** | ||
55 | * next pointer for DLL | ||
56 | */ | ||
57 | struct GNUNET_TESTBED_Operation *next; | ||
58 | |||
59 | /** | ||
60 | * prev pointer for DLL | ||
61 | */ | ||
62 | struct GNUNET_TESTBED_Operation *prev; | ||
63 | |||
64 | /** | ||
65 | * The ID for the operation; | ||
66 | */ | ||
67 | uint64_t operation_id; | ||
68 | |||
69 | /** | ||
70 | * The type of operation | ||
71 | */ | ||
72 | enum OperationType type; | ||
73 | |||
74 | /** | ||
75 | * Data specific to OperationType | ||
76 | */ | ||
77 | void *data; | ||
78 | }; | ||
79 | |||
80 | |||
30 | /** | 81 | /** |
31 | * Queues a message in send queue for sending to the service | 82 | * Queues a message in send queue for sending to the service |
32 | * | 83 | * |
@@ -51,4 +102,13 @@ size_t | |||
51 | GNUNET_TESTBED_compress_config (const char *config, size_t size, | 102 | GNUNET_TESTBED_compress_config (const char *config, size_t size, |
52 | char **xconfig); | 103 | char **xconfig); |
53 | 104 | ||
105 | |||
106 | /** | ||
107 | * Adds an operation to the queue of operations | ||
108 | * | ||
109 | * @param op the operation to add | ||
110 | */ | ||
111 | void | ||
112 | GNUNET_TESTBED_operation_add (struct GNUNET_TESTBED_Operation *op); | ||
113 | |||
54 | #endif | 114 | #endif |