diff options
Diffstat (limited to 'src/gnunet_chat_context.h')
-rw-r--r-- | src/gnunet_chat_context.h | 20 |
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 | ||
32 | enum 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 | |||
32 | struct GNUNET_CHAT_Handle; | 39 | struct GNUNET_CHAT_Handle; |
33 | 40 | ||
34 | struct GNUNET_CHAT_Context | 41 | struct 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 | ||
42 | struct GNUNET_CHAT_Context* | 51 | struct GNUNET_CHAT_Context* |
43 | context_create (struct GNUNET_CHAT_Handle *handle, | 52 | context_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 | ||
46 | void | 56 | void |
47 | context_destroy (struct GNUNET_CHAT_Context* context); | 57 | context_destroy (struct GNUNET_CHAT_Context* context); |
48 | 58 | ||
59 | enum GNUNET_CHAT_ContextType | ||
60 | context_get_type (struct GNUNET_CHAT_Context* context); | ||
61 | |||
49 | const struct GNUNET_HashCode* | 62 | const struct GNUNET_HashCode* |
50 | context_get_key (struct GNUNET_CHAT_Context* context); | 63 | context_get_key (struct GNUNET_CHAT_Context* context); |
51 | 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 | |||
52 | #endif /* GNUNET_CHAT_CONTEXT_H_ */ | 72 | #endif /* GNUNET_CHAT_CONTEXT_H_ */ |