aboutsummaryrefslogtreecommitdiff
path: root/src/gnunet_chat_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnunet_chat_context.h')
-rw-r--r--src/gnunet_chat_context.h28
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;
41struct GNUNET_CHAT_Context 43struct 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
51struct GNUNET_CHAT_Context* 57struct GNUNET_CHAT_Context*
52context_create (struct GNUNET_CHAT_Handle *handle, 58context_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
56void 61void
57context_destroy (struct GNUNET_CHAT_Context* context); 62context_destroy (struct GNUNET_CHAT_Context* context);
58 63
59enum GNUNET_CHAT_ContextType
60context_get_type (struct GNUNET_CHAT_Context* context);
61
62const struct GNUNET_HashCode*
63context_get_key (struct GNUNET_CHAT_Context* context);
64
65const char*
66context_get_nick (struct GNUNET_CHAT_Context* context);
67
68void
69context_set_nick (struct GNUNET_CHAT_Context* context,
70 const char *nick);
71
72#endif /* GNUNET_CHAT_CONTEXT_H_ */ 64#endif /* GNUNET_CHAT_CONTEXT_H_ */