diff options
Diffstat (limited to 'src/gnunet_chat_context.h')
-rw-r--r-- | src/gnunet_chat_context.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/gnunet_chat_context.h b/src/gnunet_chat_context.h index 87f7dfd..e975312 100644 --- a/src/gnunet_chat_context.h +++ b/src/gnunet_chat_context.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #define GNUNET_CHAT_CONTEXT_H_ | 26 | #define GNUNET_CHAT_CONTEXT_H_ |
27 | 27 | ||
28 | #include <gnunet/platform.h> | 28 | #include <gnunet/platform.h> |
29 | #include <gnunet/gnunet_common.h> | ||
30 | #include <gnunet/gnunet_container_lib.h> | ||
29 | #include <gnunet/gnunet_messenger_service.h> | 31 | #include <gnunet/gnunet_messenger_service.h> |
30 | #include <gnunet/gnunet_util_lib.h> | 32 | #include <gnunet/gnunet_util_lib.h> |
31 | 33 | ||
@@ -41,32 +43,22 @@ struct GNUNET_CHAT_Handle; | |||
41 | struct GNUNET_CHAT_Context | 43 | struct GNUNET_CHAT_Context |
42 | { | 44 | { |
43 | struct GNUNET_CHAT_Handle *handle; | 45 | struct GNUNET_CHAT_Handle *handle; |
44 | struct GNUNET_MESSENGER_Room *room; | ||
45 | 46 | ||
46 | enum GNUNET_CHAT_ContextType type; | 47 | enum GNUNET_CHAT_ContextType type; |
47 | struct GNUNET_HashCode key; | ||
48 | char *nick; | 48 | char *nick; |
49 | |||
50 | struct GNUNET_CONTAINER_MultiHashMap *messages; | ||
51 | struct GNUNET_CONTAINER_MultiHashMap *invites; | ||
52 | struct GNUNET_CONTAINER_MultiHashMap *files; | ||
53 | |||
54 | struct GNUNET_MESSENGER_Room *room; | ||
49 | }; | 55 | }; |
50 | 56 | ||
51 | struct GNUNET_CHAT_Context* | 57 | struct GNUNET_CHAT_Context* |
52 | context_create (struct GNUNET_CHAT_Handle *handle, | 58 | context_create_from_room (struct GNUNET_CHAT_Handle *handle, |
53 | enum GNUNET_CHAT_ContextType type, | 59 | struct GNUNET_MESSENGER_Room *room); |
54 | const struct GNUNET_HashCode *key); | ||
55 | 60 | ||
56 | void | 61 | void |
57 | context_destroy (struct GNUNET_CHAT_Context* context); | 62 | context_destroy (struct GNUNET_CHAT_Context* context); |
58 | 63 | ||
59 | enum GNUNET_CHAT_ContextType | ||
60 | context_get_type (struct GNUNET_CHAT_Context* context); | ||
61 | |||
62 | const struct GNUNET_HashCode* | ||
63 | context_get_key (struct GNUNET_CHAT_Context* context); | ||
64 | |||
65 | const char* | ||
66 | context_get_nick (struct GNUNET_CHAT_Context* context); | ||
67 | |||
68 | void | ||
69 | context_set_nick (struct GNUNET_CHAT_Context* context, | ||
70 | const char *nick); | ||
71 | |||
72 | #endif /* GNUNET_CHAT_CONTEXT_H_ */ | 64 | #endif /* GNUNET_CHAT_CONTEXT_H_ */ |