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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gnunet_chat_context.h b/src/gnunet_chat_context.h
index a7cca70..87f7dfd 100644
--- a/src/gnunet_chat_context.h
+++ b/src/gnunet_chat_context.h
@@ -29,6 +29,13 @@
29#include <gnunet/gnunet_messenger_service.h> 29#include <gnunet/gnunet_messenger_service.h>
30#include <gnunet/gnunet_util_lib.h> 30#include <gnunet/gnunet_util_lib.h>
31 31
32enum GNUNET_CHAT_ContextType
33{
34 GNUNET_CHAT_CONTEXT_TYPE_CONTACT = 1,
35 GNUNET_CHAT_CONTEXT_TYPE_GROUP = 2,
36 GNUNET_CHAT_CONTEXT_TYPE_UNKNOWN = 0
37};
38
32struct GNUNET_CHAT_Handle; 39struct GNUNET_CHAT_Handle;
33 40
34struct GNUNET_CHAT_Context 41struct GNUNET_CHAT_Context
@@ -36,17 +43,30 @@ struct GNUNET_CHAT_Context
36 struct GNUNET_CHAT_Handle *handle; 43 struct GNUNET_CHAT_Handle *handle;
37 struct GNUNET_MESSENGER_Room *room; 44 struct GNUNET_MESSENGER_Room *room;
38 45
46 enum GNUNET_CHAT_ContextType type;
39 struct GNUNET_HashCode key; 47 struct GNUNET_HashCode key;
48 char *nick;
40}; 49};
41 50
42struct GNUNET_CHAT_Context* 51struct GNUNET_CHAT_Context*
43context_create (struct GNUNET_CHAT_Handle *handle, 52context_create (struct GNUNET_CHAT_Handle *handle,
53 enum GNUNET_CHAT_ContextType type,
44 const struct GNUNET_HashCode *key); 54 const struct GNUNET_HashCode *key);
45 55
46void 56void
47context_destroy (struct GNUNET_CHAT_Context* context); 57context_destroy (struct GNUNET_CHAT_Context* context);
48 58
59enum GNUNET_CHAT_ContextType
60context_get_type (struct GNUNET_CHAT_Context* context);
61
49const struct GNUNET_HashCode* 62const struct GNUNET_HashCode*
50context_get_key (struct GNUNET_CHAT_Context* context); 63context_get_key (struct GNUNET_CHAT_Context* context);
51 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
52#endif /* GNUNET_CHAT_CONTEXT_H_ */ 72#endif /* GNUNET_CHAT_CONTEXT_H_ */